Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
Sundance::MixedDOFMapHN Class Reference
Inheritance diagram for Sundance::MixedDOFMapHN:
Sundance::HNDoFMapBaseHomogeneous Sundance::SpatiallyHomogeneousDOFMapBase Sundance::HNDoFMapBase Sundance::DOFMapBase Playa::Printable

List of all members.

Public Member Functions

 MixedDOFMapHN (const Mesh &mesh, const Array< RCP< BasisDOFTopologyBase > > &basis, const CellFilter &maxCells, int setupVerb)
virtual ~MixedDOFMapHN ()
RCP< const MapStructuregetDOFsForCellBatch (int cellDim, const Array< int > &cellLID, const Set< int > &requestedFuncSet, Array< Array< int > > &dofs, Array< int > &nNodes, int verbosity) const
void getTrafoMatrixForCell (int cellLID, int funcID, int &trafoMatrixSize, bool &doTransform, Array< double > &transfMatrix) const
void getTrafoMatrixForFacet (int cellDim, int cellLID, int facetIndex, int funcID, int &trafoMatrixSize, bool &doTransform, Array< double > &transfMatrix) const
void getDOFsForHNCell (int cellDim, int cellLID, int funcID, Array< int > &dofs, Array< double > &coefs) const
RCP< const MapStructuremapStruct () const
int chunkForFuncID (int funcID) const
int indexForFuncID (int funcID) const
int nFuncs (int basisChunk) const
int nBasisChunks () const
const RCP< BasisDOFTopologyBase > & basis (int basisChunk) const
const Array< int > & funcID (int basisChunk) const

Private Member Functions

void checkTable () const
int getInitialDOFForCell (int cellDim, int cellLID, int basisChunk) const
int * getInitialDOFPtrForCell (int cellDim, int cellLID, int basisChunk)
const int * getInitialDOFPtrForCell (int cellDim, int cellLID, int basisChunk) const
void allocate (const Mesh &mesh)
void buildMaximalDofTable ()
bool hasBeenAssigned (int cellDim, int cellLID) const
void markAsAssigned (int cellDim, int cellLID)
void initMap ()
void setDOFs (int basisChunk, int cellDim, int cellLID, int &nextDOF, bool isRemote=false)
void shareDOFs (int cellDim, const Array< Array< int > > &outgoingCellRequests)
void computeOffsets (int dim, int localCount)

Static Private Member Functions

static int uninitializedVal ()

Private Attributes

CellFilter maxCells_
int dim_
Array< Array< Array< int > > > dofs_
Array< Array< int > > maximalDofs_
bool haveMaximalDofs_
Array< Array< Array< Array
< Array< int > > > > > 
localNodePtrs_
int nPoints_
Array< bool > hasCellHanging_
Array< Array< bool > > isElementHanging_
Sundance::Map< int, Array< int > > HN_To_globalFacetsLID_
Sundance::Map< int, Array< int > > HN_To_globalFacetsDim_
Sundance::Map< int, Array
< double > > 
HN_To_coeffs_
Sundance::Map< int, Array< int > > maxCellLIDwithHN_to_TrafoMatrix_
MatrixStore matrixStore_
Array< RCP< BasisFamilyBase > > basis_
Array< Array< int > > nNodesPerCell_
Array< Array< int > > nDofsPerCell_
Array< Array< int > > totalNNodesPerCell_
Array< Array< int > > totalNDofsPerCell_
Array< int > cellHasAnyDOFs_
Array< Array< int > > numFacets_
Array< Array< int > > originalFacetOrientation_
Array< Array< int > > hasBeenAssigned_
RCP< const MapStructurestructure_
Array< int > nFuncs_

Detailed Description

A MixedDOFMapHN is a DOF map for the case where every function is defined on every cell in the mesh, but where functions may have different bases.
MixedDOFMapHN is defined on meshes with hanging nodes, it builds the restriction matrix where it is needed.

Definition at line 67 of file SundanceMixedDOFMapHN.hpp.


Constructor & Destructor Documentation

MixedDOFMapHN::MixedDOFMapHN ( const Mesh mesh,
const Array< RCP< BasisDOFTopologyBase > > &  basis,
const CellFilter maxCells,
int  setupVerb 
)
virtual Sundance::MixedDOFMapHN::~MixedDOFMapHN ( ) [inline, virtual]

