Sundance::Mesh Class Reference

Inheritance diagram for Sundance::Mesh:

Playa::Handle< MeshBase >

List of all members.

Public Member Functions

 Mesh ()
 Mesh (Handleable< MeshBase > *rawPtr)
 Mesh (const RefCountPtr< MeshBase > &smartPtr)
int id () const
const MeshEntityOrdermeshOrder () const
 Get the ordering convention used by this mesh.
int spatialDim () const
int numCells (int dim) const
Point nodePosition (int i) const
const double * nodePositionView (int i) const
Point centroid (int cellDim, int cellLID) const
void outwardNormals (const Array< int > &cellLIDs, Array< Point > &outwardNormals) const
void tangentsToEdges (const Array< int > &cellLIDs, Array< Point > &tangentVectors) const
void getJacobians (int cellDim, const Array< int > &cellLID, CellJacobianBatch &jBatch) const
virtual void getCellDiameters (int cellDim, const Array< int > &cellLID, Array< double > &diameters) const
void pushForward (int cellDim, const Array< int > &cellLID, const Array< Point > &refQuadPts, Array< Point > &physQuadPts) const
int ownerProcID (int cellDim, int cellLID) const
int numFacets (int cellDim, int cellLID, int facetDim) const
int facetLID (int cellDim, int cellLID, int facetDim, int facetIndex, int &facetOrientation) const
void getFacetArray (int cellDim, int cellLID, int facetDim, Array< int > &facetLIDs, Array< int > &facetOrientations) const
const int * elemZeroFacetView (int cellLID) const
void getFacetLIDs (int cellDim, const Array< int > &cellLID, int facetDim, Array< int > &facetLID, Array< int > &facetOrientations) const
int numMaxCofacets (int cellDim, int cellLID) const
int maxCofacetLID (int cellDim, int cellLID, int cofacetIndex, int &facetIndex) const
void getMaxCofacetLIDs (const Array< int > &cellLIDs, MaximalCofacetBatch &cofacets) const
void getCofacets (int cellDim, int cellLID, int cofacetDim, Array< int > &cofacetLIDs) const
int mapGIDToLID (int cellDim, int globalIndex) const
bool hasGID (int cellDim, int globalIndex) const
int mapLIDToGID (int cellDim, int localIndex) const
CellType cellType (int cellDim) const
int label (int cellDim, int cellLID) const
void getLabels (int cellDim, const Array< int > &cellLID, Array< int > &labels) const
void setLabel (int cellDim, int cellLID, int label)
Set< int > getAllLabelsForDimension (int cellDim) const
virtual int numLabels (int cellDim) const
void getLIDsForLabel (int cellDim, int label, Array< int > &cellLIDs) const
const MPICommcomm () const
void assignIntermediateCellGIDs (int cellDim)
bool hasIntermediateGIDs (int cellDim) const
void dump (const std::string &filename) const
bool checkConsistency (const std::string &filename) const
bool checkConsistency (std::ostream &os) const
Mesh creation methods


void estimateNumVertices (int nPts)
void estimateNumElements (int nElems)
int addVertex (int globalIndex, const Point &x, int ownerProcID, int label)
int addElement (int globalIndex, const Array< int > &vertLID, int ownerProcID, int label)
void freezeTopology ()
Reordering


void setReorderer (const CellReorderer &reorderer)
const CellReordererImplemBasereorderer () const
Functions for Mesh with hanging nodes


bool allowsHangingHodes () const
bool isElementHangingNode (int cellDim, int cellLID) const
int indexInParent (int maxCellLID) const
int maxChildren () const
void returnParentFacets (int childCellLID, int dimFacets, Array< int > &facetsLIDs, int &parentCellLIDs) const
Special Weights Storage for Adaptive Cell Integration


bool IsSpecialWeightValid () const
void setSpecialWeightValid (bool val) const
void flushSpecialWeights () const
bool hasSpecialWeight (int dim, int cellLID) const
void setSpecialWeight (int dim, int cellLID, Array< double > &w) const
void getSpecialWeight (int dim, int cellLID, Array< double > &w) const
Store the intersection/quadrature points for the curve/surf integral <br>
for a curve or surf integral we need some quadrature points along the curve in one curve
These

bool IsCurvePointsValid () const
void setCurvePointsValid (bool val) const
void flushCurvePoints () const
bool hasCurvePoints (int maxCellLID, int curveID) const
void setCurvePoints (int maxCellLID, int curveID, Array< Point > &points, Array< Point > &derivs, Array< Point > &normals) const
void getCurvePoints (int maxCellLID, int curveID, Array< Point > &points, Array< Point > &derivs, Array< Point > &normals) const

Static Public Member Functions

static CellReordererdefaultReorderer ()

Private Member Functions

IncrementallyCreatableMeshcreatableMesh ()
bool checkVertexConsistency (std::ostream &os) const
bool checkCellConsistency (std::ostream &os, int dim) const
bool checkRemoteEntity (std::ostream &os, int p, int dim, int gid, int owner, bool mustExist, int &lid) const
bool testIdentity (std::ostream &os, int a, int b, const std::string &msg) const
bool testIdentity (std::ostream &os, const Array< int > &a, const Array< int > &b, const std::string &msg) const

Related Functions

(Note that these are not member functions.)

int findEnclosingCell (const Mesh &mesh, int cellDim, int initialGuessLID, const double *x)
bool cellContainsPoint (const Mesh &mesh, int cellDim, int cellLID, const double *x, Array< int > &facetLID)
double orient2D (const double *a, const double *b, const double *x)
void maximalNeighbors (const Mesh &mesh, int cellDim, int cellLID, const Array< int > &facetLID, std::list< int > &rtn)
Point pullback (const Mesh &mesh, int cellDim, int cellLID, const double *x)


Detailed Description

Mesh is the user-level object representing discrete geometry. The Mesh class is a handle to a MeshBase, which is an abstract interface for meshes.

Definition at line 52 of file SundanceMesh.hpp.


Constructor & Destructor Documentation

Sundance::Mesh::Mesh (  )  [inline]

Empty ctor

Definition at line 57 of file SundanceMesh.hpp.

Sundance::Mesh::Mesh ( Handleable< MeshBase > *  rawPtr  )  [inline]

Construct a Mesh with a raw pointer to a MeshBase

Definition at line 57 of file SundanceMesh.hpp.

Sundance::Mesh::Mesh ( const RefCountPtr< MeshBase > &  smartPtr  )  [inline]

Construct a Mesh with a smart pointer to a MeshBase

Definition at line 57 of file SundanceMesh.hpp.


Member Function Documentation

int Sundance::Mesh::addElement ( int  globalIndex,
const Array< int > &  vertLID,
int  ownerProcID,
int  label 
) [inline]

int Sundance::Mesh::addVertex ( int  globalIndex,
const Point x,
int  ownerProcID,
int  label 
) [inline]

bool Sundance::Mesh::allowsHangingHodes (  )  const [inline]

Function returns true if the mesh allows hanging nodes (by refinement), false otherwise

Definition at line 406 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::DOFMapBuilder::makeMap().

void Sundance::Mesh::assignIntermediateCellGIDs ( int  cellDim  )  [inline]

CellType Sundance::Mesh::cellType ( int  cellDim  )  const [inline]

Point Sundance::Mesh::centroid ( int  cellDim,
int  cellLID 
) const [inline]

Return the centroid position of the cellLID-th cell of dimension cellDim.

Definition at line 89 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::UniformRefinementPair::check(), Sundance::AToCDensitySampler::init(), and Sundance::UniformRefinementPair::refineTriMesh().

bool Mesh::checkCellConsistency ( std::ostream &  os,
int  dim 
) const [private]

bool Mesh::checkConsistency ( std::ostream &  os  )  const

Test the consistency of the mesh numbering scheme across processors. This is meant as a check on Sundance's internal logic rather than as a check on the validity of a user's mesh.

Definition at line 80 of file SundanceMesh.cpp.

References assignIntermediateCellGIDs(), checkCellConsistency(), checkVertexConsistency(), comm(), and spatialDim().

bool Mesh::checkConsistency ( const std::string &  filename  )  const

Test the consistency of the mesh numbering scheme across processors. This is meant as a check on Sundance's internal logic rather than as a check on the validity of a user's mesh.

