Public Member Functions | |
HNMesh2D (int dim, const MPIComm &comm, const MeshEntityOrder &order) | |
void | createMesh (double position_x, double position_y, double offset_x, double offset_y, int resolution_x, int resolution_y, const RefinementClass &refineClass, const MeshDomainDef &meshDomain) |
virtual | ~HNMesh2D () |
virtual int | numCells (int dim) const |
virtual Point | nodePosition (int i) const |
const double * | nodePositionView (int i) const |
virtual void | getJacobians (int cellDim, const Array< int > &cellLID, CellJacobianBatch &jBatch) const |
virtual void | getCellDiameters (int cellDim, const Array< int > &cellLID, Array< double > &cellDiameters) const |
virtual void | pushForward (int cellDim, const Array< int > &cellLID, const Array< Point > &refQuadPts, Array< Point > &physQuadPts) const |
virtual int | ownerProcID (int cellDim, int cellLID) const |
virtual int | numFacets (int cellDim, int cellLID, int facetDim) const |
virtual int | facetLID (int cellDim, int cellLID, int facetDim, int facetIndex, int &facetOrientation) const |
virtual void | getFacetLIDs (int cellDim, const Array< int > &cellLID, int facetDim, Array< int > &facetLID, Array< int > &facetSign) const |
const int * | elemZeroFacetView (int cellLID) const |
virtual int | numMaxCofacets (int cellDim, int cellLID) const |
virtual int | maxCofacetLID (int cellDim, int cellLID, int cofacetIndex, int &facetIndex) const |
virtual void | getMaxCofacetLIDs (const Array< int > &cellLIDs, MaximalCofacetBatch &cofacets) const |
void | getCofacets (int cellDim, int cellLID, int cofacetDim, Array< int > &cofacetLIDs) const |
virtual int | mapGIDToLID (int cellDim, int globalIndex) const |
virtual bool | hasGID (int cellDim, int globalIndex) const |
virtual int | mapLIDToGID (int cellDim, int localIndex) const |
virtual CellType | cellType (int cellDim) const |
virtual int | label (int cellDim, int cellLID) const |
virtual void | getLabels (int cellDim, const Array< int > &cellLID, Array< int > &labels) const |
virtual Set< int > | getAllLabelsForDimension (int cellDim) const |
virtual void | getLIDsForLabel (int cellDim, int label, Array< int > &cellLIDs) const |
virtual void | setLabel (int cellDim, int cellLID, int label) |
virtual void | assignIntermediateCellGIDs (int cellDim) |
virtual bool | hasIntermediateGIDs (int dim) const |
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 |
Private Member Functions | |
int | facetLID_tree (int cellDim, int cellLID, int facetDim, int facetIndex) const |
void | addVertex (int vertexLID, int ownerProc, bool isHanging, double coordx, double coordy, const Array< int > &maxCoF) |
void | addEdge (int edgeLID, int ownerProc, bool isHanging, int edgeVertex, bool isProcBoundary, bool isMeshBoundary, const Array< int > &vertexLIDs, const Array< int > &maxCoF) |
void | addCell (int cellLID, int ownerProc, int indexInParent, int parentCellLID, int level, const Array< int > &edgeLIDs, const Array< int > &vertexLIDs) |
void | createCoarseMesh () |
bool | oneRefinementIteration () |
void | refineCell (int cellLID) |
void | createLeafNumbering () |
void | createLeafNumbering_sophisticated () |
int | estimateCellLoad (int ID) |
void | markCellsAndFacets (int cellID, int procID) |
Private Attributes | |
int | _dimension |
int | nrProc_ |
int | myRank_ |
const MPIComm & | _comm |
double | _pos_x |
double | _pos_y |
double | _ofs_x |
double | _ofs_y |
int | _res_x |
int | _res_y |
RefinementClass | refineClass_ |
MeshDomainDef | meshDomain_ |
Array< Point > | points_ |
Array< int > | nrElem_ |
Array< int > | nrElemOwned_ |
Array< Array< int > > | cellsPoints_ |
Array< Array< int > > | cellsEdges_ |
Array< Array< int > > | edgePoints_ |
Array< int > | edgeVertex_ |
Array< Array< int > > | edgeMaxCoF_ |
Array< Array< int > > | pointMaxCoF_ |
Array< bool > | edgeIsProcBonudary_ |
Array< bool > | edgeIsMeshDomainBonudary_ |
Array< Array< short signed int > > | elementOwner_ |
Array< short int > | indexInParent_ |
Array< int > | parentCellLID_ |
Array< short int > | cellLevel_ |
Array< bool > | isCellLeaf_ |
Array< bool > | isCellOut_ |
Array< Array< int > > | cellsChildren_ |
Array< bool > | isPointHanging_ |
Array< bool > | isEdgeHanging_ |
Array< Hashtable< int, Array < int > > > | hangElmStore_ |
Array< short int > | refineCell_ |
Array< int > | vertexLeafToLIDMapping_ |
Array< int > | edgeLeafToLIDMapping_ |
Array< int > | cellLeafToLIDMapping_ |
Array< int > | vertexLIDToLeafMapping_ |
Array< int > | edgeLIDToLeafMapping_ |
Array< int > | cellLIDToLeafMapping_ |
int | nrVertexLeafLID_ |
int | nrCellLeafLID_ |
int | nrEdgeLeafLID_ |
Array< int > | vertexLeafToGIDMapping_ |
Array< int > | edgeLeafToGIDMapping_ |
Array< int > | cellLeafToGIDMapping_ |
Array< int > | vertexGIDToLeafMapping_ |
Array< int > | edgeGIDToLeafMapping_ |
Array< int > | cellGIDToLeafMapping_ |
int | nrVertexLeafGID_ |
int | nrCellLeafGID_ |
int | nrEdgeLeafGID_ |
Static Private Attributes | |
static int | offs_Points_x_ [4] = {0, 1, 0, 1} |
static int | offs_Points_y_ [4] = {0, 0, 1, 1} |
static int | edge_Points_localIndex [4][2] = { {0,1} , {0,2} , {1,3} , {2,3} } |
Definition at line 69 of file SundanceHNMesh2D.hpp.
HNMesh2D::HNMesh2D | ( | int | dim, | |
const MPIComm & | comm, | |||
const MeshEntityOrder & | order | |||
) |
The Ctor for the dummy grid with hanging nodes
Definition at line 64 of file SundanceHNMesh2D.cpp.
References cellLevel_, cellsEdges_, cellsPoints_, edgeIsMeshDomainBonudary_, edgeIsProcBonudary_, edgeMaxCoF_, edgePoints_, edgeVertex_, elementOwner_, Playa::MPIComm::getNProc(), Playa::MPIComm::getRank(), hangElmStore_, indexInParent_, isCellLeaf_, isCellOut_, isEdgeHanging_, isPointHanging_, myRank_, nrCellLeafGID_, nrCellLeafLID_, nrEdgeLeafGID_, nrEdgeLeafLID_, nrElem_, nrElemOwned_, nrProc_, nrVertexLeafGID_, nrVertexLeafLID_, parentCellLID_, pointMaxCoF_, points_, refineCell_, Playa::ObjectWithVerbosity::setVerb(), and Playa::MPIComm::world().
virtual Sundance::HNMesh2D::~HNMesh2D | ( | ) | [inline, virtual] |
Dtor
Definition at line 91 of file SundanceHNMesh2D.hpp.
void HNMesh2D::addCell | ( | int | cellLID, | |
int | ownerProc, | |||
int | indexInParent, | |||
int | parentCellLID, | |||
int | level, | |||
const Array< int > & | edgeLIDs, | |||
const Array< int > & | vertexLIDs | |||
) | [private] |
adds one cell(2D) to the mesh
cell must be always leaf
adds one cell(2D) to the mesh
Definition at line 678 of file SundanceHNMesh2D.cpp.
References cellLevel_, cellsChildren_, cellsEdges_, cellsPoints_, elementOwner_, indexInParent_, isCellLeaf_, isCellOut_, Sundance::MeshDomainDef::isInsideComputationalDomain(), meshDomain_, nrElem_, parentCellLID_, points_, refineCell_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
Referenced by createCoarseMesh(), and refineCell().
void HNMesh2D::addEdge | ( | int | edgeLID, | |
int | ownerProc, | |||
bool | isHanging, | |||
int | edgeVertex, | |||
bool | isProcBoundary, | |||
bool | isMeshBoundary, | |||
const Array< int > & | vertexLIDs, | |||
const Array< int > & | maxCoF | |||
) | [private] |
adds one edge to the mesh
Definition at line 657 of file SundanceHNMesh2D.cpp.
References edgeIsMeshDomainBonudary_, edgeIsProcBonudary_, edgeMaxCoF_, edgePoints_, edgeVertex_, elementOwner_, isEdgeHanging_, nrElem_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
Referenced by createCoarseMesh(), and refineCell().
void HNMesh2D::addVertex | ( | int | vertexLID, | |
int | ownerProc, | |||
bool | isHanging, | |||
double | coordx, | |||
double | coordy, | |||
const Array< int > & | maxCoF | |||
) | [private] |
adds one vertex to the mesh
Definition at line 638 of file SundanceHNMesh2D.cpp.
References elementOwner_, isPointHanging_, nrElem_, pointMaxCoF_, points_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
Referenced by createCoarseMesh(), and refineCell().
virtual bool Sundance::HNMesh2D::allowsHangingHodes | ( | ) | const [inline, virtual] |
Function returns true if the mesh allows hanging nodes (by refinement), false otherwise
Reimplemented from Sundance::MeshBase.
Definition at line 281 of file SundanceHNMesh2D.hpp.
void HNMesh2D::assignIntermediateCellGIDs | ( | int | cellDim | ) | [virtual] |
Coordinate intermediate cell definitions across processors
Implements Sundance::MeshBase.
Definition at line 563 of file SundanceHNMesh2D.cpp.
CellType HNMesh2D::cellType | ( | int | cellDim | ) | const [virtual] |
Get the type of the given cell
Implements Sundance::MeshBase.
Definition at line 520 of file SundanceHNMesh2D.cpp.
References Sundance::LineCell, Sundance::NullCell, Sundance::PointCell, and Sundance::QuadCell.
void HNMesh2D::createCoarseMesh | ( | ) | [private] |
creates the mesh on the coarsest level as it is specified
Definition at line 747 of file SundanceHNMesh2D.cpp.
References _ofs_x, _ofs_y, _pos_x, _pos_y, _res_x, _res_y, addCell(), addEdge(), addVertex(), edge_Points_localIndex, edgeIsMeshDomainBonudary_, edgeIsProcBonudary_, edgeMaxCoF_, myRank_, nrElem_, nrProc_, offs_Points_x_, offs_Points_y_, pointMaxCoF_, refineClass_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
Referenced by createMesh().
void HNMesh2D::createLeafNumbering | ( | ) | [private] |
Create Leaf numbering
Definition at line 1311 of file SundanceHNMesh2D.cpp.
References cellGIDToLeafMapping_, cellLeafToGIDMapping_, cellLeafToLIDMapping_, cellLIDToLeafMapping_, cellsEdges_, cellsPoints_, edgeGIDToLeafMapping_, edgeLeafToGIDMapping_, edgeLeafToLIDMapping_, edgeLIDToLeafMapping_, edgeMaxCoF_, elementOwner_, isCellLeaf_, isCellOut_, isEdgeHanging_, isPointHanging_, myRank_, nrCellLeafGID_, nrCellLeafLID_, nrEdgeLeafGID_, nrEdgeLeafLID_, nrElem_, nrVertexLeafGID_, nrVertexLeafLID_, parentCellLID_, pointMaxCoF_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), vertexGIDToLeafMapping_, vertexLeafToGIDMapping_, vertexLeafToLIDMapping_, and vertexLIDToLeafMapping_.
void HNMesh2D::createLeafNumbering_sophisticated | ( | ) | [private] |
Create Leaf numbering, but with a better load balancing for parallel case
Definition at line 1538 of file SundanceHNMesh2D.cpp.
References _res_x, _res_y, cellGIDToLeafMapping_, cellLeafToGIDMapping_, cellLeafToLIDMapping_, cellLevel_, cellLIDToLeafMapping_, cellsEdges_, cellsPoints_, edgeGIDToLeafMapping_, edgeLeafToGIDMapping_, edgeLeafToLIDMapping_, edgeLIDToLeafMapping_, edgeMaxCoF_, elementOwner_, estimateCellLoad(), isCellLeaf_, isCellOut_, isEdgeHanging_, isPointHanging_, markCellsAndFacets(), myRank_, nrCellLeafGID_, nrCellLeafLID_, nrEdgeLeafGID_, nrEdgeLeafLID_, nrElem_, nrProc_, nrVertexLeafGID_, nrVertexLeafLID_, parentCellLID_, pointMaxCoF_, Sundance::pow(), SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), vertexGIDToLeafMapping_, vertexLeafToGIDMapping_, vertexLeafToLIDMapping_, and vertexLIDToLeafMapping_.
Referenced by createMesh().
void HNMesh2D::createMesh | ( | double | position_x, | |
double | position_y, | |||
double | offset_x, | |||
double | offset_y, | |||
int | resolution_x, | |||
int | resolution_y, | |||
const RefinementClass & | refineClass, | |||
const MeshDomainDef & | meshDomain | |||
) |
The Ctor for the HNMesh2D grid in 2D
creates one regular mesh without refinement. With a different function the refinement can start later , independently from this function.
The structure of this mesh also supports unstructured storage of the cells, so we might create unstructured mesh and later refine in the same way
Definition at line 712 of file SundanceHNMesh2D.cpp.
References _ofs_x, _ofs_y, _pos_x, _pos_y, _res_x, _res_y, createCoarseMesh(), createLeafNumbering_sophisticated(), meshDomain_, oneRefinementIteration(), refineClass_, and Playa::ObjectWithVerbosity::setVerb().
Referenced by Sundance::HNMesher2D::fillMesh().
const int * HNMesh2D::elemZeroFacetView | ( | int | cellLID | ) | const [virtual] |
Return a view of an element's zero-dimensional facets,
Reimplemented from Sundance::MeshBase.
Definition at line 353 of file SundanceHNMesh2D.cpp.
References cellLeafToLIDMapping_, cellsPoints_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
int HNMesh2D::estimateCellLoad | ( | int | ID | ) | [private] |
estimate the load of one cell
Definition at line 1500 of file SundanceHNMesh2D.cpp.
References cellsChildren_, isCellLeaf_, and isCellOut_.
Referenced by createLeafNumbering_sophisticated().
int HNMesh2D::facetLID | ( | int | cellDim, | |
int | cellLID, | |||
int | facetDim, | |||
int | facetIndex, | |||
int & | facetOrientation | |||
) | const [virtual] |
Return the local ID of a facet cell
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 298 of file SundanceHNMesh2D.cpp.
References cellLeafToLIDMapping_, cellsEdges_, cellsPoints_, edgeLeafToLIDMapping_, edgeLIDToLeafMapping_, edgePoints_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLIDToLeafMapping_.
Referenced by getFacetLIDs().
int HNMesh2D::facetLID_tree | ( | int | cellDim, | |
int | cellLID, | |||
int | facetDim, | |||
int | facetIndex | |||
) | const [private] |
For HN , returns parent facets, if the facet is not leaf, then return -1 at that place
Definition at line 618 of file SundanceHNMesh2D.cpp.
References cellsEdges_, cellsPoints_, edgeLIDToLeafMapping_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLIDToLeafMapping_.
Referenced by returnParentFacets().
Set< int > HNMesh2D::getAllLabelsForDimension | ( | int | cellDim | ) | const [virtual] |
Get the list of all labels defined for cells of the given dimension
Reimplemented from Sundance::MeshBase.
Definition at line 545 of file SundanceHNMesh2D.cpp.
void HNMesh2D::getCellDiameters | ( | int | cellDim, | |
const Array< int > & | cellLID, | |||
Array< double > & | cellDiameters | |||
) | const [virtual] |
Compute the diameters of a batch of cells, result via reference argument
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 183 of file SundanceHNMesh2D.cpp.
References cellLeafToLIDMapping_, cellsPoints_, edgeLeafToLIDMapping_, edgePoints_, points_, Sundance::MeshBase::spatialDim(), SUNDANCE_MSG3, SUNDANCE_VERB_HIGH, and Playa::ObjectWithVerbosity::verb().
void HNMesh2D::getCofacets | ( | int | cellDim, | |
int | cellLID, | |||
int | cofacetDim, | |||
Array< int > & | cofacetLIDs | |||
) | const [virtual] |
Find the cofacets of the given cell
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 453 of file SundanceHNMesh2D.cpp.
void HNMesh2D::getFacetLIDs | ( | int | cellDim, | |
const Array< int > & | cellLID, | |||
int | facetDim, | |||
Array< int > & | facetLID, | |||
Array< int > & | facetSign | |||
) | const [virtual] |
Return by reference argument an array containing&(elemVerts_.value(cellLID, 0)) the LIDs of the facetDim-dimensional facets of the given batch of cells
Implements Sundance::MeshBase.
Definition at line 326 of file SundanceHNMesh2D.cpp.
References facetLID(), numFacets(), SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
void HNMesh2D::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
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 130 of file SundanceHNMesh2D.cpp.
References _ofs_x, _ofs_y, cellLeafToLIDMapping_, cellsPoints_, Sundance::CellJacobianBatch::detJ(), edgeLeafToLIDMapping_, edgePoints_, Sundance::CellJacobianBatch::jVals(), points_, Sundance::CellJacobianBatch::resize(), Sundance::MeshBase::spatialDim(), SUNDANCE_MSG3, SUNDANCE_VERB_HIGH, and Playa::ObjectWithVerbosity::verb().
void HNMesh2D::getLabels | ( | int | cellDim, | |
const Array< int > & | cellLID, | |||
Array< int > & | labels | |||
) | const [virtual] |
Get the labels for a batch of cells
Reimplemented from Sundance::MeshBase.
Definition at line 539 of file SundanceHNMesh2D.cpp.
void HNMesh2D::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 from Sundance::MeshBase.
Definition at line 552 of file SundanceHNMesh2D.cpp.
void HNMesh2D::getMaxCofacetLIDs | ( | const Array< int > & | cellLIDs, | |
MaximalCofacetBatch & | cofacets | |||
) | const [virtual] |
Get the LIDs of the maximal cofacets for a batch of codimension-one cells.
cellLIDs | [in] array of LIDs of the cells whose cofacets are being obtained | |
cofacets | [out] the batch of cofacets |
Reimplemented from Sundance::MeshBase.
Definition at line 460 of file SundanceHNMesh2D.cpp.
bool HNMesh2D::hasGID | ( | int | cellDim, | |
int | globalIndex | |||
) | const [virtual] |
Determine whether a given cell GID exists on this processor
Implements Sundance::MeshBase.
Definition at line 490 of file SundanceHNMesh2D.cpp.
bool HNMesh2D::hasIntermediateGIDs | ( | int | dim | ) | const [virtual] |
int HNMesh2D::indexInParent | ( | int | maxCellLID | ) | const [virtual] |
Returns the index in the parent maxdim Cell of the refinement tree
maxCellLID | [in] the LID of the cell |
Reimplemented from Sundance::MeshBase.
Definition at line 592 of file SundanceHNMesh2D.cpp.
References cellLeafToLIDMapping_, and indexInParent_.
bool HNMesh2D::isElementHangingNode | ( | int | cellDim, | |
int | cellLID | |||
) | const [virtual] |
Function returns true if the specified element is a "hanging" element false otherwise
dim | [in] should be between 0 , D-1 | |
cellLID | [in] the local ID of the element |
Reimplemented from Sundance::MeshBase.
Definition at line 577 of file SundanceHNMesh2D.cpp.
References edgeLeafToLIDMapping_, isEdgeHanging_, isPointHanging_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.
int HNMesh2D::label | ( | int | cellDim, | |
int | cellLID | |||
) | const [virtual] |
Get the label of the given cell
Implements Sundance::MeshBase.
Definition at line 532 of file SundanceHNMesh2D.cpp.
int HNMesh2D::mapGIDToLID | ( | int | cellDim, | |
int | globalIndex | |||
) | const [virtual] |
Find the local ID of a cell given its global index
Implements Sundance::MeshBase.
Definition at line 467 of file SundanceHNMesh2D.cpp.
References cellLeafToGIDMapping_, cellLIDToLeafMapping_, edgeLeafToGIDMapping_, edgeLIDToLeafMapping_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), vertexLeafToGIDMapping_, and vertexLIDToLeafMapping_.
int HNMesh2D::mapLIDToGID | ( | int | cellDim, | |
int | localIndex | |||
) | const [virtual] |
Find the global ID of a cell given its local index
Implements Sundance::MeshBase.
Definition at line 497 of file SundanceHNMesh2D.cpp.
References cellGIDToLeafMapping_, cellLeafToLIDMapping_, edgeGIDToLeafMapping_, edgeLeafToLIDMapping_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), vertexGIDToLeafMapping_, and vertexLeafToLIDMapping_.
void HNMesh2D::markCellsAndFacets | ( | int | cellID, | |
int | procID | |||
) | [private] |
marks the cells recursivly in the tree (and facets) owned by one processor
mark the cells and its facets for one processor
Definition at line 1514 of file SundanceHNMesh2D.cpp.
References cellsChildren_, cellsEdges_, cellsPoints_, elementOwner_, and isCellLeaf_.
Referenced by createLeafNumbering_sophisticated().
virtual int Sundance::HNMesh2D::maxChildren | ( | ) | const [inline, virtual] |
How many children has a refined element.
This function provides information of either we have bi or trisection
Reimplemented from Sundance::MeshBase.
Definition at line 295 of file SundanceHNMesh2D.hpp.
int HNMesh2D::maxCofacetLID | ( | int | cellDim, | |
int | cellLID, | |||
int | cofacetIndex, | |||
int & | facetIndex | |||
) | const [virtual] |
Return the local ID of a maximal cofacet cell
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 | |
facetIndex | index of the cell cellLID into the list of the maximal cell's facets |
Implements Sundance::MeshBase.
Definition at line 386 of file SundanceHNMesh2D.cpp.
References cellLIDToLeafMapping_, edgeLeafToLIDMapping_, edgeMaxCoF_, edgeVertex_, pointMaxCoF_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.
Point HNMesh2D::nodePosition | ( | int | i | ) | const [virtual] |
Return the position of the i-th node
Implements Sundance::MeshBase.
Definition at line 118 of file SundanceHNMesh2D.cpp.
References points_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.
const double * HNMesh2D::nodePositionView | ( | int | i | ) | const [virtual] |
Return a view of the i-th node's position
Implements Sundance::MeshBase.
Definition at line 124 of file SundanceHNMesh2D.cpp.
References points_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.
int HNMesh2D::numCells | ( | int | dim | ) | const [virtual] |
Get the number of cells having dimension dim
Implements Sundance::MeshBase.
Definition at line 108 of file SundanceHNMesh2D.cpp.
References nrCellLeafLID_, nrEdgeLeafLID_, nrVertexLeafLID_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
int HNMesh2D::numFacets | ( | int | cellDim, | |
int | cellLID, | |||
int | facetDim | |||
) | const [virtual] |
Return the number of facets of the given cell
Implements Sundance::MeshBase.
Definition at line 286 of file SundanceHNMesh2D.cpp.
Referenced by getFacetLIDs().
int HNMesh2D::numMaxCofacets | ( | int | cellDim, | |
int | cellLID | |||
) | const [virtual] |
Return the number of maximal cofacets of the given cell
Implements Sundance::MeshBase.
Definition at line 360 of file SundanceHNMesh2D.cpp.
References cellLIDToLeafMapping_, edgeLeafToLIDMapping_, edgeMaxCoF_, pointMaxCoF_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.
bool HNMesh2D::oneRefinementIteration | ( | ) | [private] |
Does one single refinement iteration.
Iterates trough all cells which are owned by the processor and refines if necessary
Definition at line 955 of file SundanceHNMesh2D.cpp.
References _res_y, cellLevel_, cellsEdges_, cellsPoints_, edgeMaxCoF_, elementOwner_, isCellLeaf_, isCellOut_, isEdgeHanging_, nrElem_, parentCellLID_, points_, refineCell(), refineCell_, refineClass_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
Referenced by createMesh().
int HNMesh2D::ownerProcID | ( | int | cellDim, | |
int | cellLID | |||
) | const [virtual] |
Return the rank of the processor that owns the given cell
Implements Sundance::MeshBase.
Definition at line 275 of file SundanceHNMesh2D.cpp.
References cellLeafToLIDMapping_, edgeLeafToLIDMapping_, elementOwner_, SUNDANCE_MSG3, Playa::ObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.
void HNMesh2D::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 231 of file SundanceHNMesh2D.cpp.
References cellLeafToLIDMapping_, cellsPoints_, edgeLeafToLIDMapping_, edgePoints_, points_, Sundance::MeshBase::spatialDim(), SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
void HNMesh2D::refineCell | ( | int | cellLID | ) | [private] |
refine the given cell by cellID, (method assumes that this cell can be refined)
Definition at line 1047 of file SundanceHNMesh2D.cpp.
References addCell(), addEdge(), addVertex(), cellLevel_, cellsChildren_, cellsEdges_, cellsPoints_, edgeIsMeshDomainBonudary_, edgeIsProcBonudary_, edgeMaxCoF_, elementOwner_, hangElmStore_, isCellLeaf_, isEdgeHanging_, isPointHanging_, nrElem_, pointMaxCoF_, points_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
Referenced by oneRefinementIteration().
void HNMesh2D::returnParentFacets | ( | int | childCellLID, | |
int | dimFacets, | |||
Array< int > & | facetsLIDs, | |||
int & | parentCellLIDs | |||
) | const [virtual] |
Function returns the facets of the maxdim 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 from Sundance::MeshBase.
Definition at line 601 of file SundanceHNMesh2D.cpp.
References cellLeafToLIDMapping_, cellLIDToLeafMapping_, facetLID_tree(), parentCellLID_, SUNDANCE_MSG3, and Playa::ObjectWithVerbosity::verb().
void HNMesh2D::setLabel | ( | int | cellDim, | |
int | cellLID, | |||
int | label | |||
) | [virtual] |
Set the label of the given cell
Implements Sundance::MeshBase.
Definition at line 557 of file SundanceHNMesh2D.cpp.
const MPIComm& Sundance::HNMesh2D::_comm [private] |
The communicator
Definition at line 354 of file SundanceHNMesh2D.hpp.
int Sundance::HNMesh2D::_dimension [private] |
The dimension of the grid
Definition at line 349 of file SundanceHNMesh2D.hpp.
double Sundance::HNMesh2D::_ofs_x [private] |
Definition at line 360 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), createMesh(), and getJacobians().
double Sundance::HNMesh2D::_ofs_y [private] |
Definition at line 362 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), createMesh(), and getJacobians().
double Sundance::HNMesh2D::_pos_x [private] |
Definition at line 356 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), and createMesh().
double Sundance::HNMesh2D::_pos_y [private] |
Definition at line 358 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), and createMesh().
int Sundance::HNMesh2D::_res_x [private] |
Definition at line 364 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), createLeafNumbering_sophisticated(), and createMesh().
int Sundance::HNMesh2D::_res_y [private] |
Definition at line 366 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), createLeafNumbering_sophisticated(), createMesh(), and oneRefinementIteration().
Array<int> Sundance::HNMesh2D::cellGIDToLeafMapping_ [private] |
[cellGID] if cell is leaf(or inside the domain) then > 0 , -1 otherwise
Definition at line 465 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and mapLIDToGID().
Array<int> Sundance::HNMesh2D::cellLeafToGIDMapping_ [private] |
[leaf_cellGID] , the value must be a positive number
Definition at line 459 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and mapGIDToLID().
Array<int> Sundance::HNMesh2D::cellLeafToLIDMapping_ [private] |
[leaf_cellLID] , the value must be a positive number
Definition at line 441 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), elemZeroFacetView(), facetLID(), getCellDiameters(), getJacobians(), indexInParent(), mapLIDToGID(), ownerProcID(), pushForward(), and returnParentFacets().
Array<short int> Sundance::HNMesh2D::cellLevel_ [private] |
[cellID] , actual level of the cell
Definition at line 414 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), createLeafNumbering_sophisticated(), HNMesh2D(), oneRefinementIteration(), and refineCell().
Array<int> Sundance::HNMesh2D::cellLIDToLeafMapping_ [private] |
[cellLID] if cell is leaf(or inside the domain) then > 0 , -1 otherwise
Definition at line 447 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), mapGIDToLID(), maxCofacetLID(), numMaxCofacets(), and returnParentFacets().
Array< Array<int> > Sundance::HNMesh2D::cellsChildren_ [private] |
[cellID] , children of the cell
Definition at line 420 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), estimateCellLoad(), markCellsAndFacets(), and refineCell().
Array< Array<int> > Sundance::HNMesh2D::cellsEdges_ [private] |
[cellID][4]
Definition at line 385 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), createLeafNumbering(), createLeafNumbering_sophisticated(), facetLID(), facetLID_tree(), HNMesh2D(), markCellsAndFacets(), oneRefinementIteration(), and refineCell().
Array< Array<int> > Sundance::HNMesh2D::cellsPoints_ [private] |
[cellID][4]
Definition at line 383 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), createLeafNumbering(), createLeafNumbering_sophisticated(), elemZeroFacetView(), facetLID(), facetLID_tree(), getCellDiameters(), getJacobians(), HNMesh2D(), markCellsAndFacets(), oneRefinementIteration(), pushForward(), and refineCell().
int HNMesh2D::edge_Points_localIndex = { {0,1} , {0,2} , {1,3} , {2,3} } [static, private] |
stores the facet information on the reference Cell
Definition at line 481 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh().
Array<int> Sundance::HNMesh2D::edgeGIDToLeafMapping_ [private] |
[edgeGID] if edge is leaf(or inside the domain) then > 0 , -1 otherwise
Definition at line 463 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and mapLIDToGID().
Array<bool> Sundance::HNMesh2D::edgeIsMeshDomainBonudary_ [private] |
Definition at line 401 of file SundanceHNMesh2D.hpp.
Referenced by addEdge(), createCoarseMesh(), HNMesh2D(), and refineCell().
Array<bool> Sundance::HNMesh2D::edgeIsProcBonudary_ [private] |
Definition at line 400 of file SundanceHNMesh2D.hpp.
Referenced by addEdge(), createCoarseMesh(), HNMesh2D(), and refineCell().
Array<int> Sundance::HNMesh2D::edgeLeafToGIDMapping_ [private] |
[leaf_edgeGID] , the value must be a positive number
Definition at line 457 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and mapGIDToLID().
Array<int> Sundance::HNMesh2D::edgeLeafToLIDMapping_ [private] |
[leaf_edgeLID] , the value must be a positive number
Definition at line 439 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), facetLID(), getCellDiameters(), getJacobians(), isElementHangingNode(), mapLIDToGID(), maxCofacetLID(), numMaxCofacets(), ownerProcID(), and pushForward().
Array<int> Sundance::HNMesh2D::edgeLIDToLeafMapping_ [private] |
[edgeLID] if edge is leaf(or inside the domain) then > 0 , -1 otherwise
Definition at line 445 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), facetLID(), facetLID_tree(), and mapGIDToLID().
Array< Array<int> > Sundance::HNMesh2D::edgeMaxCoF_ [private] |
[edgeID][2]
Definition at line 395 of file SundanceHNMesh2D.hpp.
Referenced by addEdge(), createCoarseMesh(), createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), maxCofacetLID(), numMaxCofacets(), oneRefinementIteration(), and refineCell().
Array< Array<int> > Sundance::HNMesh2D::edgePoints_ [private] |
[edgeID][2]
Definition at line 387 of file SundanceHNMesh2D.hpp.
Referenced by addEdge(), facetLID(), getCellDiameters(), getJacobians(), HNMesh2D(), and pushForward().
Array<int> Sundance::HNMesh2D::edgeVertex_ [private] |
Information from the edge needs to be stored in one vertex
We use the traditional mapping , information is put into the 0th Vertex of the Edge
Definition at line 390 of file SundanceHNMesh2D.hpp.
Referenced by addEdge(), HNMesh2D(), and maxCofacetLID().
Array< Array< short signed int > > Sundance::HNMesh2D::elementOwner_ [private] |
contains the ownership of the local elements [dim][ID]
Definition at line 405 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), addEdge(), addVertex(), createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), markCellsAndFacets(), oneRefinementIteration(), ownerProcID(), and refineCell().
Array< Hashtable< int, Array<int> > > Sundance::HNMesh2D::hangElmStore_ [private] |
[vertexID] - > { h P1 LID , h P2 LID , h E1 LID , h E2 LID , h E3 LID }
Definition at line 430 of file SundanceHNMesh2D.hpp.
Referenced by HNMesh2D(), and refineCell().
Array<short int> Sundance::HNMesh2D::indexInParent_ [private] |
[cellID] , the child index in the parent
Definition at line 410 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), HNMesh2D(), and indexInParent().
Array<bool> Sundance::HNMesh2D::isCellLeaf_ [private] |
[cellID] , if the element is leaf
Definition at line 416 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), createLeafNumbering(), createLeafNumbering_sophisticated(), estimateCellLoad(), HNMesh2D(), markCellsAndFacets(), oneRefinementIteration(), and refineCell().
Array<bool> Sundance::HNMesh2D::isCellOut_ [private] |
[cellID] , if the cell is complete outside the user defined mesh domain
Definition at line 418 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), createLeafNumbering(), createLeafNumbering_sophisticated(), estimateCellLoad(), HNMesh2D(), and oneRefinementIteration().
Array<bool> Sundance::HNMesh2D::isEdgeHanging_ [private] |
[edgeID] , true if the edge is hanging , false otherwise
Definition at line 425 of file SundanceHNMesh2D.hpp.
Referenced by addEdge(), createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), isElementHangingNode(), oneRefinementIteration(), and refineCell().
Array<bool> Sundance::HNMesh2D::isPointHanging_ [private] |
[pointID] , true if the node is hanging , false otherwise
Definition at line 423 of file SundanceHNMesh2D.hpp.
Referenced by addVertex(), createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), isElementHangingNode(), and refineCell().
MeshDomainDef Sundance::HNMesh2D::meshDomain_ [mutable, private] |
int Sundance::HNMesh2D::myRank_ [private] |
Definition at line 352 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), createLeafNumbering(), createLeafNumbering_sophisticated(), and HNMesh2D().
int Sundance::HNMesh2D::nrCellLeafGID_ [private] |
Definition at line 469 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and HNMesh2D().
int Sundance::HNMesh2D::nrCellLeafLID_ [private] |
Definition at line 451 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), and numCells().
int Sundance::HNMesh2D::nrEdgeLeafGID_ [private] |
Definition at line 470 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and HNMesh2D().
int Sundance::HNMesh2D::nrEdgeLeafLID_ [private] |
Definition at line 452 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), and numCells().
Array<int> Sundance::HNMesh2D::nrElem_ [private] |
[3] the nr of ID per dim
Definition at line 376 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), addEdge(), addVertex(), createCoarseMesh(), createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), oneRefinementIteration(), and refineCell().
Array<int> Sundance::HNMesh2D::nrElemOwned_ [private] |
[3] the nr of owned elements per dim
Definition at line 378 of file SundanceHNMesh2D.hpp.
Referenced by HNMesh2D().
int Sundance::HNMesh2D::nrProc_ [private] |
Number of processors
Definition at line 351 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), createLeafNumbering_sophisticated(), and HNMesh2D().
int Sundance::HNMesh2D::nrVertexLeafGID_ [private] |
leaf GID numbering
Definition at line 468 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and HNMesh2D().
int Sundance::HNMesh2D::nrVertexLeafLID_ [private] |
leaf LID numbering
Definition at line 450 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), and numCells().
int HNMesh2D::offs_Points_x_ = {0, 1, 0, 1} [static, private] |
the offset in the X coordinate on the reference cell
Definition at line 475 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh().
int HNMesh2D::offs_Points_y_ = {0, 0, 1, 1} [static, private] |
the offset in the Y coordinate on the reference cell
Definition at line 478 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh().
Array<int> Sundance::HNMesh2D::parentCellLID_ [private] |
[cellID] , the LID of the parent cell
Definition at line 412 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), oneRefinementIteration(), and returnParentFacets().
Array< Array<int> > Sundance::HNMesh2D::pointMaxCoF_ [private] |
[pointID][4]
Definition at line 397 of file SundanceHNMesh2D.hpp.
Referenced by addVertex(), createCoarseMesh(), createLeafNumbering(), createLeafNumbering_sophisticated(), HNMesh2D(), maxCofacetLID(), numMaxCofacets(), and refineCell().
Array<Point> Sundance::HNMesh2D::points_ [private] |
all the global points index is [ID]
Definition at line 374 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), addVertex(), getCellDiameters(), getJacobians(), HNMesh2D(), nodePosition(), nodePositionView(), oneRefinementIteration(), pushForward(), and refineCell().
Array<short int> Sundance::HNMesh2D::refineCell_ [private] |
Neighbor Cell can mark the cell to provoke refinement
Definition at line 432 of file SundanceHNMesh2D.hpp.
Referenced by addCell(), HNMesh2D(), and oneRefinementIteration().
RefinementClass Sundance::HNMesh2D::refineClass_ [mutable, private] |
Definition at line 368 of file SundanceHNMesh2D.hpp.
Referenced by createCoarseMesh(), createMesh(), and oneRefinementIteration().
Array<int> Sundance::HNMesh2D::vertexGIDToLeafMapping_ [private] |
[vertexGID] if vertex is inside the domain then > 0 , -1 otherwise
Definition at line 461 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and mapLIDToGID().
Array<int> Sundance::HNMesh2D::vertexLeafToGIDMapping_ [private] |
[leaf_vertexGID] , the value must be a positive number
Definition at line 455 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), and mapGIDToLID().
Array<int> Sundance::HNMesh2D::vertexLeafToLIDMapping_ [private] |
[leaf_vertexLID] , the value must be a positive number
Definition at line 437 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), isElementHangingNode(), mapLIDToGID(), maxCofacetLID(), nodePosition(), nodePositionView(), numMaxCofacets(), and ownerProcID().
Array<int> Sundance::HNMesh2D::vertexLIDToLeafMapping_ [private] |
[vertexLID] if vertex is inside the domain then > 0 , -1 otherwise
Definition at line 443 of file SundanceHNMesh2D.hpp.
Referenced by createLeafNumbering(), createLeafNumbering_sophisticated(), facetLID(), facetLID_tree(), and mapGIDToLID().