Definition at line 77 of file SundanceMixedDOFMapHN.hpp.


Member Function Documentation

void MixedDOFMapHN::allocate ( const Mesh mesh) [private]
const RCP<BasisDOFTopologyBase>& Sundance::MixedDOFMapHN::basis ( int  basisChunk) const [inline]

Definition at line 149 of file SundanceMixedDOFMapHN.hpp.

References structure_.

Referenced by allocate(), and MixedDOFMapHN().

void MixedDOFMapHN::checkTable ( ) const [private]
int Sundance::MixedDOFMapHN::chunkForFuncID ( int  funcID) const [inline]
void MixedDOFMapHN::computeOffsets ( int  dim,
int  localCount 
) [private]
const Array<int>& Sundance::MixedDOFMapHN::funcID ( int  basisChunk) const [inline]

Definition at line 153 of file SundanceMixedDOFMapHN.hpp.

References structure_.

RCP< const MapStructure > MixedDOFMapHN::getDOFsForCellBatch ( int  cellDim,
const Array< int > &  cellLID,
const Set< int > &  requestedFuncSet,
Array< Array< int > > &  dofs,
Array< int > &  nNodes,
int  verbosity 
) const [virtual]
void MixedDOFMapHN::getDOFsForHNCell ( int  cellDim,
int  cellLID,
int  funcID,
Array< int > &  dofs,
Array< double > &  coefs 
) const [virtual]

See subclass for docu We can be sure that this is used only for nodal data (for VTK plotting)
This is implemented only for Nodal data call !!!

Function for nodal plotting

Implements Sundance::HNDoFMapBase.

Definition at line 1267 of file SundanceMixedDOFMapHN.cpp.

References chunkForFuncID(), Sundance::Map< Key, Value, Compare >::containsKey(), dofs_, Sundance::Map< Key, Value, Compare >::get(), HN_To_coeffs_, HN_To_globalFacetsDim_, HN_To_globalFacetsLID_, indexForFuncID(), nDofsPerCell_, nNodesPerCell_, nPoints_, Sundance::DOFMapBase::setupVerb(), and SUNDANCE_MSG1.

int Sundance::MixedDOFMapHN::getInitialDOFForCell ( int  cellDim,
int  cellLID,
int  basisChunk 
) const [inline, private]

Definition at line 163 of file SundanceMixedDOFMapHN.hpp.

References Sundance::DOFMapBase::cellDim(), dofs_, and nDofsPerCell_.

Referenced by shareDOFs().

int* Sundance::MixedDOFMapHN::getInitialDOFPtrForCell ( int  cellDim,
int  cellLID,
int  basisChunk 
) [inline, private]

Definition at line 168 of file SundanceMixedDOFMapHN.hpp.

References Sundance::DOFMapBase::cellDim(), dofs_, and nDofsPerCell_.

Referenced by setDOFs().

const int* Sundance::MixedDOFMapHN::getInitialDOFPtrForCell ( int  cellDim,
int  cellLID,
int  basisChunk 
) const [inline, private]

Definition at line 173 of file SundanceMixedDOFMapHN.hpp.

References Sundance::DOFMapBase::cellDim(), dofs_, and nDofsPerCell_.

void MixedDOFMapHN::getTrafoMatrixForCell ( int  cellLID,
int  funcID,
int &  trafoMatrixSize,
bool &  doTransform,
Array< double > &  transfMatrix 
) const [virtual]

Returns the

Parameters:
cellLID[in] the maxCell LID input
funcID[in]
trafoMatrixSize[in/out]
doTransform[out]
transfMatrix[out] row major matrix

Implements Sundance::HNDoFMapBase.

Definition at line 1207 of file SundanceMixedDOFMapHN.cpp.

References chunkForFuncID(), Sundance::Map< Key, Value, Compare >::containsKey(), Sundance::Map< Key, Value, Compare >::get(), matrixStore_, maxCellLIDwithHN_to_TrafoMatrix_, Sundance::DOFMapBase::setupVerb(), and SUNDANCE_MSG1.

void MixedDOFMapHN::getTrafoMatrixForFacet ( int  cellDim,
int  cellLID,
int  facetIndex,
int  funcID,
int &  trafoMatrixSize,
bool &  doTransform,
Array< double > &  transfMatrix 
) const [virtual]