Definition at line 68 of file SundanceMesh.cpp.

References comm(), and Sundance::toString().

bool Mesh::checkRemoteEntity ( std::ostream &  os,
int  p,
int  dim,
int  gid,
int  owner,
bool  mustExist,
int &  lid 
) const [private]

bool Mesh::checkVertexConsistency ( std::ostream &  os  )  const [private]

const MPIComm& Sundance::Mesh::comm (  )  const [inline]

Get the MPI communicator over which the mesh is distributed

Definition at line 330 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::DOFMapBuilder::allFuncsAreOmnipresent(), Sundance::RefinementTransformation::apply(), Sundance::ExtrusionMeshTransformation::apply(), checkCellConsistency(), checkConsistency(), checkRemoteEntity(), checkVertexConsistency(), Sundance::DOFMapBuilder::comm(), Sundance::DOFMapBase::comm(), Sundance::SubmaximalNodalDOFMap::computeOffsets(), Sundance::PartialElementDOFMap::computeOffsets(), Sundance::NodalDOFMapHN::computeOffsets(), Sundance::NodalDOFMap::computeOffsets(), Sundance::MixedDOFMapHN::computeOffsets(), Sundance::MixedDOFMap::computeOffsets(), Sundance::InhomogeneousDOFMapHN::computeOffsets(), Sundance::HomogeneousDOFMap::computeOffsets(), Sundance::FunctionalEvaluator::fdGradientCheck(), Sundance::InhomogeneousEdgeLocalizedDOFMap::InhomogeneousEdgeLocalizedDOFMap(), Sundance::InhomogeneousNodalDOFMap::InhomogeneousNodalDOFMap(), Sundance::MixedDOFMapHN::initMap(), Sundance::MixedDOFMap::initMap(), Sundance::InhomogeneousDOFMapHN::initMap(), Sundance::DiscreteSpace::initVectorSpace(), Sundance::FieldWriterBase::myRank(), Sundance::FieldWriterBase::nProc(), Sundance::SpatiallyHomogeneousDOFMapBase::print(), Sundance::HomogeneousDOFMap::print(), Sundance::UniformRefinementPair::refineTriMesh(), Sundance::MixedDOFMapHN::shareDOFs(), Sundance::MixedDOFMap::shareDOFs(), Sundance::InhomogeneousDOFMapHN::shareDOFs(), Sundance::HomogeneousDOFMap::shareDOFs(), Sundance::SubmaximalNodalDOFMap::shareRemoteDOFs(), Sundance::PartialElementDOFMap::shareRemoteDOFs(), Sundance::NodalDOFMapHN::shareRemoteDOFs(), Sundance::NodalDOFMap::shareRemoteDOFs(), Sundance::SubmaximalNodalDOFMap::SubmaximalNodalDOFMap(), and Sundance::VerboseFieldWriter::write().

IncrementallyCreatableMesh * Mesh::creatableMesh (  )  [private]

static CellReorderer& Sundance::Mesh::defaultReorderer (  )  [inline, static]

Definition at line 371 of file SundanceMesh.hpp.

void Mesh::dump ( const std::string &  filename  )  const

const int* Sundance::Mesh::elemZeroFacetView ( int  cellLID  )  const [inline]

Return a view of an element's zero-dimensional facets

Definition at line 209 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::UniformRefinementPair::refineTriMesh().

void Sundance::Mesh::estimateNumElements ( int  nElems  )  [inline]

Allocate space for an estimated number of elements

Definition at line 339 of file SundanceMesh.hpp.

References creatableMesh(), and Sundance::IncrementallyCreatableMesh::estimateNumElements().

void Sundance::Mesh::estimateNumVertices ( int  nPts  )  [inline]

Allocate space for an estimated number of vertices

Definition at line 335 of file SundanceMesh.hpp.

References creatableMesh(), and Sundance::IncrementallyCreatableMesh::estimateNumVertices().

int Sundance::Mesh::facetLID ( int  cellDim,
int  cellLID,
int  facetDim,
int  facetIndex,
int &  facetOrientation 
) const [inline]

void Sundance::Mesh::flushCurvePoints (  )  const [inline]

