Public Member Functions | |
Constructors/Destructor | |
MeshBase (int dim, const MPIComm &comm, const MeshEntityOrder &meshOrder) | |
| |
virtual | ~MeshBase () |
| |
Topological Information | |
const MeshEntityOrder & | meshOrder () const |
Get the ordering convention used by this mesh. | |
int | spatialDim () const |
Get the spatial dimension of the mesh. | |
virtual int | numCells (int cellDim) const =0 |
Get the number of local cells having dimension cellDim. | |
virtual int | numFacets (int cellDim, int cellLID, int facetDim) const =0 |
Return the number of facets of the given relative cell. | |
virtual int | facetLID (int cellDim, int cellLID, int facetDim, int facetIndex, int &facetOrientation) const =0 |
Return the LID of a single facet cell (and optionally its orientation) with respect to a relative parent cell. | |
virtual void | getFacetLIDs (int cellDim, const Array< int > &cellLIDs, int facetDim, Array< int > &facetLIDs, Array< int > &facetOrientations) const =0 |
Return an array containing the LIDs of facets of dimension facetDim for the given batch of relative parent cells. | |
void | getFacetArray (int cellDim, int cellLID, int facetDim, Array< int > &facetLIDs, Array< int > &facetOrientations) const |
Return an array containing the LIDs of the facets of dimension facetDim of the single relative parent cell (optionally also returning the facet orientations). | |
virtual const int * | elemZeroFacetView (int maxCellLID) const |
Return a view of an array of LIDs for a maximum-dimensional cell's zero-dimensional facets (i.e. vertexes). | |
virtual int | numMaxCofacets (int cellDim, int cellLID) const =0 |
Return the number of maximal co-facets of the given cell. | |
virtual int | maxCofacetLID (int cellDim, int cellLID, int cofacetIndex, int &facetIndex) const =0 |
Return the LID of a maximal co-facet of a cell. | |
virtual void | getMaxCofacetLIDs (const Array< int > &cellLIDs, MaximalCofacetBatch &cofacets) const |
virtual void | getCofacets (int cellDim, int cellLID, int cofacetDim, Array< int > &cofacetLIDs) const =0 |
Return an array of the LIDs of all of the co-facets for a given relative cell. | |
virtual CellType | cellType (int cellDim) const =0 |
Get the cell type of the given cell dimension. | |
virtual int | label (int cellDim, int cellLID) const =0 |
Get the label of the given cell. | |
void | getLabels (int cellDim, const Array< int > &cellLIDs, Array< int > &labels) const |
Get the labels for a batch of cells. | |
virtual void | setLabel (int cellDim, int cellLID, int label)=0 |
Set the label for the given cell. | |
virtual Set< int > | getAllLabelsForDimension (int cellDim) const |
virtual void | getLIDsForLabel (int cellDim, int label, Array< int > &cellLIDs) const |
Geometric Information | |
virtual Point | nodePosition (int vertexLID) const =0 |
Return the position of a local vertex. | |
virtual const double * | nodePositionView (int vertexLID) const =0 |
Return a const view into an raw array for the position of a local vertex. | |
virtual Point | centroid (int cellDim, int cellLID) const |
Return the centroid of a cell. | |
virtual void | getJacobians (int cellDim, const Array< int > &cellLID, CellJacobianBatch &jBatch) const |
Compute (or get) the Jacobians for a batch of cells. | |
virtual void | getCellDiameters (int cellDim, const Array< int > &cellLIDs, Array< double > &diameters) const |
Compute the diameters of a batch of cells. | |
virtual void | outwardNormals (const Array< int > &cellLIDs, Array< Point > &outwardNormals) const |
virtual void | tangentsToEdges (const Array< int > &cellLIDs, Array< Point > &tangenVectors) const |
virtual void | pushForward (int cellDim, const Array< int > &cellLIDs, const Array< Point > &refPts, Array< Point > &physPts) const |
Map points from a reference cell to physical points for a batch of cells. | |
Parallel Information | |
const MPIComm & | comm () const |
Return the MPI communicator over which this mesh is distributed. | |
virtual int | ownerProcID (int cellDim, int cellLID) const =0 |
Return the rank of the processor that owns the given cell. | |
virtual bool | hasGID (int cellDim, int cellGID) const =0 |
Determine whether a given cell GID exists on this processor. | |
virtual int | mapGIDToLID (int cellDim, int cellGID) const =0 |
Find the LID of a cell given its GID. | |
virtual int | mapLIDToGID (int cellDim, int cellLID) const =0 |
Find the global ID of a cell given its LID. | |
virtual bool | hasIntermediateGIDs (int cellDim) const =0 |
Return if cells of dimension cellDim have been assigned global IDs or not. | |
virtual void | assignIntermediateCellGIDs (int cellDim)=0 |
Assign global IDs to cells of dimension cellDim. | |
Reordering | |
void | setReorderer (const CellReorderer &reorderer) |
Set the reordering strategy to be used with this mesh. | |
const CellReordererImplemBase * | reorderer () const |
Get the reordering strategy to be used with this mesh. | |
Functions for Mesh with hanging nodes | |
virtual bool | allowsHangingHodes () const |
virtual bool | isElementHangingNode (int cellDim, int cellLID) const |
virtual int | indexInParent (int maxCellLID) const |
virtual int | maxChildren () const |
virtual void | returnParentFacets (int childCellLID, int dimFacets, Array< int > &facetsLIDs, int &parentCellLIDs) const |
Store special weights in the mesh (for Adaptive Cell Integration) | |
virtual bool | IsSpecialWeightValid () const |
virtual void | setSpecialWeightValid (bool val) const |
virtual void | flushSpecialWeights () const |
virtual bool | hasSpecialWeight (int dim, int cellLID) const |
virtual void | setSpecialWeight (int dim, int cellLID, Array< double > &w) const |
virtual void | getSpecialWeight (int dim, int cellLID, Array< double > &w) const |
Static Public Member Functions | |
Output | |
static bool & | staggerOutput () |
Set whether to stagger output in parallel. Set to true for readable output in parallel debugging sessions. | |
Private Attributes | |
int | dim_ |
MPIComm | comm_ |
MeshEntityOrder | order_ |
RCP< CellReordererImplemBase > | reorderer_ |
bool | validWeights_ |
Array< Sundance::Map< int, Array< double > > > | specialWeights_ |
bool | curvePoints_Are_Valid_ |
int | nrCurvesForIntegral_ |
Array< Sundance::Map< int, Array< Point > > > | curvePoints_ |
Array< Sundance::Map< int, Array< Point > > > | curveDerivative_ |
Array< Sundance::Map< int, Array< Point > > > | curveNormal_ |
Sundance::Map< int, int > | curveID_to_ArrayIndex_ |
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 | |
virtual bool | IsCurvePointsValid () const |
virtual void | setCurvePointsValid (bool val) const |
virtual void | flushCurvePoints () const |
virtual bool | hasCurvePoints (int maxCellLID, int curveID) const |
virtual void | setCurvePoints (int maxCellLID, int curveID, Array< Point > &points, Array< Point > &derivs, Array< Point > &normals) const |
virtual void | getCurvePoints (int maxCellLID, int curveID, Array< Point > &points, Array< Point > &derivs, Array< Point > &normals) const |
virtual int | mapCurveID_to_Index (int curveID) const |
Currently, this interface only handles meshes where all cells of a given cell dimension have the same cell type. For example, this only allows meshes with all triangles or all quads in 2D or all tetrahedrals in 3D.
CellType
that lists some common cell types. For example, common cell types are things like vertexes (0D), lines or edges (1D), triangles (2D), and quadrilaterals (2D).
(cellDim,cellLID)
has nf=numFacets(cellDim,cellLID,facetDim)
facets of a particular dimension facetDim
.
Assertion: maxCofacetDim == spatialDim
.
Assertion: vertexCellDim == 0
.
Precondition: 0 <= cellDim <= spatialDim
Precondition: 0 <= cellLID < numCells(cellDim)
, where cellDim
is the dimension of the given cell.
Precondition: ??? <= cellGID < ???
(How do we write this?).
Precondition: 0 <= facetDim < cellDim
, where cellDim
is the dimension of the relative cell
Precondition: 0 <= facetIndex < numFacets(cellDim,cellLID,facetDim)
, where facetDim
is the dimension of the facet of the relative parent cell (cellDim,cellLID)
Precondition: 0 <= cellDim < cofacetDim <= spatialDim
, where cellDim
is the dimension of the relative cell
Precondition: 0 <= cofacetIndex < numMaxCofacets(cellDim,cellLID)
, where (cellDim,cellLID)
is the relative cell.
facetOrientation
is a return argument that is often ignored and would benefit from making it an optional argument.
pushForward()
function. Without a clear definition of the reference cell, these reference points are meaningless. Actually, for maximal flexibility, each cell type should define, at runtime, the coordinate system for the reference cell. Or, we must just all agree on a single set of standard definitions of reference cells for different cell types.
Definition at line 381 of file SundanceMeshBase.hpp.
MeshBase::MeshBase | ( | int | dim, | |
const MPIComm & | comm, | |||
const MeshEntityOrder & | meshOrder | |||
) |
Definition at line 45 of file SundanceMeshBase.cpp.
References curveDerivative_, curveNormal_, curvePoints_, dim_, and specialWeights_.
virtual Sundance::MeshBase::~MeshBase | ( | ) | [inline, virtual] |
virtual bool Sundance::MeshBase::allowsHangingHodes | ( | ) | const [inline, virtual] |
Function returns true if the mesh allows hanging nodes (by refinement), false otherwise
Reimplemented in Sundance::HNMesh2D, and Sundance::HNMesh3D.
Definition at line 930 of file SundanceMeshBase.hpp.
virtual void Sundance::MeshBase::assignIntermediateCellGIDs | ( | int | cellDim | ) | [pure virtual] |
Assign global IDs to cells of dimension cellDim.
cellDim | [in] Dimension of the cell |
hasIntermediateGIDs(cellDim)==true
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
virtual CellType Sundance::MeshBase::cellType | ( | int | cellDim | ) | const [pure virtual] |
Get the cell type of the given cell dimension.
Note: This function by its very definition assumes that all cells of a given dimension have the same cell type within a mesh!
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Point MeshBase::centroid | ( | int | cellDim, | |
int | cellLID | |||
) | const [virtual] |
Return the centroid of a cell.
The default implementation just averages the positions of the zero-dimensional facets (i.e. vertexes).
Definition at line 73 of file SundanceMeshBase.cpp.
References facetLID(), nodePosition(), and numFacets().
Referenced by outwardNormals().
const MPIComm& Sundance::MeshBase::comm | ( | ) | const [inline] |
Return the MPI communicator over which this mesh is distributed.
Definition at line 848 of file SundanceMeshBase.hpp.
References comm_.
Referenced by Sundance::BasicSimplicialMesh::addEdge(), Sundance::BasicSimplicialMesh::addElement(), Sundance::BasicSimplicialMesh::addFace(), Sundance::BasicSimplicialMesh::addVertex(), Sundance::BasicSimplicialMesh::assignIntermediateCellGIDs(), Sundance::BasicSimplicialMesh::printCells(), Sundance::BasicSimplicialMesh::resolveEdgeOwnership(), Sundance::BasicSimplicialMesh::synchronizeGIDNumbering(), and Sundance::BasicSimplicialMesh::synchronizeNeighborLists().
const int * MeshBase::elemZeroFacetView | ( | int | maxCellLID | ) | const [virtual] |
Return a view of an array of LIDs for a maximum-dimensional cell's zero-dimensional facets (i.e. vertexes).
maxCellLID | [in] Local ID of the maximum dimensional cell (i.e. element). |
maxCellLID
must be a maximum-dimensional cell!
cellType(maxCellLID)
.Reimplemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 65 of file SundanceMeshBase.cpp.
virtual int Sundance::MeshBase::facetLID | ( | int | cellDim, | |
int | cellLID, | |||
int | facetDim, | |||
int | facetIndex, | |||
int & | facetOrientation | |||
) | const [pure virtual] |
Return the LID of a single facet cell (and optionally its orientation) with respect to a relative parent cell.
cellDim | [in] Dimension of the parent cell whose facets are being obtained. | |
cellLID | [in] Local ID of the parent cell whose facets are being obtained | |
facetDim | [in] Dimension of the desired facet. | |
facetIndex | [in] The relative index into the list of the cell's facets. | |
facetOrientation | [out] The orientation of the facet w.r.t the parent cell. |
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Referenced by centroid(), getFacetArray(), outwardNormals(), and tangentsToEdges().
void MeshBase::flushCurvePoints | ( | ) | const [virtual] |
detletes all the points and its normals which have been stored
Definition at line 255 of file SundanceMeshBase.cpp.
References curveDerivative_, curveID_to_ArrayIndex_, curveNormal_, curvePoints_, curvePoints_Are_Valid_, and nrCurvesForIntegral_.
void MeshBase::flushSpecialWeights | ( | ) | const [virtual] |
deletes all special weights so those have to be recreated
Definition at line 244 of file SundanceMeshBase.cpp.
References dim_, specialWeights_, and validWeights_.
Set< int > MeshBase::getAllLabelsForDimension | ( | int | cellDim | ) | const [virtual] |
Get the list of all labels defined for cells of the given dimension
Reimplemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 214 of file SundanceMeshBase.cpp.
References label(), numCells(), and Sundance::Set< Key, Compare >::put().
virtual void Sundance::MeshBase::getCellDiameters | ( | int | cellDim, | |
const Array< int > & | cellLIDs, | |||
Array< double > & | diameters | |||
) | const [inline, virtual] |
Compute the diameters of a batch of cells.
cellDim | [in] Dimension of the cells whose diameters are to be computed | |
cellLIDs | [in] Local IDs of the cells for which diameters are to be computed | |
diameters | [out] Array (size = cellLIDs.size() ) of cell diameters. |
Reimplemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 772 of file SundanceMeshBase.hpp.
virtual void Sundance::MeshBase::getCofacets | ( | int | cellDim, | |
int | cellLID, | |||
int | cofacetDim, | |||
Array< int > & | cofacetLIDs | |||
) | const [pure virtual] |
Return an array of the LIDs of all of the co-facets for a given relative cell.
cellDim | [in] Dimension of the relative cell whose co-facets are being obtained | |
cellLID | [in] Local index of the relative cell whose co-facets are being obtained | |
cofacetDim | [in] Dimension of the co-facets to get | |
cofacetLIDs | [out] Array containing the LIDs of the co-facets for the given relative cell (cellDim,cellLID). |
getCofacetArray()
to be consistent with getFacetArray()
! Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
void MeshBase::getCurvePoints | ( | int | maxCellLID, | |
int | curveID, | |||
Array< Point > & | points, | |||
Array< Point > & | derivs, | |||
Array< Point > & | normals | |||
) | const [virtual] |
Gets the points, curve derivatives and curve normals for one maxCell needed for curve/surf integral
Definition at line 288 of file SundanceMeshBase.cpp.
References curveDerivative_, curveNormal_, curvePoints_, mapCurveID_to_Index(), nrCurvesForIntegral_, and SUNDANCE_MSG3.
void MeshBase::getFacetArray | ( | int | cellDim, | |
int | cellLID, | |||
int | facetDim, | |||
Array< int > & | facetLIDs, | |||
Array< int > & | facetOrientations | |||
) | const |
Return an array containing the LIDs of the facets of dimension facetDim of the single relative parent cell (optionally also returning the facet orientations).
cellDim | [in] Dimension of the parent cell whose facets are being obtained. | |
cellLID | [in] Local ID of the parent cell whose facets are being obtained | |
facetDim | [in] Dimension of the desired facets | |
facetLIDs | [out] On exit this array gives the local facet IDs for the parent cell with size = nf , where nf=numFacets(cellDim,cellLID,facetDim) . | |
facetOrientations | [out] On exist, if facetDim > 0 , this array gives the integer orientation of the facet with respect to its parent cell (see above definition of "Facet Orientation"). On exist this array will be resized to size = nf , where nf=numFacets(cellDim,cellLID,facetDim) ). If facetDim==0 this this array argument is ignored! |
facetLID()
. Subclasses can provide a more efficient implementation if desired.
Array<int>*
type so that it can be NULL and therefore ignored (which is a common use case). Definition at line 154 of file SundanceMeshBase.cpp.
References facetLID(), and numFacets().
virtual void Sundance::MeshBase::getFacetLIDs | ( | int | cellDim, | |
const Array< int > & | cellLIDs, | |||
int | facetDim, | |||
Array< int > & | facetLIDs, | |||
Array< int > & | facetOrientations | |||
) | const [pure virtual] |
Return an array containing the LIDs of facets of dimension facetDim for the given batch of relative parent cells.
cellDim | [in] Dimension of the relative parent cells whose facets are being obtained | |
cellLIDs | [in] Array of LIDs for the relative parent cells | |
facetDim | [in] Dimension of the desired facets | |
facetLIDs | [out] On exit this array gives the local facet IDs for all of the cells given in cellLIDs in one flat array with size = cellLIDs.size()*nf , where nf=numFacets(cellDim,cellLIDs[j],facetDim) ) where j can be any index 0 <= j < numCells(cellDim) . Specifically, the local facet IDs for cellLIDs[k] , where k=0...cellLIDs.size()-1 , is given by facetLIDs[k*nf+j] , where j=0...nf-1 . | |
facetOrientations | [out] On exist, if facetDim > 0 , this array gives the integer orientation of the facet with respect to its parent cell (see above definition of "Facet Orientation"). Oon exist this array will be resized to size = cellLIDs.size()*nf , where nf=numFacets(cellDim,cellLID,facetDim) ). Specifically, the local facet orientation for the cell cellLIDs[k], where k=0...cellLIDs.size()-1 , is given by facetOrientations[k*nf+j] , where j=0...nf-1 . If facetDim==0 then this array is ignored. |
Array<int>*
type so that it can be NULL and therefore ignored (which is a common use case). Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
virtual void Sundance::MeshBase::getJacobians | ( | int | cellDim, | |
const Array< int > & | cellLID, | |||
CellJacobianBatch & | jBatch | |||
) | const [inline, virtual] |
Compute (or get) the Jacobians for a batch of cells.
cellDim | [in] Dimension of the cells whose Jacobians are to be computed | |
cellLID | [in] Local IDs of the cells for which Jacobians are to be computed | |
jBatch | [out] Batch of cell Jacobians. |
Reimplemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 746 of file SundanceMeshBase.hpp.
void MeshBase::getLabels | ( | int | cellDim, | |
const Array< int > & | cellLIDs, | |||
Array< int > & | labels | |||
) | const |
Get the labels for a batch of cells.
cellDim | [in] Dimension of the parent cell whose facets are being obtained | |
cellLIDs | [in] Array of cell LIDs | |
labels | [out] On exit, contains an array (size=cellLIDs.size() ) of the labels for each of the given cells. |
Reimplemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 169 of file SundanceMeshBase.cpp.
References label().
void MeshBase::getLIDsForLabel | ( | int | cellDim, | |
int | label, | |||
Array< int > & | cellLIDs | |||
) | const [virtual] |
Get the cells associated with a specified label. The array cellLID will be filled with those cells of dimension cellDim having the given label.
Reimplemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 201 of file SundanceMeshBase.cpp.
References label(), and numCells().
void MeshBase::getMaxCofacetLIDs | ( | const Array< int > & | cellLIDs, | |
MaximalCofacetBatch & | cofacets | |||
) | const [virtual] |
Get the LIDs of the maximal cofacets for a batch of codimension-one cells. The default implementation simply loops over the cells in the cellLID array, taking no advantage of any internal data structures.
cellLIDs | [in] array of LIDs of the cells whose cofacets are being obtained | |
cofacets | [out] | |
facetIndex | [out] index of each calling cell into the list of its maximal cofacet's facets |
Reimplemented in Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 177 of file SundanceMeshBase.cpp.
References Sundance::MaximalCofacetBatch::addSingleCofacet(), Sundance::MaximalCofacetBatch::addTwoCofacets(), maxCofacetLID(), numMaxCofacets(), Sundance::MaximalCofacetBatch::reset(), and spatialDim().
void MeshBase::getSpecialWeight | ( | int | dim, | |
int | cellLID, | |||
Array< double > & | w | |||
) | const [virtual] |
Returns the special weights
Definition at line 239 of file SundanceMeshBase.cpp.
References specialWeights_.
bool MeshBase::hasCurvePoints | ( | int | maxCellLID, | |
int | curveID | |||
) | const [virtual] |
verifies if the specified maxCell has already precalculated quadrature point for one curve
Definition at line 269 of file SundanceMeshBase.cpp.
References curvePoints_, and mapCurveID_to_Index().
virtual bool Sundance::MeshBase::hasGID | ( | int | cellDim, | |
int | cellGID | |||
) | const [pure virtual] |
Determine whether a given cell GID exists on this processor.
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
virtual bool Sundance::MeshBase::hasIntermediateGIDs | ( | int | cellDim | ) | const [pure virtual] |
Return if cells of dimension cellDim have been assigned global IDs or not.
cellDim | [in] Dimension of the cell |
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
bool MeshBase::hasSpecialWeight | ( | int | dim, | |
int | cellLID | |||
) | const [virtual] |
verifies if the specified cell with the given dimension has special weights
Definition at line 228 of file SundanceMeshBase.cpp.
References specialWeights_.
virtual int Sundance::MeshBase::indexInParent | ( | int | maxCellLID | ) | const [inline, virtual] |
Returns the index in the parent maxdim Cell of the refinement tree
maxCellLID | [in] the LID of the cell |
Reimplemented in Sundance::HNMesh2D, and Sundance::HNMesh3D.
Definition at line 940 of file SundanceMeshBase.hpp.
virtual bool Sundance::MeshBase::IsCurvePointsValid | ( | ) | const [inline, virtual] |
virtual bool Sundance::MeshBase::isElementHangingNode | ( | int | cellDim, | |
int | cellLID | |||
) | const [inline, virtual] |
Function returns true if the specified element is a "hanging" element false otherwise
cellDim | [in] should be between 0 , D-1 | |
cellLID | [in] the local ID of the element |
Reimplemented in Sundance::HNMesh2D, and Sundance::HNMesh3D.
Definition at line 936 of file SundanceMeshBase.hpp.
virtual bool Sundance::MeshBase::IsSpecialWeightValid | ( | ) | const [inline, virtual] |
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 962 of file SundanceMeshBase.hpp.
References validWeights_.
virtual int Sundance::MeshBase::label | ( | int | cellDim, | |
int | cellLID | |||
) | const [pure virtual] |
Get the label of the given cell.
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Referenced by getAllLabelsForDimension(), getLabels(), and getLIDsForLabel().
int MeshBase::mapCurveID_to_Index | ( | int | curveID | ) | const [private, virtual] |
Definition at line 300 of file SundanceMeshBase.cpp.
References Sundance::Map< Key, Value, Compare >::containsKey(), curveDerivative_, curveID_to_ArrayIndex_, curveNormal_, curvePoints_, Sundance::Map< Key, Value, Compare >::get(), nrCurvesForIntegral_, Sundance::Map< Key, Value, Compare >::put(), and SUNDANCE_MSG3.
Referenced by getCurvePoints(), hasCurvePoints(), and setCurvePoints().
virtual int Sundance::MeshBase::mapGIDToLID | ( | int | cellDim, | |
int | cellGID | |||
) | const [pure virtual] |
Find the LID of a cell given its GID.
cellDim | [in] Dimension of the cell | |
cellGID | [in] Global ID of the cell |
Postconditions:
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
virtual int Sundance::MeshBase::mapLIDToGID | ( | int | cellDim, | |
int | cellLID | |||
) | const [pure virtual] |
Find the global ID of a cell given its LID.
cellDim | [in] Dimension of the cell | |
cellLID | [in] Local ID of the cell |
returnVal >= 0
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
virtual int Sundance::MeshBase::maxChildren | ( | ) | const [inline, virtual] |
How many children has a refined element.
This function provides information of either we have bi or trisection
Reimplemented in Sundance::HNMesh2D, and Sundance::HNMesh3D.
Definition at line 944 of file SundanceMeshBase.hpp.
virtual int Sundance::MeshBase::maxCofacetLID | ( | int | cellDim, | |
int | cellLID, | |||
int | cofacetIndex, | |||
int & | facetIndex | |||
) | const [pure virtual] |
Return the LID of a maximal co-facet of a cell.
cellDim | [in] Dimension of the cell whose co-facets are being obtained | |
cellLID | [in] Local ID of the cell whose co-facets are being obtained | |
cofacetIndex | [in] Index into the list of the cell's co-facets. | |
facetIndex | [out] Returns the local index into the facet array for the relative cell (cellDim,cellLID) with respect to the maximal co-facet. In other words cellLID==facetLID(spatialDim(),returnVal,cellDim,facetIndex) . |
0 <= cellDim < spatialDim()
facetIndex
an int*
argument and give it a default value of NUL
so that it can be easily ignored! Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Referenced by getMaxCofacetLIDs(), and outwardNormals().
const MeshEntityOrder& Sundance::MeshBase::meshOrder | ( | ) | const [inline] |
Get the ordering convention used by this mesh.
Definition at line 403 of file SundanceMeshBase.hpp.
References order_.
virtual Point Sundance::MeshBase::nodePosition | ( | int | vertexLID | ) | const [pure virtual] |
Return the position of a local vertex.
vertexLID | [in] The LID of the vertex. |
0 <= vertexLID < this->numCells(0)
getVertexPosition(...)
. Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Referenced by centroid(), outwardNormals(), and tangentsToEdges().
virtual const double* Sundance::MeshBase::nodePositionView | ( | int | vertexLID | ) | const [pure virtual] |
Return a const view into an raw array for the position of a local vertex.
vertexLID | [in] The LID of the vertex |
0 <= vertexLID < this->numCells(0)
spatialDim
.getVertexPositionView()
. Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
virtual int Sundance::MeshBase::numCells | ( | int | cellDim | ) | const [pure virtual] |
Get the number of local cells having dimension cellDim.
numLocalCells(cellDim)
. Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Referenced by Sundance::CellReordererImplemBase::end(), getAllLabelsForDimension(), and getLIDsForLabel().
virtual int Sundance::MeshBase::numFacets | ( | int | cellDim, | |
int | cellLID, | |||
int | facetDim | |||
) | const [pure virtual] |
Return the number of facets of the given relative cell.
cellDim | [in] The dimension of the relative cell | |
cellLID | [in] The LID of the relative cell | |
facetDim | [in] The dimension of the facets for the relative cell |
returnVal >= 2
: Every cell has two or more facets of a given dimension. Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Referenced by centroid(), and getFacetArray().
virtual int Sundance::MeshBase::numMaxCofacets | ( | int | cellDim, | |
int | cellLID | |||
) | const [pure virtual] |
Return the number of maximal co-facets of the given cell.
Preconditions:
0 <= cellDim < spatialDim()
Note that if cellDim==spatialDim()-1
and returnVal==1
then this cell must be a boundary cell (i.e. a boundary face in 3D, a boundary edge in 1D, or a boundary node in 1D)!
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Referenced by getMaxCofacetLIDs(), and outwardNormals().
void MeshBase::outwardNormals | ( | const Array< int > & | cellLIDs, | |
Array< Point > & | outwardNormals | |||
) | const [virtual] |
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.
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 84 of file SundanceMeshBase.cpp.
References centroid(), Sundance::cross(), facetLID(), maxCofacetLID(), nodePosition(), numMaxCofacets(), and spatialDim().
virtual int Sundance::MeshBase::ownerProcID | ( | int | cellDim, | |
int | cellLID | |||
) | const [pure virtual] |
Return the rank of the processor that owns the given cell.
If returnVal==comm().getRank()
then this cell is owned by this process.
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
virtual void Sundance::MeshBase::pushForward | ( | int | cellDim, | |
const Array< int > & | cellLIDs, | |||
const Array< Point > & | refPts, | |||
Array< Point > & | physPts | |||
) | const [inline, virtual] |
Map points from a reference cell to physical points for a batch of cells.
cellDim | [in] Dimension of the cells | |
cellLIDs | [in] Local IDs of a batch of cells | |
refPts | [in] Array of points on the single reference cell with respect to the reference cell's coordinate system. Note that the interpretation of these reference points is strictly determined by the coordinate system of the cell type cellType(cellDim) and must be clearly defined by this interface. | |
physPts | [out] Array (size = cellLIDs.size()*refPts.size() ) of the physical points given in a flat array for the batch of cells. Specifically, the physical points for each cell cellLIDs[k] , for k=0...cellLIDs.size()-1 , is given by physPts[k*nrp+j] , for j=0...nrp-1 and nrp=refPts.size() . |
Reimplemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
Definition at line 835 of file SundanceMeshBase.hpp.
const CellReordererImplemBase* Sundance::MeshBase::reorderer | ( | ) | const [inline] |
Get the reordering strategy to be used with this mesh.
Definition at line 919 of file SundanceMeshBase.hpp.
References reorderer_.
virtual void Sundance::MeshBase::returnParentFacets | ( | int | childCellLID, | |
int | dimFacets, | |||
Array< int > & | facetsLIDs, | |||
int & | parentCellLIDs | |||
) | const [inline, virtual] |
Function returns the facets of the parent cell (needed for HN treatment)
childCellLID | [in] the LID of the maxdim cell, whos parents facets we want | |
dimFacets | [in] the dimension of the facets which we want to have | |
facetsLIDs | [out] the LID of the parents facets (all) in the defined order | |
parentCellLIDs | [out] the maxdim parent cell LID |
Reimplemented in Sundance::HNMesh2D, and Sundance::HNMesh3D.
Definition at line 951 of file SundanceMeshBase.hpp.
void MeshBase::setCurvePoints | ( | int | maxCellLID, | |
int | curveID, | |||
Array< Point > & | points, | |||
Array< Point > & | derivs, | |||
Array< Point > & | normals | |||
) | const [virtual] |
Sets the points, curve derivatives and curve normals for one maxCell needed for curve/surf integral
Definition at line 276 of file SundanceMeshBase.cpp.
References curveDerivative_, curveNormal_, curvePoints_, mapCurveID_to_Index(), nrCurvesForIntegral_, and SUNDANCE_MSG3.
virtual void Sundance::MeshBase::setCurvePointsValid | ( | bool | val | ) | const [inline, virtual] |
virtual void Sundance::MeshBase::setLabel | ( | int | cellDim, | |
int | cellLID, | |||
int | label | |||
) | [pure virtual] |
Set the label for the given cell.
Implemented in Sundance::BasicSimplicialMesh, Sundance::HNMesh2D, Sundance::HNMesh3D, Sundance::PeriodicMesh1D, and Sundance::PeriodicSingleCellMesh1D.
void Sundance::MeshBase::setReorderer | ( | const CellReorderer & | reorderer | ) | [inline] |
Set the reordering strategy to be used with this mesh.
Definition at line 915 of file SundanceMeshBase.hpp.
References Sundance::CellReorderer::createInstance(), and reorderer_.
void MeshBase::setSpecialWeight | ( | int | dim, | |
int | cellLID, | |||
Array< double > & | w | |||
) | const [virtual] |
Sets the special weights
Definition at line 235 of file SundanceMeshBase.cpp.
References specialWeights_.
virtual void Sundance::MeshBase::setSpecialWeightValid | ( | bool | val | ) | const [inline, virtual] |
specifies if the special weights are valid
if this is false then usually the special weights have to be recomputed
Definition at line 966 of file SundanceMeshBase.hpp.
References validWeights_.
int Sundance::MeshBase::spatialDim | ( | ) | const [inline] |
Get the spatial dimension of the mesh.
Postconditions:
0 < returnVal <= 3
Definition at line 411 of file SundanceMeshBase.hpp.
References dim_.
Referenced by Sundance::BasicSimplicialMesh::addEdge(), Sundance::BasicSimplicialMesh::addElement(), Sundance::BasicSimplicialMesh::addFace(), Sundance::BasicSimplicialMesh::addVertex(), Sundance::BasicSimplicialMesh::BasicSimplicialMesh(), Sundance::BasicSimplicialMesh::cellToStr(), Sundance::CellReordererImplemBase::end(), Sundance::BasicSimplicialMesh::estimateNumElements(), Sundance::BasicSimplicialMesh::facetLID(), Sundance::HNMesh3D::getCellDiameters(), Sundance::HNMesh2D::getCellDiameters(), Sundance::BasicSimplicialMesh::getCellDiameters(), Sundance::BasicSimplicialMesh::getCofacets(), Sundance::BasicSimplicialMesh::getFacetLIDs(), Sundance::PeriodicSingleCellMesh1D::getJacobians(), Sundance::PeriodicMesh1D::getJacobians(), Sundance::HNMesh3D::getJacobians(), Sundance::HNMesh2D::getJacobians(), Sundance::BasicSimplicialMesh::getJacobians(), getMaxCofacetLIDs(), Sundance::BasicSimplicialMesh::maxCofacetLID(), outwardNormals(), Sundance::BasicSimplicialMesh::printCells(), Sundance::HNMesh3D::pushForward(), Sundance::HNMesh2D::pushForward(), Sundance::BasicSimplicialMesh::pushForward(), and tangentsToEdges().
static bool& Sundance::MeshBase::staggerOutput | ( | ) | [inline, static] |
Set whether to stagger output in parallel. Set to true for readable output in parallel debugging sessions.
This should be normally, as it causes one synchronization point per process.
Definition at line 1022 of file SundanceMeshBase.hpp.
Referenced by Sundance::BasicSimplicialMesh::assignIntermediateCellGIDs(), and Sundance::BasicSimplicialMesh::resolveEdgeOwnership().
void MeshBase::tangentsToEdges | ( | const Array< int > & | cellLIDs, | |
Array< Point > & | tangenVectors | |||
) | const [virtual] |
Get tangent vectors for a batch of edges
cellLIDs | [in] LIDs for the cells whose tangents are to be computed. | |
tangentVectors | [out] Unit tangents for each cell |
Definition at line 132 of file SundanceMeshBase.cpp.
References facetLID(), nodePosition(), and spatialDim().
MPIComm Sundance::MeshBase::comm_ [private] |
Array< Sundance::Map< int , Array<Point> > > Sundance::MeshBase::curveDerivative_ [mutable, private] |
store directional derivative informations to calculate the curve integral
Definition at line 1056 of file SundanceMeshBase.hpp.
Referenced by flushCurvePoints(), getCurvePoints(), mapCurveID_to_Index(), MeshBase(), and setCurvePoints().
Sundance::Map< int , int > Sundance::MeshBase::curveID_to_ArrayIndex_ [mutable, private] |
map the curve ID to index in the previous arrays
Definition at line 1063 of file SundanceMeshBase.hpp.
Referenced by flushCurvePoints(), and mapCurveID_to_Index().
Array< Sundance::Map< int , Array<Point> > > Sundance::MeshBase::curveNormal_ [mutable, private] |
store normal directional used in the curve or in the surf integral
in case of the surf integral it is the cross product from the integral
Definition at line 1060 of file SundanceMeshBase.hpp.
Referenced by flushCurvePoints(), getCurvePoints(), mapCurveID_to_Index(), MeshBase(), and setCurvePoints().
Array< Sundance::Map< int , Array<Point> > > Sundance::MeshBase::curvePoints_ [mutable, private] |
store intersection informations to calculate the curve integral
Definition at line 1053 of file SundanceMeshBase.hpp.
Referenced by flushCurvePoints(), getCurvePoints(), hasCurvePoints(), mapCurveID_to_Index(), MeshBase(), and setCurvePoints().
bool Sundance::MeshBase::curvePoints_Are_Valid_ [mutable, private] |
true if the curve did not moved, false if those points are not reusable
Definition at line 1047 of file SundanceMeshBase.hpp.
Referenced by flushCurvePoints(), IsCurvePointsValid(), and setCurvePointsValid().
int Sundance::MeshBase::dim_ [private] |
Definition at line 1028 of file SundanceMeshBase.hpp.
Referenced by flushSpecialWeights(), MeshBase(), and spatialDim().
int Sundance::MeshBase::nrCurvesForIntegral_ [mutable, private] |
how many curves are participating in curve integrals
Definition at line 1050 of file SundanceMeshBase.hpp.
Referenced by flushCurvePoints(), getCurvePoints(), mapCurveID_to_Index(), and setCurvePoints().
MeshEntityOrder Sundance::MeshBase::order_ [private] |
RCP<CellReordererImplemBase> Sundance::MeshBase::reorderer_ [private] |
Definition at line 1034 of file SundanceMeshBase.hpp.
Referenced by reorderer(), and setReorderer().
Array< Sundance::Map< int , Array<double> > > Sundance::MeshBase::specialWeights_ [mutable, private] |
Object to store the special weights for integration
Definition at line 1042 of file SundanceMeshBase.hpp.
Referenced by flushSpecialWeights(), getSpecialWeight(), hasSpecialWeight(), MeshBase(), and setSpecialWeight().
bool Sundance::MeshBase::validWeights_ [mutable, private] |
flag to indicate if the weights stored are valid
Definition at line 1039 of file SundanceMeshBase.hpp.
Referenced by flushSpecialWeights(), IsSpecialWeightValid(), and setSpecialWeightValid().