findCellsIntersectingSurface.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  findCellsIntersectingSurface
26 
27 Description
28  Finds which cells in the mesh intersect the surface mesh
29 
30 SourceFiles
31  findCellsIntersectingSurface.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef findCellsIntersectingSurface_H
36 #define findCellsIntersectingSurface_H
37 
38 #include "boolList.H"
39 #include "VRWGraph.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class polyMeshGen;
47 class triSurf;
48 class meshOctree;
49 
50 /*---------------------------------------------------------------------------*\
51  Class findCellsIntersectingSurface Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57  //- Reference to the mesh
59 
60  //- Pointer to the octree
62 
63  //- check whether the octree was generated or not
64  const bool octreeGenerated_;
65 
66  //- stores information about intersected cells
68 
69  //- stores information which surface facets intersect each cell
71 
72  // Private member functions
73  //- generate the octree
74  void generateOctree(const triSurf&);
75 
76  //- check for the intersected cells
77  void findIntersectedCells();
78 
79 public:
80 
81  // Constructors
82 
83  //- Construct from mesh and octree
85  (
87  const meshOctree& octree
88  );
89 
90  //- Construct from mesh and surface
92  (
94  const triSurf& surface
95  );
96 
97  // Destructor
99 
100  // Public member functions
101  //- return the list of intersected cells;
102  const boolList& intersectedCells() const;
103 
104  //- return the graph of facets intersecting each cell
105  const VRWGraph& facetsIntersectingCells() const;
106 
107  //- create a cell subset containing intersected cells
109  (
110  const word subsetName = "intersectedCells"
111  );
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
Foam::findCellsIntersectingSurface::facetsIntersectingCells
const VRWGraph & facetsIntersectingCells() const
return the graph of facets intersecting each cell
Definition: findCellsIntersectingSurface.C:326
boolList.H
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::findCellsIntersectingSurface::octreeGenerated_
const bool octreeGenerated_
check whether the octree was generated or not
Definition: findCellsIntersectingSurface.H:63
Foam::findCellsIntersectingSurface::generateOctree
void generateOctree(const triSurf &)
generate the octree
Definition: findCellsIntersectingSurface.C:49
Foam::findCellsIntersectingSurface::intersectedCells_
boolList intersectedCells_
stores information about intersected cells
Definition: findCellsIntersectingSurface.H:66
VRWGraph.H
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::findCellsIntersectingSurface::mesh_
polyMeshGen & mesh_
Reference to the mesh.
Definition: findCellsIntersectingSurface.H:57
polyMeshGen
Mesh with selections.
Foam::findCellsIntersectingSurface
Definition: findCellsIntersectingSurface.H:53
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::findCellsIntersectingSurface::findCellsIntersectingSurface
findCellsIntersectingSurface(polyMeshGen &mesh, const meshOctree &octree)
Construct from mesh and octree.
Definition: findCellsIntersectingSurface.C:280
Foam::findCellsIntersectingSurface::~findCellsIntersectingSurface
~findCellsIntersectingSurface()
Definition: findCellsIntersectingSurface.C:313
Foam::findCellsIntersectingSurface::octreePtr_
meshOctree * octreePtr_
Pointer to the octree.
Definition: findCellsIntersectingSurface.H:60
Foam::findCellsIntersectingSurface::intersectedCells
const boolList & intersectedCells() const
return the list of intersected cells;
Definition: findCellsIntersectingSurface.C:321
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::findCellsIntersectingSurface::facetsIntersectingCell_
VRWGraph facetsIntersectingCell_
stores information which surface facets intersect each cell
Definition: findCellsIntersectingSurface.H:69
Foam::meshOctree
Definition: meshOctree.H:55
triSurf
A class for triangulated surface used in the meshing process. It is derived from points and facets wi...
Foam::findCellsIntersectingSurface::addIntersectedCellsToSubset
void addIntersectedCellsToSubset(const word subsetName="intersectedCells")
create a cell subset containing intersected cells
Definition: findCellsIntersectingSurface.C:332
Foam::surface
Definition: surface.H:55
meshOctree
Octree for mesh generation.
Foam::VRWGraph
Definition: VRWGraph.H:101
Foam::triSurf
Definition: triSurf.H:59
Foam::findCellsIntersectingSurface::findIntersectedCells
void findIntersectedCells()
check for the intersected cells
Definition: findCellsIntersectingSurface.C:56