deletes all the curve points

Definition at line 467 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

void Sundance::Mesh::flushSpecialWeights (  )  const [inline]

deletes all the special weights

Definition at line 441 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

void Sundance::Mesh::freezeTopology (  )  [inline]

Set<int> Sundance::Mesh::getAllLabelsForDimension ( int  cellDim  )  const [inline]

Get the list of all labels defined for cells of the given dimension

Definition at line 312 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::SerialPartitionerBase::makeMeshParts(), numLabels(), and Sundance::ExodusWriter::writeMesh().

virtual void Sundance::Mesh::getCellDiameters ( int  cellDim,
const Array< int > &  cellLID,
Array< double > &  diameters 
) const [inline, virtual]

Compute the diameters of a batch of cells, result via reference argument

Parameters:
cellDim dimension of the cells whose diameters are to be computed
cellLID local indices of the cells for which diameters are to be computed
diameters reference to the array of cell diameters

Definition at line 149 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CurveEvalMediator::evalCellDiameterExpr().

void Sundance::Mesh::getCofacets ( int  cellDim,
int  cellLID,
int  cofacetDim,
Array< int > &  cofacetLIDs 
) const [inline]

Find the cofacets of the given cell

Parameters:
cellDim dimension of the cell whose cofacets are being obtained
cellLID local index of the cell whose cofacets are being obtained
cofacetDim dimension of the cofacets to get
cofacetLIDs LIDs of the cofacet

Definition at line 269 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CellSet::areFacetsOf(), Sundance::UniformRefinementPair::check(), Sundance::AToCPointLocator::fillMaximalNeighbors(), Sundance::SerialPartitionerBase::getNeighbors(), Sundance::UniformRefinementPair::lookupEdge(), Sundance::SerialPartitionerBase::makeMeshParts(), and Sundance::maximalNeighbors().

void Sundance::Mesh::getCurvePoints ( int  maxCellLID,
int  curveID,
Array< Point > &  points,
Array< Point > &  derivs,
Array< Point > &  normals 
) const [inline]

Gets the points, curve derivatives and curve normals for one maxCell needed for curve/surf integral

Definition at line 477 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CurveEvalMediator::evalCoordExpr(), Sundance::CurveEvalMediator::evalCurveNormExpr(), and Sundance::CurveQuadratureIntegral::updateRefCellInformation().

void Sundance::Mesh::getFacetArray ( int  cellDim,
int  cellLID,
int  facetDim,
Array< int > &  facetLIDs,
Array< int > &  facetOrientations 
) const [inline]

void Sundance::Mesh::getFacetLIDs ( int  cellDim,
const Array< int > &  cellLID,
int  facetDim,
Array< int > &  facetLID,
Array< int > &  facetOrientations 
) const [inline]

void Sundance::Mesh::getJacobians ( int  cellDim,
const Array< int > &  cellLID,
CellJacobianBatch jBatch 
) const [inline]

Compute the jacobians of a batch of cells, returning the result via reference argument

Parameters:
cellDim dimension of the cells whose Jacobians are to be computed
cellLID local indices of the cells for which Jacobians are to be computed
jBatch reference to the resulting Jacobian batch

Definition at line 135 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CurveIntegralCalc::getCurveQuadPoints_line(), Sundance::CurveIntegralCalc::getCurveQuadPoints_polygon(), Sundance::StdFwkEvalMediator::setCellBatch(), and Sundance::StdFwkEvalMediator::setupFacetTransformations().

void Sundance::Mesh::getLabels ( int  cellDim,
const Array< int > &  cellLID,
Array< int > &  labels 
) const [inline]

Get the labels for a batch of cells

Definition at line 304 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::LabelCellPredicate::testBatch().

void Sundance::Mesh::getLIDsForLabel ( int  cellDim,
int  label,
Array< int > &  cellLIDs 
) const [inline]

Get the cells associated with a specified label. The array cellLID will be filled with those cells of dimension cellDim having the given label.

Definition at line 326 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::SerialPartitionerBase::makeMeshParts(), and Sundance::ExodusWriter::writeMesh().

