Public Member Functions | Private Member Functions | Private Attributes
findCellsIntersectingSurface Class Reference
Collaboration diagram for findCellsIntersectingSurface:
Collaboration graph
[legend]

Public Member Functions

 findCellsIntersectingSurface (polyMeshGen &mesh, const meshOctree &octree)
 Construct from mesh and octree. More...
 
 findCellsIntersectingSurface (polyMeshGen &mesh, const triSurf &surface)
 Construct from mesh and surface. More...
 
 ~findCellsIntersectingSurface ()
 
const boolListintersectedCells () const
 return the list of intersected cells; More...
 
const VRWGraphfacetsIntersectingCells () const
 return the graph of facets intersecting each cell More...
 
void addIntersectedCellsToSubset (const word subsetName="intersectedCells")
 create a cell subset containing intersected cells More...
 

Private Member Functions

void generateOctree (const triSurf &)
 generate the octree More...
 
void findIntersectedCells ()
 check for the intersected cells More...
 

Private Attributes

polyMeshGenmesh_
 Reference to the mesh. More...
 
meshOctreeoctreePtr_
 Pointer to the octree. More...
 
const bool octreeGenerated_
 check whether the octree was generated or not More...
 
boolList intersectedCells_
 stores information about intersected cells More...
 
VRWGraph facetsIntersectingCell_
 stores information which surface facets intersect each cell More...
 

Detailed Description

Definition at line 53 of file findCellsIntersectingSurface.H.

Constructor & Destructor Documentation

◆ findCellsIntersectingSurface() [1/2]

findCellsIntersectingSurface ( polyMeshGen mesh,
const meshOctree octree 
)

Construct from mesh and octree.

Definition at line 280 of file findCellsIntersectingSurface.C.

◆ findCellsIntersectingSurface() [2/2]

findCellsIntersectingSurface ( polyMeshGen mesh,
const triSurf surface 
)

Construct from mesh and surface.

Definition at line 295 of file findCellsIntersectingSurface.C.

◆ ~findCellsIntersectingSurface()

Member Function Documentation

◆ generateOctree()

void generateOctree ( const triSurf surf)
private

generate the octree

Definition at line 49 of file findCellsIntersectingSurface.C.

References meshOctreeCreator::createOctreeWithRefinedBoundary(), and findCellsIntersectingSurface::octreePtr_.

Here is the call graph for this function:

◆ findIntersectedCells()

void findIntersectedCells ( )
private

check for the intersected cells

find the bounding box of the cell

find surface triangles within the bounding box

remove triangles which do not intersect the bounding box

check if any of the surface vertices is contained within the cell

check which surface nodes are within the cell

check if any triangle in the surface mesh intersects any of the cell's faces

store the results for this cell

Definition at line 56 of file findCellsIntersectingSurface.C.

References polyMeshGenCells::addressingData(), Foam::constant::universal::c, polyMeshGenAddressing::cellCentres(), cells, polyMeshGenCells::cells(), meshOctreeCube::containedElements(), meshOctreeSlot::containedTriangles_, boundBox::contains(), Foam::help::doFaceAndTriangleIntersect(), f(), polyMeshGenAddressing::faceCentres(), polyMeshGenFaces::faces(), findCellsIntersectingSurface::facetsIntersectingCell_, meshOctree::findLeavesContainedInBox(), forAll, forAllConstIter(), forAllRow, HashTable::found(), meshOctreeCube::hasContainedElements(), HashSet< Key, Hash >::insert(), intersect(), findCellsIntersectingSurface::intersectedCells_, meshOctreeModifier::leavesAccess(), boundBox::max(), Foam::max(), findCellsIntersectingSurface::mesh_, boundBox::min(), Foam::min(), findCellsIntersectingSurface::octreePtr_, boundBox::overlaps(), polyMeshGenFaces::owner(), p, triSurfAddressing::pointFacets(), Foam::help::pointInTetrahedron(), points, triSurfPoints::points(), polyMeshGenPoints::points(), VRWGraph::setRow(), List::setSize(), VRWGraph::setSize(), meshOctreeCube::slotPtr(), boundBox::span(), meshOctree::surface(), HashTable::toc(), and HashTable::transfer().

Here is the call graph for this function:

◆ intersectedCells()

const boolList & intersectedCells ( ) const

return the list of intersected cells;

Definition at line 321 of file findCellsIntersectingSurface.C.

References findCellsIntersectingSurface::intersectedCells_.

◆ facetsIntersectingCells()

const VRWGraph & facetsIntersectingCells ( ) const

return the graph of facets intersecting each cell

Definition at line 326 of file findCellsIntersectingSurface.C.

References findCellsIntersectingSurface::facetsIntersectingCell_.

◆ addIntersectedCellsToSubset()

void addIntersectedCellsToSubset ( const word  subsetName = "intersectedCells")

create a cell subset containing intersected cells

Definition at line 332 of file findCellsIntersectingSurface.C.

References forAll.

Field Documentation

◆ mesh_

polyMeshGen& mesh_
private

Reference to the mesh.

Definition at line 57 of file findCellsIntersectingSurface.H.

Referenced by findCellsIntersectingSurface::findIntersectedCells().

◆ octreePtr_

meshOctree* octreePtr_
private

◆ octreeGenerated_

const bool octreeGenerated_
private

check whether the octree was generated or not

Definition at line 63 of file findCellsIntersectingSurface.H.

Referenced by findCellsIntersectingSurface::~findCellsIntersectingSurface().

◆ intersectedCells_

boolList intersectedCells_
private

stores information about intersected cells

Definition at line 66 of file findCellsIntersectingSurface.H.

Referenced by findCellsIntersectingSurface::findIntersectedCells(), and findCellsIntersectingSurface::intersectedCells().

◆ facetsIntersectingCell_

VRWGraph facetsIntersectingCell_
private

stores information which surface facets intersect each cell

Definition at line 69 of file findCellsIntersectingSurface.H.

Referenced by findCellsIntersectingSurface::facetsIntersectingCells(), and findCellsIntersectingSurface::findIntersectedCells().


The documentation for this class was generated from the following files: