Sundance::BasicSimplicialMesh Class Reference

A no-frills parallel simplicial mesh. More...

Inheritance diagram for Sundance::BasicSimplicialMesh:

Sundance::IncrementallyCreatableMesh Sundance::MeshBase Sundance::ObjectWithClassVerbosity< MeshBase > Sundance::ObjectWithInstanceID< MeshBase > Playa::ObjectWithVerbosity

List of all members.

Public Member Functions

 BasicSimplicialMesh (int dim, const MPIComm &comm, const MeshEntityOrder &order)
virtual ~BasicSimplicialMesh ()
virtual int numCells (int dim) const
 Get the number of cells having dimension dim.
virtual Point nodePosition (int i) const
 Return the position of the i-th node.
const double * nodePositionView (int i) const
 Return a view of the i-th node's position.
virtual void getJacobians (int cellDim, const Array< int > &cellLID, CellJacobianBatch &jBatch) const
 Compute the jacobians of a batch of cells, returning the result via reference argument.
virtual void getCellDiameters (int cellDim, const Array< int > &cellLID, Array< double > &diameters) const
 Compute the diameters of a batch of cells, result via reference argument.
virtual void pushForward (int cellDim, const Array< int > &cellLID, const Array< Point > &refQuadPts, Array< Point > &physQuadPts) const
 Map reference quadrature points to physical points on the given cells.
virtual int ownerProcID (int cellDim, int cellLID) const
 Return the rank of the processor that owns the given cell.
virtual int numFacets (int cellDim, int cellLID, int facetDim) const
 Return the number of facets of the given cell.
virtual int facetLID (int cellDim, int cellLID, int facetDim, int facetIndex, int &facetOrientation) const
 Return the local ID of a facet cell.
virtual void getFacetLIDs (int cellDim, const Array< int > &cellLID, int facetDim, Array< int > &facetLID, Array< int > &facetOrientations) const
 Return by reference argument an array containing the LIDs of the facetDim-dimensional facets of the given batch of cells.
const int * elemZeroFacetView (int cellLID) const
 Return a view of an element's zero-dimensional facets.
virtual int numMaxCofacets (int cellDim, int cellLID) const
 Return the number of maximal cofacets of the given cell.
virtual int maxCofacetLID (int cellDim, int cellLID, int cofacetIndex, int &facetIndex) const
 Return the local ID of a maximal cofacet cell.
virtual void getMaxCofacetLIDs (const Array< int > &cellLIDs, MaximalCofacetBatch &cofacets) const
 Get the LIDs of the maximal cofacets for a batch of codimension-one cells.
void getCofacets (int cellDim, int cellLID, int cofacetDim, Array< int > &cofacetLIDs) const
 Find the cofacets of the given cell.
virtual int mapGIDToLID (int cellDim, int globalIndex) const
 Find the local ID of a cell given its global index.
virtual bool hasGID (int cellDim, int globalIndex) const
 Determine whether a given cell GID exists on this processor.
virtual int mapLIDToGID (int cellDim, int localIndex) const
 Find the global ID of a cell given its local index.
virtual CellType cellType (int cellDim) const
 Get the type of the given cell.
virtual int label (int cellDim, int cellLID) const
 Get the label of the given cell.
virtual void getLabels (int cellDim, const Array< int > &cellLID, Array< int > &labels) const
 Get the labels for a batch of cells.
virtual Set< int > getAllLabelsForDimension (int cellDim) const
 Get the list of all labels defined for cells of the given dimension.
virtual void getLIDsForLabel (int cellDim, int label, Array< int > &cellLIDs) const
 Get the cells associated with a specified label.
Incremental creation methods
virtual int addVertex (int globalIndex, const Point &x, int ownerProcID, int label)
 Add new new vertex to the mesh.
virtual int addElement (int globalIndex, const Array< int > &vertexGIDs, int ownerProcID, int label)
 Add a new element to the mesh.
virtual void setLabel (int cellDim, int cellLID, int label)
 Set the label of the given cell.
virtual void estimateNumVertices (int numVertices)
 Optional preallocation of space for an estimated number of vertices.
virtual void estimateNumElements (int numElements)
 Optional preallocation of space for an estimated number of elements.
virtual void assignIntermediateCellGIDs (int cellDim)
 Coordinate intermediate cell definitions across processors.
