1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
16 cfMesh is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
25 findCellsIntersectingSurface
28 Finds which cells in the mesh intersect the surface mesh
31 findCellsIntersectingSurface.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef findCellsIntersectingSurface_H
36 #define findCellsIntersectingSurface_H
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class findCellsIntersectingSurface Declaration
52 \*---------------------------------------------------------------------------*/
54 class findCellsIntersectingSurface
57 //- Reference to the mesh
60 //- Pointer to the octree
61 meshOctree* octreePtr_;
63 //- check whether the octree was generated or not
64 const bool octreeGenerated_;
66 //- stores information about intersected cells
67 boolList intersectedCells_;
69 //- stores information which surface facets intersect each cell
70 VRWGraph facetsIntersectingCell_;
72 // Private member functions
73 //- generate the octree
74 void generateOctree(const triSurf&);
76 //- check for the intersected cells
77 void findIntersectedCells();
83 //- Construct from mesh and octree
84 findCellsIntersectingSurface
87 const meshOctree& octree
90 //- Construct from mesh and surface
91 findCellsIntersectingSurface
94 const triSurf& surface
98 ~findCellsIntersectingSurface();
100 // Public member functions
101 //- return the list of intersected cells;
102 const boolList& intersectedCells() const;
104 //- return the graph of facets intersecting each cell
105 const VRWGraph& facetsIntersectingCells() const;
107 //- create a cell subset containing intersected cells
108 void addIntersectedCellsToSubset
110 const word subsetName = "intersectedCells"
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 } // End namespace Foam
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 // ************************************************************************* //