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 Mesh & | mesh () const |
| const CellFilter & | subdomain () 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_ |
AToCPointLocator finds the cell index for a point within an unstructured mesh.
Note: not tested in parallel.
Definition at line 65 of file SundanceAToCPointLocator.hpp.
| AToCPointLocator::AToCPointLocator | ( | const Mesh & | mesh, |
| const CellFilter & | subdomain, | ||
| const std::vector< int > & | nx | ||
| ) |
Definition at line 69 of file SundanceAToCPointLocator.cpp.
References Sundance::CellSet::begin(), dim_, dx_, Sundance::CellSet::end(), Sundance::CellFilter::getCells(), Sundance::Mesh::getFacetArray(), getGridRange(), high_, low_, neighborSet_, Sundance::Mesh::nodePosition(), Sundance::Mesh::numCells(), nx_, pointLocatorCtorTimer(), and table_.
| bool AToCPointLocator::cellContainsPoint | ( | int | cellLID, |
| const double * | x, | ||
| const int * | facetLID | ||
| ) | const |
Test whether a point is within a specified cell
Definition at line 216 of file SundanceAToCPointLocator.cpp.
References dim_, mesh_, Sundance::Mesh::nodePositionView(), and Sundance::orient2D().
Referenced by findEnclosingCell().
| 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 258 of file SundanceAToCPointLocator.cpp.
References dim_, mesh_, Sundance::Mesh::nodePositionView(), and Sundance::orient2D().
| void AToCPointLocator::fillMaximalNeighbors | ( | int | cellLID, |
| const int * | facetLID | ||
| ) | const |
Definition at line 196 of file SundanceAToCPointLocator.cpp.
References dim_, Sundance::Mesh::getCofacets(), mesh_, neighborSet_, and nFacets_.
Referenced by findEnclosingCell().
| int AToCPointLocator::findEnclosingCell | ( | int | initialGuessLID, |
| const double * | x | ||
| ) | const |
Find the cell that contains the specified point
Definition at line 331 of file SundanceAToCPointLocator.cpp.
References cellContainsPoint(), Sundance::Set< Key, Compare >::contains(), fillMaximalNeighbors(), Sundance::Mesh::getFacetArray(), mesh_, neighborSet_, Sundance::Mesh::numFacets(), Sundance::Set< Key, Compare >::put(), and Sundance::Mesh::spatialDim().
Referenced by Sundance::AToCDensitySampler::addToCounts(), Sundance::CToAInterpolator::interpolate(), and Sundance::AToCDensitySampler::sample().
| int AToCPointLocator::findEnclosingCell | ( | int | initialGuessLID, |
| const double * | x, | ||
| double * | localCoords | ||
| ) | const |
Find the cell that contains the specified point, also computing local coordinates within that cell.
Definition at line 367 of file SundanceAToCPointLocator.cpp.
References cellContainsPoint(), Sundance::Set< Key, Compare >::contains(), fillMaximalNeighbors(), Sundance::Mesh::getFacetArray(), mesh_, neighborSet_, Sundance::Mesh::numFacets(), Sundance::Set< Key, Compare >::put(), and Sundance::Mesh::spatialDim().
| int AToCPointLocator::getGridIndex | ( | const double * | x | ) | const |
Find the index of a point in an overlaid structured grid.
Definition at line 152 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 166 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 79 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] |
Definition at line 402 of file SundanceAToCPointLocator.cpp.
Referenced by Sundance::AToCDensitySampler::addToCounts(), and Sundance::AToCDensitySampler::sample().
| const Mesh& Sundance::AToCPointLocator::mesh | ( | ) | const [inline] |
Definition at line 106 of file SundanceAToCPointLocator.hpp.
References mesh_.
Referenced by Sundance::CToAInterpolator::updateField().
| const CellFilter& Sundance::AToCPointLocator::subdomain | ( | ) | const [inline] |
Definition at line 109 of file SundanceAToCPointLocator.hpp.
References subdomain_.
int Sundance::AToCPointLocator::dim_ [private] |
Definition at line 125 of file SundanceAToCPointLocator.hpp.
Referenced by AToCPointLocator(), cellContainsPoint(), fillMaximalNeighbors(), and getGridIndex().
Array<double> Sundance::AToCPointLocator::dx_ [private] |
Definition at line 131 of file SundanceAToCPointLocator.hpp.
Referenced by AToCPointLocator(), getGridIndex(), and getGridRange().
Array<double> Sundance::AToCPointLocator::high_ [private] |
Definition at line 130 of file SundanceAToCPointLocator.hpp.
Referenced by AToCPointLocator().
Array<double> Sundance::AToCPointLocator::low_ [private] |
Definition at line 129 of file SundanceAToCPointLocator.hpp.
Referenced by AToCPointLocator(), getGridIndex(), and getGridRange().
Mesh Sundance::AToCPointLocator::mesh_ [private] |
Definition at line 126 of file SundanceAToCPointLocator.hpp.
Referenced by cellContainsPoint(), fillMaximalNeighbors(), findEnclosingCell(), and mesh().
Array<RCP<Set<int> > > Sundance::AToCPointLocator::neighborSet_ [mutable, private] |
Definition at line 134 of file SundanceAToCPointLocator.hpp.
Referenced by AToCPointLocator(), fillMaximalNeighbors(), and findEnclosingCell().
int Sundance::AToCPointLocator::nFacets_ [private] |
Definition at line 127 of file SundanceAToCPointLocator.hpp.
Referenced by fillMaximalNeighbors().
std::vector<int> Sundance::AToCPointLocator::nx_ [private] |
Definition at line 128 of file SundanceAToCPointLocator.hpp.
Referenced by AToCPointLocator(), and getGridIndex().
Definition at line 133 of file SundanceAToCPointLocator.hpp.
Referenced by subdomain().
RCP<Array<int> > Sundance::AToCPointLocator::table_ [private] |
Definition at line 132 of file SundanceAToCPointLocator.hpp.
Referenced by AToCPointLocator(), and guessCell().