virtual bool hasIntermediateGIDs (int dim) const
 Return if cells of dimension cellDim have been assigned global IDs or not.

Private Member Functions

int addFace (const Array< int > &vertLID, const Array< int > &vertGID, const Array< int > &edgeGID, int elemLID, int elemGID)
 Add a new face, first checking to see if it already exists.
int addEdge (int vertLID1, int vertLID2, int elemLID, int elemGID, int myFacetNumber)
 Add a new edge, first checking to see if it already exists.
int checkForExistingEdge (int vertLID1, int vertLID2)
 Check for the presence of the edge (vertLID1, vertLID2) in the mesh.
int lookupFace (const Array< int > &vertGID)
 Check whether the face defined by the given vertices exists in the mesh.
void synchronizeGIDNumbering (int dim, int localCount)
void resolveEdgeOwnership (int cellDim)
std::string cellStr (int dim, const int *verts) const
std::string cellToStr (int dim, int cellLID) const
std::string printCells (int dim) const
void synchronizeNeighborLists ()

Private Attributes

Array< int > numCells_
 Number of cells of each dimension.
Array< Pointpoints_
 coordinates of vertices.
ArrayOfTuples< int > edgeVerts_
 pairs of local vertex indices for the edges, each pair ordered from lower to higher global vertex index in order to define an absolute edge orientation.
ArrayOfTuples< int > faceVertLIDs_
 Tuples of local vertex indices for the faces, with each tuple ordered from lowest to highest global index in order to define an absolute edge orientation.
ArrayOfTuples< int > faceVertGIDs_
 Tuples of global vertex indices for the faces, with each tuple ordered from lowest to highest global index in order to define an absolute edge orientation.
ArrayOfTuples< int > faceEdges_
 Tuples of local indices for the edges of all faces.
ArrayOfTuples< int > faceEdgeSigns_
 Tuples of edge signs for the faces.
ArrayOfTuples< int > elemVerts_
 tuples of local vertex indices for the elements.
ArrayOfTuples< int > elemEdges_
 tuples of local edge indices for the elements.
ArrayOfTuples< int > elemEdgeSigns_
 tuples of edge orientations for the elements, indicating whether the orientation of the edge as given by moving around the element is parallel or antiparallel to the absolute orientation of the edge.
ArrayOfTuples< int > elemFaces_
 tuples of face LIDs for the elements.
ArrayOfTuples< int > elemFaceRotations_
 tuples of face rotations for the elements, defined relative to the absolute orientation of the face.
Hashtable< VertexView, int > vertexSetToFaceIndexMap_
 table for mapping vertex set -> face index
Array< Array< int > > edgeFaces_
 array of face cofacets for the edges.
Array< Array< int > > edgeCofacets_
 array of element cofacets for the edges.
Array< Array< int > > faceCofacets_
 array of element cofacets for the faces.
Array< Array< int > > vertEdges_
 array of edge cofacets for the vertices.
Array< Array< int > > vertFaces_
 array of face cofacet LIDs for the vertices.
Array< Array< int > > vertCofacets_
 array of maximal cofacets for the vertices.
Array< Array< int > > vertEdgePartners_
 array of edge partners for the vertices.
Array< Array< int > > LIDToGIDMap_
 map from local to global cell indices.
Array< Hashtable< int, int > > GIDToLIDMap_
 map from global to local cell indices.
Array< Array< int > > labels_
 Array of labels for the cells.
Array< Array< int > > ownerProcID_
 Array of owning processor IDs for the cells.
Array< int * > faceVertGIDBase_
 Pointer to the pointer at the base of the face vertex GID array.
bool hasEdgeGIDs_
 flag indicating whether the edge GIDs have been synchronized
bool hasFaceGIDs_
 flag indicating whether the face GIDs have been synchronized
Set< int > neighbors_
 Set of all neighbor processors sharing data with this one.
bool neighborsAreSynchronized_
 Whether the neighbor lists have been synchronized across processors.


Detailed Description

A no-frills parallel simplicial mesh.

Definition at line 51 of file SundanceBasicSimplicialMesh.hpp.


Constructor & Destructor Documentation

BasicSimplicialMesh::BasicSimplicialMesh ( int  dim,
const MPIComm comm,
const MeshEntityOrder order 
)

virtual Sundance::BasicSimplicialMesh::~BasicSimplicialMesh (  )  [inline, virtual]

Definition at line 59 of file SundanceBasicSimplicialMesh.hpp.


Member Function Documentation

int BasicSimplicialMesh::addEdge ( int  vertLID1,
int  vertLID2,
int  elemLID,
int  elemGID,
int  myFacetNumber 
) [private]

Add a new edge, first checking to see if it already exists.

This function is called from within addElement(), not by the user, and is therefore private.

Parameters:
vertLID{1,2} 
elemLID LID of the element that is adding the edge
elemGID GID of the element that is adding the edge
myFacetNumber facet number of the edge within the element
Returns:
LID of this edge

Definition at line 1378 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::ArrayOfTuples< T >::append(), checkForExistingEdge(), Sundance::MeshBase::comm(), edgeCofacets_, edgeFaces_, edgeVerts_, labels_, Sundance::ArrayOfTuples< T >::length(), LIDToGIDMap_, numCells_, ownerProcID_, Sundance::MeshBase::spatialDim(), vertEdgePartners_, and vertEdges_.

Referenced by addElement().

int BasicSimplicialMesh::addElement ( int  globalIndex,
const Array< int > &  vertexGIDs,
int  ownerProcID,
int  label 
) [virtual]

Add a new element to the mesh.

Parameters:
globalIndex the GID of the new element
vertexGIDs tuple of GIDs for the vertices defining this element.
ownerProcID the processor that "owns" this element
label a label for this element (optionally used in setting loads, material properties, etc)
Returns:
the LID of the element

Implements Sundance::IncrementallyCreatableMesh.

Definition at line 1063 of file SundanceBasicSimplicialMesh.cpp.

References addEdge(), addFace(), Sundance::ArrayOfTuples< T >::append(), Sundance::MeshBase::comm(), edgeCofacets_, elemEdges_, elemEdgeSigns_, elemFaceRotations_, elemFaces_, elemVerts_, faceCofacets_, GIDToLIDMap_, labels_, Sundance::ArrayOfTuples< T >::length(), LIDToGIDMap_, neighbors_, numCells_, ownerProcID_, Sundance::Set< Key, Compare >::put(), Sundance::ArrayOfTuples< T >::resize(), sort(), Sundance::MeshBase::spatialDim(), SUNDANCE_VERB_HIGH, and vertCofacets_.

int BasicSimplicialMesh::addFace ( const Array< int > &  vertLID,
const Array< int > &  vertGID,
const Array< int > &  edgeGID,
int  elemLID,
int  elemGID 
) [private]

Add a new face, first checking to see if it already exists.

This function is called from within addElement(), not by the user, and is therefore private.

Parameters:
vertGID The sorted GIDs for the three vertices of the face
vertLID The LIDs for the three vertices of the face
edgeLID{1,2,3} The LIDs for the three edges of the face
Returns:
LID of this face

Definition at line 1260 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::ArrayOfTuples< T >::append(), Sundance::MeshBase::comm(), edgeFaces_, faceCofacets_, faceEdges_, faceVertGIDBase_, faceVertGIDs_, faceVertLIDs_, Playa::MPIComm::getRank(), labels_, Sundance::ArrayOfTuples< T >::length(), lookupFace(), numCells_, ownerProcID_, Sundance::MeshBase::spatialDim(), SUNDANCE_VERB_EXTREME, Sundance::ArrayOfTuples< T >::value(), vertexSetToFaceIndexMap_, and vertFaces_.

Referenced by addElement().

int BasicSimplicialMesh::addVertex ( int  globalIndex,
const Point x,
int  ownerProcID,
int  label 
) [virtual]

Add new new vertex to the mesh.

Parameters:
globalIndex the GID of the new vertex
x the spatial position of the new vertex
ownerProcID the processor that "owns" this vertex
label a label for this vertex (optionally used in setting loads, boundary conditions, etc)
Returns:
the LID of the vertex.

Implements Sundance::IncrementallyCreatableMesh.

Definition at line 1034 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::MeshBase::comm(), GIDToLIDMap_, labels_, LIDToGIDMap_, neighbors_, numCells_, ownerProcID_, points_, Sundance::Set< Key, Compare >::put(), Sundance::MeshBase::spatialDim(), SUNDANCE_OUT, Playa::ObjectWithVerbosity::verb(), vertCofacets_, vertEdgePartners_, vertEdges_, and vertFaces_.

void BasicSimplicialMesh::assignIntermediateCellGIDs ( int  cellDim  )  [virtual]

string BasicSimplicialMesh::cellStr ( int  dim,
const int *  verts 
) const [private]

string BasicSimplicialMesh::cellToStr ( int  dim,
int  cellLID 
) const [private]

CellType BasicSimplicialMesh::cellType ( int  cellDim  )  const [virtual]

Get the type of the given cell.

Implements Sundance::MeshBase.

Definition at line 972 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::LineCell, Sundance::NullCell, Sundance::PointCell, Sundance::TetCell, and Sundance::TriangleCell.

int BasicSimplicialMesh::checkForExistingEdge ( int  vertLID1,
int  vertLID2 
) [private]

Check for the presence of the edge (vertLID1, vertLID2) in the mesh.

Returns:
the edge LID if the edge exists, -1 otherwise

Definition at line 1345 of file SundanceBasicSimplicialMesh.cpp.

References vertEdgePartners_, and vertEdges_.

Referenced by addEdge(), assignIntermediateCellGIDs(), and resolveEdgeOwnership().

const int* Sundance::BasicSimplicialMesh::elemZeroFacetView ( int  cellLID  )  const [inline, virtual]

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

Implements Sundance::MeshBase.

Definition at line 157 of file SundanceBasicSimplicialMesh.hpp.

References elemVerts_, and Sundance::ArrayOfTuples< T >::value().

void BasicSimplicialMesh::estimateNumElements ( int  numElements  )  [virtual]

void BasicSimplicialMesh::estimateNumVertices ( int  numVertices  )  [virtual]

Optional preallocation of space for an estimated number of vertices.

Reimplemented from Sundance::IncrementallyCreatableMesh.

Definition at line 607 of file SundanceBasicSimplicialMesh.cpp.

References GIDToLIDMap_, labels_, LIDToGIDMap_, ownerProcID_, points_, vertCofacets_, vertEdgePartners_, and vertEdges_.

Referenced by BasicSimplicialMesh().

int BasicSimplicialMesh::facetLID ( int  cellDim,
int  cellLID,
int  facetDim,
int  facetIndex,
int &  facetOrientation 
) const [virtual]

Return the local ID of a facet cell.

Parameters:
cellDim dimension of the cell whose facets are being obtained
cellLID local index of the cell whose facets are being obtained
facetDim dimension of the desired facet
facetIndex index into the list of the cell's facets
facetOrientation orientation of the facet as seen from the given cell (returned via reference)

Implements Sundance::MeshBase.

Definition at line 791 of file SundanceBasicSimplicialMesh.cpp.

References edgeVerts_, elemEdges_, elemFaces_, elemVerts_, faceEdges_, faceVertLIDs_, Sundance::MeshBase::spatialDim(), and Sundance::ArrayOfTuples< T >::value().

Referenced by maxCofacetLID().

Set< int > BasicSimplicialMesh::getAllLabelsForDimension ( int  cellDim  )  const [virtual]

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

Implements Sundance::MeshBase.

Definition at line 1008 of file SundanceBasicSimplicialMesh.cpp.

References labels_, and Sundance::Set< Key, Compare >::put().

void BasicSimplicialMesh::getCellDiameters ( int  cellDim,
const Array< int > &  cellLID,
Array< double > &  diameters 
) const [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

Reimplemented from Sundance::MeshBase.

Definition at line 341 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::cross(), Sundance::Point::distance(), edgeVerts_, elemVerts_, faceVertLIDs_, points_, Sundance::MeshBase::spatialDim(), and Sundance::ArrayOfTuples< T >::value().

void BasicSimplicialMesh::getCofacets ( int  cellDim,
int  cellLID,
int  cofacetDim,
Array< int > &  cofacetLIDs 
) const [virtual]

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

Implements Sundance::MeshBase.

Definition at line 913 of file SundanceBasicSimplicialMesh.cpp.

References edgeFaces_, maxCofacetLID(), numMaxCofacets(), Sundance::MeshBase::spatialDim(), vertEdges_, and vertFaces_.

void BasicSimplicialMesh::getFacetLIDs ( int  cellDim,
const Array< int > &  cellLID,
int  facetDim,
Array< int > &  facetLID,
Array< int > &  facetOrientations 
) const [virtual]

Return by reference argument an array containing the LIDs of the facetDim-dimensional facets of the given batch of cells.

Implements Sundance::MeshBase.

Definition at line 693 of file SundanceBasicSimplicialMesh.cpp.

References batchedFacetGrabTimer(), edgeVerts_, elemEdges_, elemFaces_, elemVerts_, faceEdges_, faceVertLIDs_, numFacets(), Sundance::MeshBase::spatialDim(), and Sundance::ArrayOfTuples< T >::value().

void BasicSimplicialMesh::getJacobians ( int  cellDim,
const Array< int > &  cellLID,
CellJacobianBatch jBatch 
) const [virtual]

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

Reimplemented from Sundance::MeshBase.

Definition at line 201 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::CellJacobianBatch::addFlops(), Sundance::cross(), Sundance::CellJacobianBatch::detJ(), edgeVerts_, elemVerts_, faceVertLIDs_, getJacobianTimer(), Sundance::CellJacobianBatch::jVals(), points_, Sundance::CellJacobianBatch::resize(), Sundance::MeshBase::spatialDim(), and Sundance::ArrayOfTuples< T >::value().

void BasicSimplicialMesh::getLabels ( int  cellDim,
const Array< int > &  cellLID,
Array< int > &  labels 
) const [virtual]

Get the labels for a batch of cells.

Implements Sundance::MeshBase.

Definition at line 996 of file SundanceBasicSimplicialMesh.cpp.

References labels_.

void BasicSimplicialMesh::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.

Implements Sundance::MeshBase.

Definition at line 1021 of file SundanceBasicSimplicialMesh.cpp.

References labels_.

void BasicSimplicialMesh::getMaxCofacetLIDs ( const Array< int > &  cellLIDs,
MaximalCofacetBatch cofacets 
) const [virtual]

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

Implements Sundance::MeshBase.

Definition at line 889 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::MaximalCofacetBatch::addSingleCofacet(), Sundance::MaximalCofacetBatch::addTwoCofacets(), maxCofacetLID(), numMaxCofacets(), Sundance::MaximalCofacetBatch::reset(), and Sundance::MeshBase::spatialDim().

bool BasicSimplicialMesh::hasGID ( int  cellDim,
int  globalIndex 
) const [virtual]

Determine whether a given cell GID exists on this processor.

Implements Sundance::MeshBase.

Definition at line 962 of file SundanceBasicSimplicialMesh.cpp.

References GIDToLIDMap_.

virtual bool Sundance::BasicSimplicialMesh::hasIntermediateGIDs ( int  cellDim  )  const [inline, virtual]

Return if cells of dimension cellDim have been assigned global IDs or not.

Parameters:
cellDim [in] Dimension of the cell

Implements Sundance::MeshBase.

Definition at line 284 of file SundanceBasicSimplicialMesh.hpp.

References hasEdgeGIDs_, and hasFaceGIDs_.

int BasicSimplicialMesh::label ( int  cellDim,
int  cellLID 
) const [virtual]

Get the label of the given cell.

Implements Sundance::MeshBase.

Definition at line 990 of file SundanceBasicSimplicialMesh.cpp.

References labels_.

int BasicSimplicialMesh::lookupFace ( const Array< int > &  vertGID  )  [private]

Check whether the face defined by the given vertices exists in the mesh.

Returns -1 if the face does not exist. Called during the synchronization of intermediate cell GIDs.

Parameters:
vertGID{1,2,3} the global indices of the vertices defining the face
Returns:
the LID of the face

Definition at line 1358 of file SundanceBasicSimplicialMesh.cpp.

References vertexSetToFaceIndexMap_.

Referenced by addFace(), assignIntermediateCellGIDs(), and resolveEdgeOwnership().

int BasicSimplicialMesh::mapGIDToLID ( int  cellDim,
int  globalIndex 
) const [virtual]

Find the local ID of a cell given its global index.

Implements Sundance::MeshBase.

Definition at line 957 of file SundanceBasicSimplicialMesh.cpp.

References GIDToLIDMap_.

Referenced by assignIntermediateCellGIDs().

int BasicSimplicialMesh::mapLIDToGID ( int  cellDim,
int  localIndex 
) const [virtual]

Find the global ID of a cell given its local index.

Implements Sundance::MeshBase.

Definition at line 967 of file SundanceBasicSimplicialMesh.cpp.

References LIDToGIDMap_.

Referenced by assignIntermediateCellGIDs(), cellToStr(), and printCells().

int BasicSimplicialMesh::maxCofacetLID ( int  cellDim,
int  cellLID,
int  cofacetIndex,
int &  facetIndex 
) const [virtual]

Return the local ID of a maximal cofacet cell.

Parameters:
cellDim dimension of the cell whose cofacets are being obtained
cellLID local index of the cell whose cofacets are being obtained
cofacetIndex which maximal cofacet to get
cofacetIndex index of the cell cellLID into the list of the maximal cell's facets

Implements Sundance::MeshBase.

Definition at line 845 of file SundanceBasicSimplicialMesh.cpp.

References edgeCofacets_, faceCofacets_, facetLID(), numFacets(), Sundance::MeshBase::spatialDim(), and vertCofacets_.

Referenced by getCofacets(), and getMaxCofacetLIDs().

virtual Point Sundance::BasicSimplicialMesh::nodePosition ( int  i  )  const [inline, virtual]

Return the position of the i-th node.

Implements Sundance::MeshBase.

Definition at line 69 of file SundanceBasicSimplicialMesh.hpp.

References points_.

const double* Sundance::BasicSimplicialMesh::nodePositionView ( int  i  )  const [inline, virtual]

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

Implements Sundance::MeshBase.

Definition at line 74 of file SundanceBasicSimplicialMesh.hpp.

References points_.

int BasicSimplicialMesh::numCells ( int  dim  )  const [virtual]

Get the number of cells having dimension dim.

Implements Sundance::MeshBase.

Definition at line 664 of file SundanceBasicSimplicialMesh.cpp.

References numCells_.

Referenced by assignIntermediateCellGIDs(), resolveEdgeOwnership(), and synchronizeGIDNumbering().

int BasicSimplicialMesh::numFacets ( int  cellDim,
int  cellLID,
int  facetDim 
) const [virtual]

Return the number of facets of the given cell.

Implements Sundance::MeshBase.

Definition at line 674 of file SundanceBasicSimplicialMesh.cpp.

Referenced by getFacetLIDs(), and maxCofacetLID().

int BasicSimplicialMesh::numMaxCofacets ( int  cellDim,
int  cellLID 
) const [virtual]

Return the number of maximal cofacets of the given cell.

Implements Sundance::MeshBase.

Definition at line 825 of file SundanceBasicSimplicialMesh.cpp.

References edgeCofacets_, faceCofacets_, and vertCofacets_.

Referenced by getCofacets(), and getMaxCofacetLIDs().

int BasicSimplicialMesh::ownerProcID ( int  cellDim,
int  cellLID 
) const [virtual]

Return the rank of the processor that owns the given cell.

Implements Sundance::MeshBase.

Definition at line 669 of file SundanceBasicSimplicialMesh.cpp.

References ownerProcID_.

string BasicSimplicialMesh::printCells ( int  dim  )  const [private]

void BasicSimplicialMesh::pushForward ( int  cellDim,
const Array< int > &  cellLID,
const Array< Point > &  refQuadPts,
Array< Point > &  physQuadPts 
) const [virtual]

Map reference quadrature points to physical points on the given cells.

Reimplemented from Sundance::MeshBase.

Definition at line 448 of file SundanceBasicSimplicialMesh.cpp.

References Sundance::CellJacobianBatch::addFlops(), edgeVerts_, elemVerts_, faceVertLIDs_, points_, Sundance::MeshBase::spatialDim(), and Sundance::ArrayOfTuples< T >::value().

void BasicSimplicialMesh::resolveEdgeOwnership ( int  cellDim  )  [private]

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

Set the label of the given cell.

Implements Sundance::MeshBase.

Definition at line 269 of file SundanceBasicSimplicialMesh.hpp.

References labels_.

void BasicSimplicialMesh::synchronizeGIDNumbering ( int  dim,
int  localCount 
) [private]

void BasicSimplicialMesh::synchronizeNeighborLists (  )  [private]


Member Data Documentation

Array<Array<int> > Sundance::BasicSimplicialMesh::edgeCofacets_ [private]

array of element cofacets for the edges.

The first index is the edge LID, the second the cofacet number.

Definition at line 442 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), addElement(), estimateNumElements(), maxCofacetLID(), and numMaxCofacets().

