Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Sundance::HNMesh2D Class Reference

Class for 2D hierarchical structured quad Mesh
The main internal idea of the mesh ist that there are different numberings of the elements ID -> each element has an ID (also those which are completely outside the mesh domain, and those which are not leaf)
In the code sometimes internaly LID is used instead of ID due to legacy !! :-P
GID -> all leaf elements which are visible to Sundance (only the leaf elements should be visible)
LID -> all the elements which have GID and belong and either belong to the local processor or are in the ghost cells
More...

Inheritance diagram for Sundance::HNMesh2D:
Sundance::MeshBase Sundance::ObjectWithClassVerbosity< MeshBase > Sundance::ObjectWithInstanceID< MeshBase > Sundance::DefaultObjectWithVerbosity Sundance::ObjectWithVerbosityBase

List of all members.

Public Member Functions

 HNMesh2D (int dim, const MPIComm &comm, const MeshEntityOrder &order)
 The Ctor for the dummy grid with hanging nodes.
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)
 The Ctor for the HNMesh2D grid in 2D.
virtual ~HNMesh2D ()
 Dtor.
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 > &cellDiameters) 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 > &facetSign) const
 Return by reference argument an array containing&(elemVerts_.value(cellLID, 0)) 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.
virtual void setLabel (int cellDim, int cellLID, int label)
 Set the label of the given cell.
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.
virtual bool allowsHangingHodes () const
 Function returns true if the mesh allows hanging nodes (by refinement), false otherwise.
virtual bool isElementHangingNode (int cellDim, int cellLID) const
 Function returns true if the specified element is a "hanging" element false otherwise

virtual int indexInParent (int maxCellLID) const
 Returns the index in the parent maxdim Cell of the refinement tree.
virtual int maxChildren () const
 How many children has a refined element.
virtual void returnParentFacets (int childCellLID, int dimFacets, Array< int > &facetsLIDs, int &parentCellLIDs) const
 Function returns the facets of the maxdim parent cell (needed for HN treatment)

Private Member Functions

int facetLID_tree (int cellDim, int cellLID, int facetDim, int facetIndex) const
 For HN , returns parent facets, if the facet is not leaf, then return -1 at that place.
void addVertex (int vertexLID, int ownerProc, bool isHanging, double coordx, double coordy, const Array< int > &maxCoF)
 adds one vertex to the mesh
void addEdge (int edgeLID, int ownerProc, bool isHanging, int edgeVertex, bool isProcBoundary, bool isMeshBoundary, const Array< int > &vertexLIDs, const Array< int > &maxCoF)
 adds one edge to the mesh
void addCell (int cellLID, int ownerProc, int indexInParent, int parentCellLID, int level, const Array< int > &edgeLIDs, const Array< int > &vertexLIDs)
 adds one cell(2D) to the mesh
cell must be always leaf
void createCoarseMesh ()
 creates the mesh on the coarsest level as it is specified
bool oneRefinementIteration ()
 Does one single refinement iteration.
void refineCell (int cellLID)
 refine the given cell by cellID, (method assumes that this cell can be refined)
void createLeafNumbering ()
 Create Leaf numbering.

Private Attributes

int _dimension
 The dimension of the grid.
int nrProc_
 Number of processors.
int myRank_
const MPIComm & _comm
 The communicator.
double _pos_x
double _pos_y
double _ofs_x
double _ofs_y
int _res_x
int _res_y
RefinementClass refineClass_
MeshDomainDef meshDomain_
Array< Pointpoints_
 all the global points index is [ID]
Array< int > nrElem_
 [3] the nr of ID per dim
Array< int > nrElemOwned_
 [3] the nr of owned elements per dim
Array< Array< int > > cellsPoints_
 [cellID][4]
Array< Array< int > > cellsEdges_
 [cellID][4]
Array< Array< int > > edgePoints_
 [edgeID][2]
Array< int > edgeVertex_
 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