void Sundance::Mesh::getMaxCofacetLIDs ( const Array< int > &  cellLIDs,
MaximalCofacetBatch cofacets 
) const [inline]

Get the LIDs of the maximal cofacets for a batch of codimension-one cells.

Parameters:
cellLIDs [in] array of LIDs of the cells whose cofacets are being obtained
cofacets [out] the batch of cofacets

Definition at line 255 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::ExodusWriter::writeMesh().

void Sundance::Mesh::getSpecialWeight ( int  dim,
int  cellLID,
Array< double > &  w 
) const [inline]

bool Sundance::Mesh::hasCurvePoints ( int  maxCellLID,
int  curveID 
) const [inline]

verifies if the specified maxCell has already precalculated quadrature point for one curve

Definition at line 470 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CurveEvalMediator::evalCoordExpr(), Sundance::CurveEvalMediator::evalCurveNormExpr(), and Sundance::CurveQuadratureIntegral::updateRefCellInformation().

bool Sundance::Mesh::hasGID ( int  cellDim,
int  globalIndex 
) const [inline]

Determine whether a given cell GID exists on this processor

Definition at line 282 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by checkRemoteEntity(), and Sundance::TriangleMeshReader::readSides().

bool Sundance::Mesh::hasIntermediateGIDs ( int  cellDim  )  const [inline]

Definition at line 385 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by assignIntermediateCellGIDs().

bool Sundance::Mesh::hasSpecialWeight ( int  dim,
int  cellLID 
) const [inline]

verifies if the specified cell with the given dimension has special weights

Definition at line 444 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::TrapesoidQuadrature::getAdaptedWeights(), Sundance::GaussLobattoQuadrature::getAdaptedWeights(), and Sundance::GaussianQuadrature::getAdaptedWeights().

int Sundance::Mesh::id (  )  const [inline]

int Sundance::Mesh::indexInParent ( int  maxCellLID  )  const [inline]

Returns the index in the parent maxdim Cell of the refinement tree

Parameters:
maxCellLID [in] the LID of the cell

Definition at line 415 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::NodalDOFMapHN::getPointLIDsForHN().

bool Sundance::Mesh::IsCurvePointsValid (  )  const [inline]

Definition at line 461 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

bool Sundance::Mesh::isElementHangingNode ( int  cellDim,
int  cellLID 
) const [inline]

Function returns true if the specified element is a "hanging" element false otherwise

Definition at line 410 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

bool Sundance::Mesh::IsSpecialWeightValid (  )  const [inline]

returns the status of the special weights if they are valid
These weights are usually computed for one setting of the curve (Adaptive Cell Integration)

Definition at line 434 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::TrapesoidQuadrature::getAdaptedWeights(), Sundance::GaussLobattoQuadrature::getAdaptedWeights(), and Sundance::GaussianQuadrature::getAdaptedWeights().

int Sundance::Mesh::label ( int  cellDim,
int  cellLID 
) const [inline]

int Sundance::Mesh::mapGIDToLID ( int  cellDim,
int  globalIndex 
) const [inline]

int Sundance::Mesh::mapLIDToGID ( int  cellDim,
int  localIndex 
) const [inline]

int Sundance::Mesh::maxChildren (  )  const [inline]

How many children has a refined element.
This function provides information of either we have bi or trisection

Definition at line 420 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

int Sundance::Mesh::maxCofacetLID ( int  cellDim,
int  cellLID,
int  cofacetIndex,
int &  facetIndex 
) const [inline]

Return the local ID of a maximal cofacet of a cell

Parameters:
cellDim dimension of the cell whose cofacets are being obtained
cellLID local index of the cell whose cofacets are being obtained
cofacetIndex [in] index of the maximal cell into the list of the cell's cofacets
facetIndex [out] index of the calling cell into the list of the maximal cell's facets

Definition at line 242 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::InhomogeneousDOFMapHN::allowedFuncsOnCellBatch(), Sundance::PartialElementDOFMap::getDOFsForCellBatch(), Sundance::NodalDOFMapHN::getDOFsForCellBatch(), Sundance::NodalDOFMapHN::getTrafoMatrixForFacet(), Sundance::MixedDOFMapHN::getTrafoMatrixForFacet(), Sundance::InhomogeneousDOFMapHN::getTrafoMatrixForFacet(), and Sundance::StdFwkEvalMediator::setupFacetTransformations().

