Sundance::AToCPointLocator Class Reference

List of all members.

Public Member Functions

 AToCPointLocator (const Mesh &mesh, const CellFilter &subdomain, const std::vector< int > &nx)
int getGridIndex (const double *x) const
int guessCell (const double *x) const
int findEnclosingCell (int initialGuessLID, const double *x) const
int findEnclosingCell (int initialGuessLID, const double *x, double *localCoords) const
void fillMaximalNeighbors (int cellLID, const int *facetLID) const
bool cellContainsPoint (int cellLID, const double *x, const int *facetLID) const
bool cellContainsPoint (int cellLID, const double *x, const int *facetLID, double *localCoords) const
const Meshmesh () const
const CellFiltersubdomain () const

Static Public Member Functions

static Point makePoint (int dim, const double *x)

Private Member Functions

void getGridRange (const Mesh &mesh, int cellDim, int cellLID, Array< int > &lowIndex, Array< int > &highIndex) const

Private Attributes

int dim_
Mesh mesh_
int nFacets_
std::vector< int > nx_
Array< double > low_
Array< double > high_
Array< double > dx_
RCP< Array< int > > table_
CellFilter subdomain_
Array< RCP< Set< int > > > neighborSet_


Detailed Description

AToCPointLocator finds the cell index for a point within an unstructured mesh.

Note: not tested in parallel.

Definition at line 54 of file SundanceAToCPointLocator.hpp.


Constructor & Destructor Documentation

AToCPointLocator::AToCPointLocator ( const Mesh mesh,
const CellFilter subdomain,
const std::vector< int > &  nx 
)


Member Function Documentation

bool AToCPointLocator::cellContainsPoint ( int  cellLID,
const double *  x,
const int *  facetLID,
double *  localCoords 
) const

Test whether a point is within a specified cell, and if so, compute local coordinates within that cell.

Definition at line 247 of file SundanceAToCPointLocator.cpp.

References dim_, mesh_, Sundance::Mesh::nodePositionView(), and Sundance::orient2D().

bool AToCPointLocator::cellContainsPoint ( int  cellLID,
const double *  x,
const int *  facetLID 
) const

Test whether a point is within a specified cell

Definition at line 205 of file SundanceAToCPointLocator.cpp.

References dim_, mesh_, Sundance::Mesh::nodePositionView(), and Sundance::orient2D().

Referenced by findEnclosingCell().

void AToCPointLocator::fillMaximalNeighbors ( int  cellLID,
const int *  facetLID 
) const

Definition at line 185 of file SundanceAToCPointLocator.cpp.

References dim_, Sundance::Mesh::getCofacets(), mesh_, neighborSet_, and nFacets_.

Referenced by findEnclosingCell().

int AToCPointLocator::findEnclosingCell ( int  initialGuessLID,
const double *  x,
double *  localCoords 
) const

int AToCPointLocator::findEnclosingCell ( int  initialGuessLID,
const double *  x 
) const

int AToCPointLocator::getGridIndex ( const double *  x  )  const

Find the index of a point in an overlaid structured grid.

Definition at line 141 of file SundanceAToCPointLocator.cpp.

References dim_, dx_, low_, and nx_.

Referenced by guessCell().

void AToCPointLocator::getGridRange ( const Mesh mesh,
int  cellDim,
int  cellLID,
Array< int > &  lowIndex,
Array< int > &  highIndex 
) const [private]

Find the range of structured grid cells within the bounding box of a cell.

Definition at line 155 of file SundanceAToCPointLocator.cpp.

References dx_, Sundance::Mesh::getFacetArray(), low_, and Sundance::Mesh::nodePosition().

Referenced by AToCPointLocator().

int Sundance::AToCPointLocator::guessCell ( const double *  x  )  const [inline]

Use an overlaid structured grid to estimate the location of the point.

Definition at line 68 of file SundanceAToCPointLocator.hpp.

References getGridIndex(), and table_.

Referenced by Sundance::AToCDensitySampler::addToCounts(), Sundance::CToAInterpolator::interpolate(), and Sundance::AToCDensitySampler::sample().

Point AToCPointLocator::makePoint ( int  dim,
const double *  x 
) [static]

const Mesh& Sundance::AToCPointLocator::mesh (  )  const [inline]

Definition at line 95 of file SundanceAToCPointLocator.hpp.

References mesh_.

Referenced by Sundance::CToAInterpolator::updateField().

const CellFilter& Sundance::AToCPointLocator::subdomain (  )  const [inline]

Definition at line 98 of file SundanceAToCPointLocator.hpp.

References subdomain_.


Member Data Documentation

Array<double> Sundance::AToCPointLocator::dx_ [private]

Definition at line 120 of file SundanceAToCPointLocator.hpp.

Referenced by AToCPointLocator(), getGridIndex(), and getGridRange().

Array<double> Sundance::AToCPointLocator::high_ [private]

Definition at line 119 of file SundanceAToCPointLocator.hpp.

Referenced by AToCPointLocator().

Array<double> Sundance::AToCPointLocator::low_ [private]

Definition at line 118 of file SundanceAToCPointLocator.hpp.

Referenced by AToCPointLocator(), getGridIndex(), and getGridRange().

Array<RCP<Set<int> > > Sundance::AToCPointLocator::neighborSet_ [mutable, private]

Definition at line 116 of file SundanceAToCPointLocator.hpp.

Referenced by fillMaximalNeighbors().

std::vector<int> Sundance::AToCPointLocator::nx_ [private]

Definition at line 117 of file SundanceAToCPointLocator.hpp.

Referenced by AToCPointLocator(), and getGridIndex().

Definition at line 122 of file SundanceAToCPointLocator.hpp.

Referenced by subdomain().

RCP<Array<int> > Sundance::AToCPointLocator::table_ [private]

Definition at line 121 of file SundanceAToCPointLocator.hpp.

Referenced by AToCPointLocator(), and guessCell().

Site Contact