Function to apply transformation for facets

Parameters:
cellDim,thefacet dimension
cellLID,facetLID
facetIndex,facetindex in the maxCofacet
funcID[in] the function ID
trafoMatrixSize[in/out]
doTransform[out]
transfMatrix[out] (we assume that the array is already pre-sized )

Implements Sundance::HNDoFMapBase.

Definition at line 1236 of file SundanceMixedDOFMapHN.cpp.

References chunkForFuncID(), Sundance::Map< Key, Value, Compare >::containsKey(), Sundance::Map< Key, Value, Compare >::get(), matrixStore_, maxCellLIDwithHN_to_TrafoMatrix_, Sundance::Mesh::maxCofacetLID(), Sundance::DOFMapBase::mesh(), Sundance::DOFMapBase::setupVerb(), and SUNDANCE_MSG2.

bool Sundance::MixedDOFMapHN::hasBeenAssigned ( int  cellDim,
int  cellLID 
) const [inline, private]

Definition at line 185 of file SundanceMixedDOFMapHN.hpp.

References Sundance::DOFMapBase::cellDim(), and hasBeenAssigned_.

Referenced by initMap().

int Sundance::MixedDOFMapHN::indexForFuncID ( int  funcID) const [inline]

Definition at line 137 of file SundanceMixedDOFMapHN.hpp.

References structure_.

Referenced by getDOFsForHNCell().

void MixedDOFMapHN::initMap ( ) [private]
RCP<const MapStructure> Sundance::MixedDOFMapHN::mapStruct ( ) const [inline, virtual]

Implements Sundance::SpatiallyHomogeneousDOFMapBase.

Definition at line 129 of file SundanceMixedDOFMapHN.hpp.

References structure_.

void Sundance::MixedDOFMapHN::markAsAssigned ( int  cellDim,
int  cellLID 
) [inline, private]

Definition at line 188 of file SundanceMixedDOFMapHN.hpp.

References Sundance::DOFMapBase::cellDim(), and hasBeenAssigned_.

Referenced by initMap().

int Sundance::MixedDOFMapHN::nBasisChunks ( ) const [inline]

Definition at line 145 of file SundanceMixedDOFMapHN.hpp.

References nFuncs_.

Referenced by allocate(), buildMaximalDofTable(), initMap(), and shareDOFs().

int Sundance::MixedDOFMapHN::nFuncs ( int  basisChunk) const [inline]

Definition at line 141 of file SundanceMixedDOFMapHN.hpp.

References nFuncs_.

Referenced by allocate(), and buildMaximalDofTable().

void MixedDOFMapHN::setDOFs ( int  basisChunk,
int  cellDim,
int  cellLID,
int &  nextDOF,
bool  isRemote = false 
) [private]
void MixedDOFMapHN::shareDOFs ( int  cellDim,
const Array< Array< int > > &  outgoingCellRequests 
) [private]
static int Sundance::MixedDOFMapHN::uninitializedVal ( ) [inline, static, private]

Definition at line 206 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate().


Member Data Documentation

Array<RCP<BasisFamilyBase> > Sundance::MixedDOFMapHN::basis_ [mutable, private]

The basis for the transformation

Definition at line 265 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable(), and MixedDOFMapHN().

Indicates whether the cells of each dimension have any DOFs in this map, for any chunk.

Definition at line 291 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), and initMap().

spatial dimension

Definition at line 212 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), buildMaximalDofTable(), initMap(), and shareDOFs().

Array<Array<Array<int> > > Sundance::MixedDOFMapHN::dofs_ [private]

Tables of DOFs, indexed by dimension and chunk number.

dof(cellDim, cellLID, chunk, func, node) = dofs_[cellDim][chunk][(cellLID*nFunc + func)*nNode + node]

Definition at line 219 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), buildMaximalDofTable(), checkTable(), computeOffsets(), getDOFsForHNCell(), getInitialDOFForCell(), getInitialDOFPtrForCell(), and shareDOFs().

Array<Array<int> > Sundance::MixedDOFMapHN::hasBeenAssigned_ [private]

Definition at line 303 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), hasBeenAssigned(), and markAsAssigned().

Is true if the cell has hanging node