Array<Array<int> > Sundance::BasicSimplicialMesh::edgeFaces_ [private]

array of face cofacets for the edges.

The first index is the edge LID, the second the cofacet number.

Definition at line 438 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), addFace(), and getCofacets().

pairs of local vertex indices for the edges, each pair ordered from lower to higher global vertex index in order to define an absolute edge orientation.

Because global vertex indices are used, all processors will agree on this orientation, regardless of the orientation of the edge as seen by the element first defining it. The first index into this 2D array is the edge LID, the second the vertex number within the edge.

Definition at line 372 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), assignIntermediateCellGIDs(), cellToStr(), estimateNumElements(), facetLID(), getCellDiameters(), getFacetLIDs(), getJacobians(), printCells(), pushForward(), and resolveEdgeOwnership().

tuples of local edge indices for the elements.

The first index into this 2D array is the element LID, the second is the edge number.

Definition at line 415 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), BasicSimplicialMesh(), estimateNumElements(), facetLID(), and getFacetLIDs().

tuples of edge orientations for the elements, indicating whether the orientation of the edge as given by moving around the element is parallel or antiparallel to the absolute orientation of the edge.

The first index into this 2D array is the element LID, the second the edge number.

Definition at line 423 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), BasicSimplicialMesh(), and estimateNumElements().