Array< Array< int > > edgeMaxCoF_
 [edgeID][2]
Array< Array< int > > pointMaxCoF_
 [pointID][4]
Array< bool > edgeIsProcBonudary_
Array< bool > edgeIsMeshDomainBonudary_
Array< Array< short int > > elementOwner_
 contains the ownership of the local elements [dim][ID]
Array< short int > indexInParent_
 [cellID] , the child index in the parent
Array< int > parentCellLID_
 [cellID] , the LID of the parent cell
Array< short int > cellLevel_
 [cellID] , actual level of the cell
Array< bool > isCellLeaf_
 [cellID] , if the element is leaf
Array< bool > isCellOut_
 [cellID] , if the cell is complete outside the user defined mesh domain
Array< Array< int > > cellsChildren_
 [cellID] , children of the cell
Array< bool > isPointHanging_
 [pointID] , true if the node is hanging , false otherwise
Array< bool > isEdgeHanging_
 [edgeID] , true if the edge is hanging , false otherwise
Array< Hashtable< int, Array
< int > > > 
hangElmStore_
 [vertexID] - > { h P1 LID , h P2 LID , h E1 LID , h E2 LID , h E3 LID }
Array< short int > refineCell_
 Neighbor Cell can mark the cell to provoke refinement.
Array< int > vertexLeafToLIDMapping_
 [leaf_vertexLID] , the value must be a positive number
Array< int > edgeLeafToLIDMapping_
 [leaf_edgeLID] , the value must be a positive number
Array< int > cellLeafToLIDMapping_
 [leaf_cellLID] , the value must be a positive number
Array< int > vertexLIDToLeafMapping_
 [vertexLID] if vertex is inside the domain then > 0 , -1 otherwise
Array< int > edgeLIDToLeafMapping_
 [edgeLID] if edge is leaf(or inside the domain) then > 0 , -1 otherwise
Array< int > cellLIDToLeafMapping_
 [cellLID] if cell is leaf(or inside the domain) then > 0 , -1 otherwise
int nrVertexLeafLID_
 leaf LID numbering
int nrCellLeafLID_
int nrEdgeLeafLID_
Array< int > vertexLeafToGIDMapping_
 [leaf_vertexGID] , the value must be a positive number
Array< int > edgeLeafToGIDMapping_
 [leaf_edgeGID] , the value must be a positive number
Array< int > cellLeafToGIDMapping_
 [leaf_cellGID] , the value must be a positive number
Array< int > vertexGIDToLeafMapping_
 [vertexGID] if vertex is inside the domain then > 0 , -1 otherwise
Array< int > edgeGIDToLeafMapping_
 [edgeGID] if edge is leaf(or inside the domain) then > 0 , -1 otherwise
Array< int > cellGIDToLeafMapping_
 [cellGID] if cell is leaf(or inside the domain) then > 0 , -1 otherwise
int nrVertexLeafGID_
 leaf GID numbering
int nrCellLeafGID_
int nrEdgeLeafGID_

Static Private Attributes

static int offs_Points_x_ [4] = {0, 1, 0, 1}
 the offset in the X coordinate on the reference cell
static int offs_Points_y_ [4] = {0, 0, 1, 1}
 the offset in the Y coordinate on the reference cell
static int edge_Points_localIndex [4][2] = { {0,1} , {0,2} , {1,3} , {2,3} }
 stores the facet information on the reference Cell

Detailed Description

Class for 2D hierarchical structured quad Mesh
The main internal idea of the mesh ist that there are different numberings of the elements ID -> each element has an ID (also those which are completely outside the mesh domain, and those which are not leaf)
In the code sometimes internaly LID is used instead of ID due to legacy !! :-P
GID -> all leaf elements which are visible to Sundance (only the leaf elements should be visible)
LID -> all the elements which have GID and belong and either belong to the local processor or are in the ghost cells

Definition at line 69 of file SundanceHNMesh2D.hpp.


Constructor & Destructor Documentation

HNMesh2D::HNMesh2D ( int  dim,
const MPIComm &  comm,
const MeshEntityOrder order 
)
virtual Sundance::HNMesh2D::~HNMesh2D ( ) [inline, virtual]

Dtor.

Definition at line 91 of file SundanceHNMesh2D.hpp.


Member Function Documentation

void HNMesh2D::addCell ( int  cellLID,
int  ownerProc,
int  indexInParent,
int  parentCellLID,
int  level,
const Array< int > &  edgeLIDs,
const Array< int > &  vertexLIDs 
) [private]
void HNMesh2D::addEdge ( int  edgeLID,
int  ownerProc,
bool  isHanging,
int  edgeVertex,
bool  isProcBoundary,
bool  isMeshBoundary,
const Array< int > &  vertexLIDs,
const Array< int > &  maxCoF 
) [private]
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 636 of file SundanceHNMesh2D.cpp.

References elementOwner_, isPointHanging_, nrElem_, pointMaxCoF_, points_, SUNDANCE_MSG3, and Sundance::DefaultObjectWithVerbosity::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 561 of file SundanceHNMesh2D.cpp.

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

Get the type of the given cell.

Implements Sundance::MeshBase.

Definition at line 518 of file SundanceHNMesh2D.cpp.

References Sundance::LineCell, Sundance::NullCell, Sundance::PointCell, and Sundance::QuadCell.

void HNMesh2D::createCoarseMesh ( ) [private]
void HNMesh2D::createLeafNumbering ( ) [private]
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 710 of file SundanceHNMesh2D.cpp.

References _ofs_x, _ofs_y, _pos_x, _pos_y, _res_x, _res_y, createCoarseMesh(), createLeafNumbering(), meshDomain_, oneRefinementIteration(), refineClass_, and Sundance::DefaultObjectWithVerbosity::setVerbosity().

Referenced by Sundance::HNMesher2D::fillMesh().

const int * HNMesh2D::elemZeroFacetView ( int  cellLID) const [virtual]

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

Returns:
an array of integers with the indexes of the points which for it

Implements Sundance::MeshBase.

Definition at line 351 of file SundanceHNMesh2D.cpp.

References cellLeafToLIDMapping_, cellsPoints_, SUNDANCE_MSG3, and Sundance::DefaultObjectWithVerbosity::verb().

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

Return the local ID of a facet cell.

Parameters:
cellDimdimension of the cell whose facets are being obtained
cellLIDlocal index of the cell whose facets are being obtained
facetDimdimension of the desired facet
facetIndexindex into the list of the cell's facets
facetOrientationorientation of the facet as seen from the given cell (returned via reference)

Implements Sundance::MeshBase.

Definition at line 296 of file SundanceHNMesh2D.cpp.

References cellLeafToLIDMapping_, cellsEdges_, cellsPoints_, edgeLeafToLIDMapping_, edgeLIDToLeafMapping_, edgePoints_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::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 616 of file SundanceHNMesh2D.cpp.

References cellsEdges_, cellsPoints_, edgeLIDToLeafMapping_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::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.

Implements Sundance::MeshBase.

Definition at line 543 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.

Parameters:
cellDimdimension of the cells whose diameters are to be computed
cellLIDlocal indices of the cells for which diameters are to be computed
diametersreference to the array of cell diameters

Reimplemented from Sundance::MeshBase.

Definition at line 181 of file SundanceHNMesh2D.cpp.

References cellLeafToLIDMapping_, cellsPoints_, edgeLeafToLIDMapping_, edgePoints_, points_, Sundance::MeshBase::spatialDim(), SUNDANCE_MSG3, SUNDANCE_VERB_HIGH, and Sundance::DefaultObjectWithVerbosity::verb().

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

Find the cofacets of the given cell.

Parameters:
cellDimdimension of the cell whose cofacets are being obtained
cellLIDlocal index of the cell whose cofacets are being obtained
cofacetDimdimension of the cofacets to get
cofacetLIDsLIDs of the cofacet

Implements Sundance::MeshBase.

Definition at line 451 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 324 of file SundanceHNMesh2D.cpp.

References facetLID(), numFacets(), SUNDANCE_MSG3, and Sundance::DefaultObjectWithVerbosity::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.

Parameters:
cellDimdimension of the cells whose Jacobians are to be computed
cellLIDlocal indices of the cells for which Jacobians are to be computed
jBatchreference to the resulting Jacobian batch

Reimplemented from Sundance::MeshBase.

Definition at line 128 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 Sundance::DefaultObjectWithVerbosity::verb().

void HNMesh2D::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 537 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.

Implements Sundance::MeshBase.

Definition at line 550 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.

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 458 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 488 of file SundanceHNMesh2D.cpp.

bool HNMesh2D::hasIntermediateGIDs ( int  cellDim) const [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 567 of file SundanceHNMesh2D.cpp.

int HNMesh2D::indexInParent ( int  maxCellLID) const [virtual]

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

Parameters:
maxCellLID[in] the LID of the cell

Reimplemented from Sundance::MeshBase.

Definition at line 590 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

Parameters:
dim[in] should be between 0 , D-1
cellLID[in] the local ID of the element

Reimplemented from Sundance::MeshBase.

Definition at line 575 of file SundanceHNMesh2D.cpp.

References edgeLeafToLIDMapping_, isEdgeHanging_, isPointHanging_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::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 530 of file SundanceHNMesh2D.cpp.

int HNMesh2D::mapGIDToLID ( int  cellDim,
int  globalIndex 
) const [virtual]
int HNMesh2D::mapLIDToGID ( int  cellDim,
int  localIndex 
) const [virtual]
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.

Parameters:
cellDimdimension of the cell whose cofacets are being obtained
cellLIDlocal index of the cell whose cofacets are being obtained
cofacetIndexwhich maximal cofacet to get
facetIndexindex of the cell cellLID into the list of the maximal cell's facets

Implements Sundance::MeshBase.

Definition at line 384 of file SundanceHNMesh2D.cpp.

References cellLIDToLeafMapping_, edgeLeafToLIDMapping_, edgeMaxCoF_, edgeVertex_, pointMaxCoF_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.

Point HNMesh2D::nodePosition ( int  i) const [virtual]

Return the position of the i-th node.

Implements Sundance::MeshBase.

Definition at line 116 of file SundanceHNMesh2D.cpp.

References points_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::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 122 of file SundanceHNMesh2D.cpp.

References points_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::verb(), and vertexLeafToLIDMapping_.

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

Get the number of cells having dimension dim.

Implements Sundance::MeshBase.

Definition at line 106 of file SundanceHNMesh2D.cpp.

References nrCellLeafLID_, nrEdgeLeafLID_, nrVertexLeafLID_, SUNDANCE_MSG3, and Sundance::DefaultObjectWithVerbosity::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 284 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 358 of file SundanceHNMesh2D.cpp.

References cellLIDToLeafMapping_, edgeLeafToLIDMapping_, edgeMaxCoF_, pointMaxCoF_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::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 952 of file SundanceHNMesh2D.cpp.

References _res_y, cellLevel_, cellsEdges_, cellsPoints_, edgeMaxCoF_, elementOwner_, isCellLeaf_, isCellOut_, isEdgeHanging_, nrElem_, parentCellLID_, points_, refineCell(), refineCell_, refineClass_, SUNDANCE_MSG3, and Sundance::DefaultObjectWithVerbosity::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 273 of file SundanceHNMesh2D.cpp.

References cellLeafToLIDMapping_, edgeLeafToLIDMapping_, elementOwner_, SUNDANCE_MSG3, Sundance::DefaultObjectWithVerbosity::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 229 of file SundanceHNMesh2D.cpp.

References cellLeafToLIDMapping_, cellsPoints_, edgeLeafToLIDMapping_, edgePoints_, points_, Sundance::MeshBase::spatialDim(), SUNDANCE_MSG3, and Sundance::DefaultObjectWithVerbosity::verb().

void HNMesh2D::refineCell ( int  cellLID) [private]
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)

Parameters:
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 599 of file SundanceHNMesh2D.cpp.

References cellLeafToLIDMapping_, cellLIDToLeafMapping_, facetLID_tree(), parentCellLID_, SUNDANCE_MSG3, and Sundance::DefaultObjectWithVerbosity::verb().

void HNMesh2D::setLabel ( int  cellDim,
int  cellLID,
int  label 
) [virtual]

Set the label of the given cell.

Implements Sundance::MeshBase.

Definition at line 555 of file SundanceHNMesh2D.cpp.


Member Data Documentation

const MPIComm& Sundance::HNMesh2D::_comm [private]

The communicator.

Definition at line 345 of file SundanceHNMesh2D.hpp.

The dimension of the grid.

Definition at line 340 of file SundanceHNMesh2D.hpp.

double Sundance::HNMesh2D::_ofs_x [private]

Definition at line 351 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), createMesh(), and getJacobians().

double Sundance::HNMesh2D::_ofs_y [private]

Definition at line 353 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), createMesh(), and getJacobians().

double Sundance::HNMesh2D::_pos_x [private]

Definition at line 347 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), and createMesh().

double Sundance::HNMesh2D::_pos_y [private]

Definition at line 349 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), and createMesh().

Definition at line 355 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), and createMesh().

Definition at line 357 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), createMesh(), and oneRefinementIteration().

[cellGID] if cell is leaf(or inside the domain) then > 0 , -1 otherwise

Definition at line 456 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and mapLIDToGID().

[leaf_cellGID] , the value must be a positive number

Definition at line 450 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and mapGIDToLID().

[leaf_cellLID] , the value must be a positive number

Definition at line 432 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), 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 405 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), HNMesh2D(), oneRefinementIteration(), and refineCell().

[cellLID] if cell is leaf(or inside the domain) then > 0 , -1 otherwise

Definition at line 438 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), mapGIDToLID(), maxCofacetLID(), numMaxCofacets(), and returnParentFacets().

Array< Array<int> > Sundance::HNMesh2D::cellsChildren_ [private]

[cellID] , children of the cell

Definition at line 411 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), and refineCell().

Array< Array<int> > Sundance::HNMesh2D::cellsEdges_ [private]
Array< Array<int> > Sundance::HNMesh2D::cellsPoints_ [private]
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 472 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh().

[edgeGID] if edge is leaf(or inside the domain) then > 0 , -1 otherwise

Definition at line 454 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and mapLIDToGID().

Definition at line 392 of file SundanceHNMesh2D.hpp.

Referenced by addEdge(), createCoarseMesh(), HNMesh2D(), and refineCell().

Definition at line 391 of file SundanceHNMesh2D.hpp.

Referenced by addEdge(), createCoarseMesh(), HNMesh2D(), and refineCell().

[leaf_edgeGID] , the value must be a positive number

Definition at line 448 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and mapGIDToLID().

[leaf_edgeLID] , the value must be a positive number

Definition at line 430 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), facetLID(), getCellDiameters(), getJacobians(), isElementHangingNode(), mapLIDToGID(), maxCofacetLID(), numMaxCofacets(), ownerProcID(), and pushForward().

[edgeLID] if edge is leaf(or inside the domain) then > 0 , -1 otherwise

Definition at line 436 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), facetLID(), facetLID_tree(), and mapGIDToLID().

Array< Array<int> > Sundance::HNMesh2D::edgeMaxCoF_ [private]
Array< Array<int> > Sundance::HNMesh2D::edgePoints_ [private]