Definition at line 242 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), and buildMaximalDofTable().

whether maximal DOFs have been tabulated

Definition at line 229 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable().

Sundance::Map< int , Array<double> > Sundance::MixedDOFMapHN::HN_To_coeffs_ [private]

store the coefs [nPoints*b + facetID]

Definition at line 254 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable(), and getDOFsForHNCell().

store the facetDim of the points [nPoints*b + facetID]

Definition at line 251 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable(), and getDOFsForHNCell().

store the facetLIDs of the points [nPoints*b + facetID]

Definition at line 248 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable(), and getDOFsForHNCell().

Array< Array<bool> > Sundance::MixedDOFMapHN::isElementHanging_ [private]

Flag per element showing if the element is a hanging element

Definition at line 245 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), and setDOFs().

Array<Array<Array<Array<Array<int> > > > > Sundance::MixedDOFMapHN::localNodePtrs_ [private]

localNodePtrs_[basisChunk][cellDim][facetDim][facetNumber][nodeNumber]

Definition at line 234 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), and buildMaximalDofTable().

The object to store all the transformation matrixes

Definition at line 262 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable(), getTrafoMatrixForCell(), getTrafoMatrixForFacet(), and MixedDOFMapHN().

Maps one maxCell LID to one transformation matrix, only maxDim elements and basisChunck ID with hanging nodes should have transformation matrix [maxCellLID].get -> [basisChunckID][] is the index of trafo matrix

Definition at line 259 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable(), getTrafoMatrixForCell(), and getTrafoMatrixForFacet().

Definition at line 209 of file SundanceMixedDOFMapHN.hpp.

Referenced by initMap().

Array<Array<int> > Sundance::MixedDOFMapHN::maximalDofs_ [mutable, private]

DOFs for maximal cells, indexed by basis chunk number

dof(cellLID, chunk, func, node) = maximalDofs_[chunk][(cellLID*nFunc + func)*nNode + node];

Definition at line 226 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), and buildMaximalDofTable().

Array<Array<int> > Sundance::MixedDOFMapHN::nDofsPerCell_ [private]

The number of DOFs per cell, for each basis function type, not including the DOFs of the facets of the cell. Indexed as nDofsPerCell_[basis][dimension]

Definition at line 277 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), buildMaximalDofTable(), getDOFsForHNCell(), getInitialDOFForCell(), getInitialDOFPtrForCell(), setDOFs(), and shareDOFs().

Array<int> Sundance::MixedDOFMapHN::nFuncs_ [private]

Definition at line 309 of file SundanceMixedDOFMapHN.hpp.

Referenced by MixedDOFMapHN(), nBasisChunks(), and nFuncs().

Array<Array<int> > Sundance::MixedDOFMapHN::nNodesPerCell_ [private]

The number of nodes per cell, for each basis function type, not including the nodes of the facets of the cell. Indexed as nNodesPerCell_[basis][dimension]

Definition at line 272 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), buildMaximalDofTable(), and getDOFsForHNCell().

Nr of points, needed only by plotting

Definition at line 239 of file SundanceMixedDOFMapHN.hpp.

Referenced by buildMaximalDofTable(), getDOFsForHNCell(), and MixedDOFMapHN().

Array<Array<int> > Sundance::MixedDOFMapHN::numFacets_ [private]

number of facets of dimension facetDim for cells of dimension cellDim. Indexed as numFacets_[cellDim][facetDim]

Definition at line 296 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), and initMap().

Orientation of each edge or face as seen by the maximal cell from which its DOFs were originally assigned.

Definition at line 300 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), buildMaximalDofTable(), initMap(), and shareDOFs().

Array<Array<int> > Sundance::MixedDOFMapHN::totalNDofsPerCell_ [private]

The number of DOFs per cell, for each basis function type, including the DOFs of the facets of the cell. Indexed as nDofsPerCell_[basis][dimension]

Definition at line 287 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate().

Array<Array<int> > Sundance::MixedDOFMapHN::totalNNodesPerCell_ [private]

The number of nodes per cell, for each basis function type, including the nodes of the facets of the cell. Indexed as nNodesPerCell_[basis][dimension]

Definition at line 282 of file SundanceMixedDOFMapHN.hpp.

Referenced by allocate(), and buildMaximalDofTable().

Site Contact