tuples of face rotations for the elements, defined relative to the absolute orientation of the face.

Definition at line 431 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement().

tuples of face LIDs for the elements.

The first index is the element LID, the second the face number.

Definition at line 427 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), estimateNumElements(), facetLID(), and getFacetLIDs().

tuples of local vertex indices for the elements.

The first index into this 2D array is the element LID, the second is the vertex number.

Definition at line 411 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), cellToStr(), elemZeroFacetView(), estimateNumElements(), facetLID(), getCellDiameters(), getFacetLIDs(), getJacobians(), printCells(), and pushForward().

Array<Array<int> > Sundance::BasicSimplicialMesh::faceCofacets_ [private]

array of element cofacets for the faces.

The first index is the face LID, the second the cofacet number.

Definition at line 446 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), addFace(), estimateNumElements(), maxCofacetLID(), and numMaxCofacets().

Tuples of local indices for the edges of all faces.

The first index into this 2D array is the face LID, the second the edge number.

Definition at line 402 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addFace(), estimateNumElements(), facetLID(), and getFacetLIDs().

Tuples of edge signs for the faces.

The edge sign indicates whether the orientation of the edge as given by moving around the face is parallel or antiparallel to the absolute orientation of the edge.

Definition at line 407 of file SundanceBasicSimplicialMesh.hpp.

Pointer to the pointer at the base of the face vertex GID array.

This is used to get small-array "views" of the face vertex GID array without making copies, resulting in a significant performance improvement in the vertex set hashtable lookups to identify pre-existing faces.

We use double rather than single indirection here because as elements are added, the face vertex GID array will often be resized, thus changing the base pointer. Each vertex set "view" keeps a pointer to the base pointer, so that it always remains synchronized with the array of face vertices.

IMPORTANT: any time faceVertGIDs_ is resized, faceVertGIDBase_[0] must be reset to the base of the faceVertGIDs_ array so that the vertex sets are pointing to the right place.

Definition at line 496 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addFace(), BasicSimplicialMesh(), and estimateNumElements().

Tuples of global vertex indices for the faces, with each tuple ordered from lowest to highest global index in order to define an absolute edge orientation.

Because global vertex indices are used, all processors will agree on this orientation, regardless of the orientation of the face as seen by the element first defining it. The first index into this 2D array is the face LID, the second the vertex number within the face.

Notice that we duplicate the face vertex storage, storing both the vertex LIDs and vertex GIDs for each face. This lets us do quick comparison with the sorted GID array in order to identify pre-existing faces, while also making it possible to retrieve face vertex LID information without doing hashtable lookups.

Definition at line 398 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addFace(), BasicSimplicialMesh(), and estimateNumElements().

Tuples of local vertex indices for the faces, with each tuple ordered from lowest to highest global index in order to define an absolute edge orientation.