const MeshEntityOrder& Sundance::Mesh::meshOrder (  )  const [inline]

Get the ordering convention used by this mesh.

Definition at line 63 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Point Sundance::Mesh::nodePosition ( int  i  )  const [inline]

const double* Sundance::Mesh::nodePositionView ( int  i  )  const [inline]

Return a view of the i-th node's position

Definition at line 83 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::cellContainsPoint(), Sundance::AToCPointLocator::cellContainsPoint(), Sundance::pullback(), and Sundance::volume().

int Sundance::Mesh::numCells ( int  dim  )  const [inline]

Get the number of cells having dimension dim

Definition at line 73 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::MixedDOFMapHN::allocate(), Sundance::MixedDOFMap::allocate(), Sundance::InhomogeneousDOFMapHN::allocate(), Sundance::HomogeneousDOFMap::allocate(), Sundance::RefinementTransformation::apply(), Sundance::ExtrusionMeshTransformation::apply(), Sundance::AToCPointLocator::AToCPointLocator(), Sundance::MixedDOFMapHN::buildMaximalDofTable(), Sundance::MixedDOFMap::buildMaximalDofTable(), Sundance::InhomogeneousDOFMapHN::buildMaximalDofTable(), Sundance::HomogeneousDOFMap::buildMaximalDofTable(), Sundance::CellIterator::CellIterator(), Sundance::UniformRefinementPair::check(), checkCellConsistency(), checkVertexConsistency(), Sundance::ExodusMeshReader::fillMesh(), Sundance::MeshSourceBase::getMesh(), Sundance::SerialPartitionerBase::getNeighbors(), Sundance::CubicHermite::getVertexH(), Sundance::InhomogeneousDOFMapHN::InhomogeneousDOFMapHN(), Sundance::InhomogeneousEdgeLocalizedDOFMap::InhomogeneousEdgeLocalizedDOFMap(), Sundance::InhomogeneousNodalDOFMap::InhomogeneousNodalDOFMap(), Sundance::AToCDensitySampler::init(), Sundance::InhomogeneousDOFMapHN::initMap(), Sundance::SubsetCellFilter::internalGetCells(), Sundance::RefinementTransformation::meshToRivara(), Sundance::MixedDOFMapHN::MixedDOFMapHN(), Sundance::PointData::nearestMeshPoint(), Sundance::SpatiallyHomogeneousDOFMapBase::print(), Sundance::InhomogeneousNodalDOFMap::print(), Sundance::InhomogeneousEdgeLocalizedDOFMap::print(), Sundance::HomogeneousDOFMap::print(), Sundance::readNodalFields(), Sundance::readSerialGridField(), Sundance::UniformRefinementPair::refineTriMesh(), Sundance::StdFwkEvalMediator::setupFacetTransformations(), Sundance::unfoldPeriodicDiscreteFunction(), Sundance::unfoldPeriodicMesh(), Sundance::CToAInterpolator::updateField(), Sundance::VerboseFieldWriter::write(), Sundance::MatlabWriter::write(), Sundance::DSVWriter::write(), Sundance::VTKWriter::writeCells(), Sundance::TriangleWriter::writeCells(), Sundance::VTKWriter::writeDataArray(), Sundance::TriangleWriter::writeEdges(), Sundance::TriangleWriter::writeFaces(), Sundance::ExodusWriter::writeFields(), Sundance::ExodusWriter::writeMesh(), Sundance::TriangleWriter::writeParallelInfo(), Sundance::ExodusWriter::writeParallelInfo(), Sundance::VTKWriter::writePoints(), and Sundance::TriangleWriter::writePoints().

int Sundance::Mesh::numFacets ( int  cellDim,
int  cellLID,
int  facetDim 
) const [inline]

virtual int Sundance::Mesh::numLabels ( int  cellDim  )  const [inline, virtual]

Return the number of labels associated with the given dimension.

Definition at line 318 of file SundanceMesh.hpp.

References getAllLabelsForDimension(), and Sundance::Set< Key, Compare >::size().