[edgeID][2]

Definition at line 378 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 381 of file SundanceHNMesh2D.hpp.

Referenced by addEdge(), HNMesh2D(), and maxCofacetLID().

Array< Array< short int > > Sundance::HNMesh2D::elementOwner_ [private]

contains the ownership of the local elements [dim][ID]

Definition at line 396 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), addEdge(), addVertex(), createLeafNumbering(), HNMesh2D(), 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 421 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 401 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 407 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), createLeafNumbering(), HNMesh2D(), oneRefinementIteration(), and refineCell().

Array<bool> Sundance::HNMesh2D::isCellOut_ [private]

[cellID] , if the cell is complete outside the user defined mesh domain

Definition at line 409 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), createLeafNumbering(), HNMesh2D(), and oneRefinementIteration().

Array<bool> Sundance::HNMesh2D::isEdgeHanging_ [private]

[edgeID] , true if the edge is hanging , false otherwise

Definition at line 416 of file SundanceHNMesh2D.hpp.

Referenced by addEdge(), createLeafNumbering(), HNMesh2D(), isElementHangingNode(), oneRefinementIteration(), and refineCell().

Array<bool> Sundance::HNMesh2D::isPointHanging_ [private]

[pointID] , true if the node is hanging , false otherwise

Definition at line 414 of file SundanceHNMesh2D.hpp.

Referenced by addVertex(), createLeafNumbering(), HNMesh2D(), isElementHangingNode(), and refineCell().

Definition at line 361 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), and createMesh().

Definition at line 343 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), createLeafNumbering(), and HNMesh2D().

Definition at line 460 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and HNMesh2D().

Definition at line 442 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), HNMesh2D(), and numCells().

Definition at line 461 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and HNMesh2D().

Definition at line 443 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), HNMesh2D(), and numCells().

Array<int> Sundance::HNMesh2D::nrElem_ [private]
Array<int> Sundance::HNMesh2D::nrElemOwned_ [private]

[3] the nr of owned elements per dim

Definition at line 369 of file SundanceHNMesh2D.hpp.

Referenced by HNMesh2D().

Number of processors.

Definition at line 342 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), and HNMesh2D().

leaf GID numbering

Definition at line 459 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and HNMesh2D().

leaf LID numbering

Definition at line 441 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), 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 466 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 469 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh().

Array<int> Sundance::HNMesh2D::parentCellLID_ [private]

[cellID] , the LID of the parent cell

Definition at line 403 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), createLeafNumbering(), HNMesh2D(), oneRefinementIteration(), and returnParentFacets().

Array< Array<int> > Sundance::HNMesh2D::pointMaxCoF_ [private]
Array<short int> Sundance::HNMesh2D::refineCell_ [private]

Neighbor Cell can mark the cell to provoke refinement.

Definition at line 423 of file SundanceHNMesh2D.hpp.

Referenced by addCell(), HNMesh2D(), and oneRefinementIteration().

RefinementClass Sundance::HNMesh2D::refineClass_ [mutable, private]

Definition at line 359 of file SundanceHNMesh2D.hpp.

Referenced by createCoarseMesh(), createMesh(), and oneRefinementIteration().

[vertexGID] if vertex is inside the domain then > 0 , -1 otherwise

Definition at line 452 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and mapLIDToGID().

[leaf_vertexGID] , the value must be a positive number

Definition at line 446 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), and mapGIDToLID().

[leaf_vertexLID] , the value must be a positive number

Definition at line 428 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), isElementHangingNode(), mapLIDToGID(), maxCofacetLID(), nodePosition(), nodePositionView(), numMaxCofacets(), and ownerProcID().

[vertexLID] if vertex is inside the domain then > 0 , -1 otherwise

Definition at line 434 of file SundanceHNMesh2D.hpp.

Referenced by createLeafNumbering(), facetLID(), facetLID_tree(), and mapGIDToLID().

Site Contact