Because global vertex indices are used, all processors will agree on this orientation, regardless of the orientation of the face as seen by the element first defining it. The first index into this 2D array is the face LID, the second the vertex number within the face.

Definition at line 381 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addFace(), assignIntermediateCellGIDs(), cellToStr(), estimateNumElements(), facetLID(), getCellDiameters(), getFacetLIDs(), getJacobians(), printCells(), pushForward(), and resolveEdgeOwnership().

Array<Hashtable<int, int> > Sundance::BasicSimplicialMesh::GIDToLIDMap_ [private]

map from global to local cell indices.

The array index is the cell dimension. The hashtable key is the cell GID, the value the cell LID.

Definition at line 471 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), addVertex(), assignIntermediateCellGIDs(), estimateNumElements(), estimateNumVertices(), hasGID(), mapGIDToLID(), resolveEdgeOwnership(), and synchronizeGIDNumbering().

flag indicating whether the edge GIDs have been synchronized

Definition at line 500 of file SundanceBasicSimplicialMesh.hpp.

Referenced by assignIntermediateCellGIDs(), and hasIntermediateGIDs().

flag indicating whether the face GIDs have been synchronized

Definition at line 503 of file SundanceBasicSimplicialMesh.hpp.

Referenced by assignIntermediateCellGIDs(), and hasIntermediateGIDs().

Array<Array<int> > Sundance::BasicSimplicialMesh::labels_ [private]

Array<Array<int> > Sundance::BasicSimplicialMesh::LIDToGIDMap_ [private]

map from local to global cell indices.

The first index into this 2D array is the cell dimension, the second the cell LID.

Definition at line 466 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), addElement(), addVertex(), assignIntermediateCellGIDs(), cellToStr(), estimateNumElements(), estimateNumVertices(), mapLIDToGID(), printCells(), resolveEdgeOwnership(), and synchronizeGIDNumbering().

Set of all neighbor processors sharing data with this one.

Definition at line 506 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), addVertex(), BasicSimplicialMesh(), resolveEdgeOwnership(), and synchronizeNeighborLists().

Whether the neighbor lists have been synchronized across processors.

Definition at line 510 of file SundanceBasicSimplicialMesh.hpp.

Referenced by synchronizeNeighborLists().

Number of cells of each dimension.

Definition at line 359 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), addElement(), addFace(), addVertex(), and numCells().

Array<Array<int> > Sundance::BasicSimplicialMesh::ownerProcID_ [private]

Array of owning processor IDs for the cells.

Each cell is owned by a single processor that is responsible for assigning global indices, DOF numbers, and so on.

Definition at line 479 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), addElement(), addFace(), addVertex(), assignIntermediateCellGIDs(), estimateNumElements(), estimateNumVertices(), ownerProcID(), and resolveEdgeOwnership().

coordinates of vertices.

The index into the array is the vertex LID .

Definition at line 362 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addVertex(), estimateNumVertices(), getCellDiameters(), getJacobians(), nodePosition(), nodePositionView(), and pushForward().

Array<Array<int> > Sundance::BasicSimplicialMesh::vertCofacets_ [private]

array of maximal cofacets for the vertices.

The first index is the vertex LID, the second the cafacet number.

Definition at line 458 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addElement(), addVertex(), estimateNumVertices(), maxCofacetLID(), and numMaxCofacets().

array of edge partners for the vertices.

The partners are other vertices sharing an edge with the specified vertex.

Definition at line 462 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), addVertex(), checkForExistingEdge(), and estimateNumVertices().

Array<Array<int> > Sundance::BasicSimplicialMesh::vertEdges_ [private]

array of edge cofacets for the vertices.

The first index is the vertex LID, the second the edge cofacet number.

Definition at line 450 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addEdge(), addVertex(), checkForExistingEdge(), estimateNumVertices(), and getCofacets().

table for mapping vertex set -> face index

Definition at line 434 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addFace(), estimateNumElements(), and lookupFace().

Array<Array<int> > Sundance::BasicSimplicialMesh::vertFaces_ [private]

array of face cofacet LIDs for the vertices.

The first index is the vertex LID, the second the cofacet number.

Definition at line 454 of file SundanceBasicSimplicialMesh.hpp.

Referenced by addFace(), addVertex(), and getCofacets().

Site Contact