Referenced by Sundance::ExodusWriter::writeMesh().

int Sundance::Mesh::numMaxCofacets ( int  cellDim,
int  cellLID 
) const [inline]

void Sundance::Mesh::outwardNormals ( const Array< int > &  cellLIDs,
Array< Point > &  outwardNormals 
) const [inline]

Get the outward normals for the batch of cells of dimension spatialDim()-1. If any cell in the batch is not on the boundary, an exception is thrown.

Parameters:
cellLIDs [in] LIDs for the cells whose normals are to be computed.
outwardNormals [out] Outward normal unit vectors for each cell in the batch.

Definition at line 103 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CurveEvalMediator::evalCellVectorExpr().

int Sundance::Mesh::ownerProcID ( int  cellDim,
int  cellLID 
) const [inline]

void Sundance::Mesh::pushForward ( int  cellDim,
const Array< int > &  cellLID,
const Array< Point > &  refQuadPts,
Array< Point > &  physQuadPts 
) const [inline]

const CellReordererImplemBase* Sundance::Mesh::reorderer (  )  const [inline]

Set the reordering method to be used with this mesh

Definition at line 366 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

void Sundance::Mesh::returnParentFacets ( int  childCellLID,
int  dimFacets,
Array< int > &  facetsLIDs,
int &  parentCellLIDs 
) const [inline]

void Sundance::Mesh::setCurvePoints ( int  maxCellLID,
int  curveID,
Array< Point > &  points,
Array< Point > &  derivs,
Array< Point > &  normals 
) const [inline]

Sets the points, curve derivatives and curve normals for one maxCell needed for curve/surf integral

Definition at line 473 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CurveEvalMediator::evalCoordExpr(), Sundance::CurveEvalMediator::evalCurveNormExpr(), and Sundance::CurveQuadratureIntegral::updateRefCellInformation().

void Sundance::Mesh::setCurvePointsValid ( bool  val  )  const [inline]

Definition at line 464 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

void Sundance::Mesh::setLabel ( int  cellDim,
int  cellLID,
int  label 
) [inline]

void Sundance::Mesh::setReorderer ( const CellReorderer reorderer  )  [inline]

Set the reordering method to be used with this mesh

Definition at line 362 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

void Sundance::Mesh::setSpecialWeight ( int  dim,
int  cellLID,
Array< double > &  w 
) const [inline]

void Sundance::Mesh::setSpecialWeightValid ( bool  val  )  const [inline]

specifies if the special weights are valid
if this is false then usually the special weights have to be recomputed

Definition at line 438 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

int Sundance::Mesh::spatialDim (  )  const [inline]

Get the spatial dimension of the mesh

