OpenFOAM logo
Open Source CFD Toolkit

meshSearch Class Reference

Collaboration diagram for meshSearch:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ClassName ("meshSearch")
 meshSearch (const polyMesh &mesh, const bool faceDecomp=true)
 Construct from components.
 ~meshSearch ()
const polyMeshmesh () const
const octree< octreeDataFace > & boundaryTree () const
 Get (demand driven) reference to octree holding all.
const octree< octreeDataCell > & cellTree () const
 Get (demand driven) reference to octree holding all cells.
const octree< octreeDataPoint > & cellCentreTree () const
 Get (demand driven) reference to octree holding all cell centres.
bool pointInCell (const point &p, const label celli) const
 test for point in cell. Does not handle cells with center
label findNearestCell (const point &location, const label seedCellI=-1, const bool useTreeSearch=true) const
 Find nearest cell in terms of cell centre.
label findCell (const point &location, const label seedCellI=-1, const bool useTreeSearch=true) const
 Find cell containing (using pointInCell) location.
label findNearestBoundaryFace (const point &location, const label seedFaceI=-1, const bool useTreeSearch=true) const
 Find nearest boundary face.
pointIndexHit intersection (const point &pStart, const point &pEnd) const
 Find first intersection of boundary in segment [pStart, pEnd].
List< pointIndexHitintersections (const point &pStart, const point &pEnd) const
 Find all intersections of boundary within segment pStart .. pEnd.
bool isInside (const point &) const
 Determine inside/outside status.
void clearOut ()
 delete all storage
void correct ()
 Correct for mesh geom/topo changes.

Static Public Attributes

scalar tol_
 tolerance on linear dimensions

Constructor & Destructor Documentation

meshSearch const polyMesh mesh,
const bool  faceDecomp = true
 

Construct from components.

~meshSearch  ) 
 


Member Function Documentation

const octree<octreeDataFace>& boundaryTree  )  const
 

Get (demand driven) reference to octree holding all.

boundary faces

const octree<octreeDataPoint>& cellCentreTree  )  const
 

Get (demand driven) reference to octree holding all cell centres.

const octree<octreeDataCell>& cellTree  )  const
 

Get (demand driven) reference to octree holding all cells.

ClassName "meshSearch"   ) 
 

void clearOut  ) 
 

delete all storage

void correct  ) 
 

Correct for mesh geom/topo changes.

label findCell const point location,
const label  seedCellI = -1,
const bool  useTreeSearch = true
const
 

Find cell containing (using pointInCell) location.

If seed provided walks and falls back to linear/tree search. (so handles holes correctly)s Returns -1 if not in domain.

label findNearestBoundaryFace const point location,
const label  seedFaceI = -1,
const bool  useTreeSearch = true
const
 

Find nearest boundary face.

If seed provided walks but then does not pass local minima in distance. Also does not jump from one connected region to the next.

label findNearestCell const point location,
const label  seedCellI = -1,
const bool  useTreeSearch = true
const
 

Find nearest cell in terms of cell centre.

  • use octree
  • use linear search
  • if seed is provided walk. (uses findNearestCellWalk; does not handle holes in domain)

pointIndexHit intersection const point pStart,
const point pEnd
const
 

Find first intersection of boundary in segment [pStart, pEnd].

(so inclusive of endpoints). Always octree for now

List<pointIndexHit> intersections const point pStart,
const point pEnd
const
 

Find all intersections of boundary within segment pStart .. pEnd.

Always octree for now

bool isInside const point  )  const
 

Determine inside/outside status.

const polyMesh& mesh  )  const [inline]
 

Definition at line 158 of file meshSearch.H.

References Foam::label, and Foam::point.

bool pointInCell const point p,
const label  celli
const
 

test for point in cell. Does not handle cells with center

outside cell.


Member Data Documentation

scalar tol_ [static]
 

tolerance on linear dimensions

Definition at line 140 of file meshSearch.H.


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org