OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

meshSearch Class Reference

Collaboration diagram for meshSearch:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 64 of file meshSearch.H.


Public Member Functions

 ClassName ("meshSearch")
 meshSearch (const polyMesh &mesh, const bool faceDecomp=true)
 Construct from components.
 ~meshSearch ()
const polyMesh & mesh () 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< pointIndexHit > intersections (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

static scalar tol_
 tolerance on linear dimensions

Constructor & Destructor Documentation

meshSearch ( const polyMesh &  mesh,
const bool  faceDecomp = true 
)

Construct from components.

~meshSearch (  ) 


Member Function Documentation

ClassName ( "meshSearch"   ) 

const polyMesh& mesh (  )  const [inline]

Definition at line 158 of file meshSearch.H.

const octree<octreeDataFace>& boundaryTree (  )  const

Get (demand driven) reference to octree holding all.

boundary faces

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

outside cell.

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)

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.

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.

void clearOut (  ) 

delete all storage

void correct (  ) 

Correct for mesh geom/topo changes.


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: Copyright © 2000-2007 OpenCFD Ltd