Definition at line 68 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::MixedDOFMapHN::allocate(), Sundance::MixedDOFMap::allocate(), Sundance::InhomogeneousDOFMapHN::allocate(), Sundance::RefinementTransformation::apply(), Sundance::ExtrusionMeshTransformation::apply(), Sundance::DOFMapBase::cellDim(), Sundance::CellIterator::CellIterator(), checkConsistency(), checkVertexConsistency(), Sundance::CurveQuadratureIntegral::CurveQuadratureIntegral(), Sundance::SideCellFilter::dimension(), Sundance::MaximalCellFilter::dimension(), Sundance::DiscreteSpace::DiscreteSpace(), Sundance::CurveEvalMediator::evalCoordExpr(), Sundance::ExodusMeshReader::fillMesh(), Sundance::AToCPointLocator::findEnclosingCell(), Sundance::DOFMapBuilder::funcDomains(), Sundance::GaussLobattoQuadrature::getAdaptedQuadWeights_surf(), Sundance::GaussLobattoQuadrature::getAdaptedWeights(), Sundance::FeketeQuadrature::getAdaptedWeights(), Sundance::CurveIntegralCalc::getCurveQuadPoints(), Sundance::MeshSourceBase::getMesh(), Sundance::MeshSource::getMesh(), Sundance::SerialPartitionerBase::getNeighbors(), Sundance::HNDoFMapBase::getSpacialMeshDim(), Sundance::H1Norm(), Sundance::H1Seminorm(), Sundance::PartialElementDOFMap::init(), Sundance::SideCellFilter::internalGetCells(), Sundance::MaximalCellFilter::internalGetCells(), Sundance::DOFMapBuilder::isWholeDomain(), Sundance::SerialPartitionerBase::makeMeshParts(), Sundance::StdFwkEvalMediator::maxCellDim(), Sundance::InhomogeneousEdgeLocalizedDOFMap::meshDimension(), Sundance::RefinementTransformation::meshToRivara(), Sundance::SpatiallyHomogeneousDOFMapBase::print(), Sundance::printCell(), Sundance::readbackTester(), Sundance::TriangleMeshReader::readElems(), Sundance::BamgMeshReader::readMesh(), Sundance::TriangleMeshReader::readSides(), Sundance::DOFMapBuilder::reduceCellFilters(), Sundance::UniformRefinementPair::refineTriMesh(), Sundance::serialPartition(), Sundance::StdFwkEvalMediator::setupFacetTransformations(), Sundance::PartialElementDOFMap::shareRemoteDOFs(), Sundance::CellCurvePredicate::testBatch(), Sundance::UniformRefinementPair::UniformRefinementPair(), Sundance::CurveIntegralCalc::use3DSurfQuadrature(), Sundance::CurveIntegralCalc::usePolygoneCurveQuadrature(), Sundance::VerboseFieldWriter::write(), Sundance::VTKWriter::writeCells(), Sundance::TriangleWriter::writeCells(), Sundance::VTKWriter::writeDataArray(), Sundance::ExodusWriter::writeFields(), Sundance::ExodusWriter::writeMesh(), Sundance::TriangleWriter::writeParallelInfo(), Sundance::ExodusWriter::writeParallelInfo(), Sundance::VTKWriter::writePoints(), and Sundance::TriangleWriter::writePoints().

void Sundance::Mesh::tangentsToEdges ( const Array< int > &  cellLIDs,
Array< Point > &  tangentVectors 
) const [inline]

Get tangent vectors for a batch of edges

Parameters:
cellLIDs [in] LIDs for the cells whose tangents are to be computed.
tangentVectors [out] Unit tangents for each cell

Definition at line 116 of file SundanceMesh.hpp.

References Playa::Handle< MeshBase >::ptr().

Referenced by Sundance::CurveEvalMediator::evalCellVectorExpr().

bool Mesh::testIdentity ( std::ostream &  os,
const Array< int > &  a,
const Array< int > &  b,
const std::string &  msg 
) const [private]

Definition at line 299 of file SundanceMesh.cpp.

bool Mesh::testIdentity ( std::ostream &  os,
int  a,
int  b,
const std::string &  msg 
) const [private]

Definition at line 288 of file SundanceMesh.cpp.

Referenced by checkCellConsistency().


Friends And Related Function Documentation

bool cellContainsPoint ( const Mesh mesh,
int  cellDim,
int  cellLID,
const double *  x,
Array< int > &  facetLID 
) [related]

Test whether a point is enclosed in a cell. The cell is assumed to be simplicial.

Definition at line 44 of file SundanceGeomUtils.cpp.

int findEnclosingCell ( const Mesh mesh,
int  cellDim,
int  initialGuessLID,
const double *  x 
) [related]

Return the LID of the maximal cell that contains the point x. If the point lays on an edge between two or more cells, this will return the first of the those cells encountered on a breadth-first search starting at the initial guess.

Definition at line 133 of file SundanceGeomUtils.cpp.

void maximalNeighbors ( const Mesh mesh,
int  cellDim,
int  cellLID,
const Array< int > &  facetLID,
std::list< int > &  rtn 
) [related]

Get the list of maximal neighbors of a cell

Definition at line 212 of file SundanceGeomUtils.cpp.

double orient2D ( const double *  a,
const double *  b,
const double *  x 
) [related]

Tests orientation of a point relative to a line.

Definition at line 122 of file SundanceGeomUtils.cpp.

Point pullback ( const Mesh mesh,
int  cellDim,
int  cellLID,
const double *  x 
) [related]

Pullback a point to local coordinates within a cell

Definition at line 165 of file SundanceGeomUtils.cpp.

Site Contact