Sundance::InhomogeneousNodalDOFMap Class Reference

Inheritance diagram for Sundance::InhomogeneousNodalDOFMap:

Sundance::DOFMapBase Playa::Printable

List of all members.

Public Member Functions

 InhomogeneousNodalDOFMap (const Mesh &mesh, const Array< Map< Set< int >, CellFilter > > &funcSetToDomainMap, int setupVerb)
virtual ~InhomogeneousNodalDOFMap ()
RCP< const MapStructuregetDOFsForCellBatch (int cellDim, const Array< int > &cellLID, const Set< int > &requestedFuncSet, Array< Array< int > > &dofs, Array< int > &nNodes, int verb) const
 Return the global DOFs for a batch of cells for a given set of functions on those cells.
RCP< const Set< int > > allowedFuncsOnCellBatch (int cellDim, const Array< int > &cellLID) const
 Return the set of a function IDs for a batch of cells for which DOFs can be obtained.
const Array< CellFilter > & funcDomains () const
 Return an array of cell filters that gives, for each function ID, the cells that the function lives on.
virtual void print (std::ostream &os) const
 Print the DOF map.

Protected Member Functions

void getFunctionDofs (int cellDim, const Array< int > &cellLID, const Array< int > &facetLID, const Array< int > &funcs, Array< Array< int > > &dofs) const
Array< int > dofsOnCell (int cellDim, int cellLID, const Set< int > &reqFuncs) const
void init ()
void computeOffsets (int localCount)
void shareRemoteDOFs (const Array< Array< int > > &remoteNodes)
void assignNode (int fLID, int funcComboIndex, int dofOffset, int nFuncs, Array< Array< int > > &remoteNodes, Array< int > &hasProcessedCell, int &nextDOF)

Protected Attributes

int dim_
RCP< BasisDOFTopologyBasebasis_
int nTotalFuncs_
Array< CellFilterfuncDomains_
Array< Array< int > > nodeDofs_
Array< Array< int > > elemDofs_
Array< int > nodeToFuncSetIndexMap_
Array< int > elemToFuncSetIndexMap_
Array< Set< int > > elemFuncSets_
Array< Set< int > > nodalFuncSets_
Array< int > nodeToOffsetMap_
Array< int > elemToOffsetMap_
Array< Array< int > > funcIndexWithinNodeFuncSet_
Array< RCP< const MapStructure > > elemStructure_
Array< RCP< const MapStructure > > nodeStructure_


Detailed Description

Definition at line 49 of file SundanceInhomogeneousNodalDOFMap.hpp.


Constructor & Destructor Documentation

InhomogeneousNodalDOFMap::InhomogeneousNodalDOFMap ( const Mesh mesh,
const Array< Map< Set< int >, CellFilter > > &  funcSetToDomainMap,
int  setupVerb 
)

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

Definition at line 58 of file SundanceInhomogeneousNodalDOFMap.hpp.


Member Function Documentation

RCP< const Set< int > > InhomogeneousNodalDOFMap::allowedFuncsOnCellBatch ( int  cellDim,
const Array< int > &  cellLIDs 
) const [virtual]

Return the set of a function IDs for a batch of cells for which DOFs can be obtained.

Parameters:
cellDim [in] The dimension of the cells in the batch of cells
cellLIDs [in] Local IDs (LIDs) for the batch of cells

Implements Sundance::DOFMapBase.

Definition at line 410 of file SundanceInhomogeneousNodalDOFMap.cpp.

References dim_, elemFuncSets_, elemToFuncSetIndexMap_, Sundance::Mesh::getFacetLIDs(), Sundance::Set< Key, Compare >::intersection(), Sundance::DOFMapBase::mesh(), nodalFuncSets_, and nodeToFuncSetIndexMap_.

Referenced by print().

void InhomogeneousNodalDOFMap::assignNode ( int  fLID,
int  funcComboIndex,
int  dofOffset,
int  nFuncs,
Array< Array< int > > &  remoteNodes,
Array< int > &  hasProcessedCell,
int &  nextDOF 
) [protected]

void InhomogeneousNodalDOFMap::computeOffsets ( int  localCount  )  [protected]

Array<int> Sundance::InhomogeneousNodalDOFMap::dofsOnCell ( int  cellDim,
int  cellLID,
const Set< int > &  reqFuncs 
) const [protected]

const Array<CellFilter>& Sundance::InhomogeneousNodalDOFMap::funcDomains (  )  const [inline, virtual]

Return an array of cell filters that gives, for each function ID, the cells that the function lives on.

Returns:
A reference to an array of size returnVal.size() == numTotalFunctcions where returnVal[funcID] gives a handle to a CellFilterBase object where the function funcID lives, where 0 <= funcID < numTotalFunctions.

Implements Sundance::DOFMapBase.

Definition at line 84 of file SundanceInhomogeneousNodalDOFMap.hpp.

References funcDomains_.

RCP< const MapStructure > InhomogeneousNodalDOFMap::getDOFsForCellBatch ( int  cellDim,
const Array< int > &  cellLIDs,
const Set< int > &  requestedFuncSet,
Array< Array< int > > &  dofs,
Array< int > &  nNodes,
int  verb 
) const [virtual]

Return the global DOFs for a batch of cells for a given set of functions on those cells.

Parameters:
cellDim [in] The dimension of the cells in the batch of cells
cellLIDs [in] Local IDs (LIDs) for the batch of cells
requestedFuncSet [in] Set of function IDs for which DOFs are requested. Note that this must be equal to the allowed set of requested functions this->allowedFuncsOnCellBatch(cellDim,cellLIDs).
dofs [out] Global IDs for DOFs of the requested functions on the batch of cells. The size of this array on output is
           dofs.size()==mapStructure.numBasisChunks() 
. The global DOFs for cell cellLIDs[c] (where 0 <= c < cellLIDs.size()) for the cell for the basis chunk basisChunk (where 0 <= basisChunk < mapStructure.numBasisChunks()) are given by
           dofs[c*nDOFsPerCell[c]+k] 
, where
           k=0...nDOFsPerCell[c]-1 
and
 nDOFsPerCell[c]
           = mapStructure.basis(basisChunk).nNodes( spatialDim,
           this->mesh()->cellType(cellDim) ) *
           mapStructure.numFuncs(basisChunk) 
. Note that the array nDOFsPerCell used above is not actually computed here or returned by this interface. It is only used abstractly to define the dofs array above.
nNodes [out] Array giving the number of coefficients for each type of basis family in mapStructure for each function. The size of this array on return is nNodes.size()==mapStructure.numBasisChunks() and nNodes[b]==mapStructure.basis(b).nNodes(spatialDim,cellType), for b=0...mapStructure.numBasisChunks()-1.
Preconditions:
  • requestedFuncSet.setDifference( this->allowedFuncsOnCellBatch(cellDim,cellLIDs) ).size() == 0
  • ???Others???

Returns:
The map structure that groups sets of different functions according with respect to those that have the same basis family. Above, we will refer to this returned object as mapStructure where mapStructure = *returnVal.
ToDo: Remove the argument requestedFuncSet since all current use cases and implemenations asume that all of the functions are requested and returned.

ToDo: Remove the nNodes return argument since this information can be gotten just from the return mapStructure object. Specifically, nNodes[basisChunk] = mapStructure.basis(basisChunk).nNodes(spatialDim,cellType) so what is the point in returning this array? Since this is needed for a whole batch of cells, it is cheap to just grab this from the returned mapStructure object as shown above.

Implements Sundance::DOFMapBase.

Definition at line 450 of file SundanceInhomogeneousNodalDOFMap.cpp.

References basis_, Sundance::DOFMapBase::batchedDofLookupTimer(), dim_, Sundance::Set< Key, Compare >::elements(), elemFuncSets_, elemStructure_, elemToFuncSetIndexMap_, Sundance::Mesh::getFacetLIDs(), getFunctionDofs(), Sundance::DOFMapBase::isHomogeneous(), Sundance::DOFMapBase::mesh(), nodalFuncSets_, nodeStructure_, nodeToFuncSetIndexMap_, nTotalFuncs_, Sundance::Mesh::numFacets(), Playa::Out::os(), Sundance::Set< Key, Compare >::setDifference(), and SUNDANCE_MSG2.

void InhomogeneousNodalDOFMap::getFunctionDofs ( int  cellDim,
const Array< int > &  cellLID,
const Array< int > &  facetLID,
const Array< int > &  funcs,
Array< Array< int > > &  dofs 
) const [protected]

void Sundance::InhomogeneousNodalDOFMap::init (  )  [protected]

void InhomogeneousNodalDOFMap::print ( std::ostream &  os  )  const [virtual]

Print the DOF map.

ToDo: Replace this with override of Teuchos::Describable::describe().

Implements Sundance::DOFMapBase.

Definition at line 571 of file SundanceInhomogeneousNodalDOFMap.cpp.

References allowedFuncsOnCellBatch(), dim_, Sundance::DOFMapBase::getDOFsForCell(), Sundance::DOFMapBase::mesh(), and Sundance::Mesh::numCells().

void InhomogeneousNodalDOFMap::shareRemoteDOFs ( const Array< Array< int > > &  remoteNodes  )  [protected]


Member Data Documentation

Definition at line 111 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch().

Array<Array<int> > Sundance::InhomogeneousNodalDOFMap::elemDofs_ [protected]

Definition at line 116 of file SundanceInhomogeneousNodalDOFMap.hpp.

Definition at line 126 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch().

Definition at line 122 of file SundanceInhomogeneousNodalDOFMap.hpp.

Definition at line 113 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by funcDomains().

Definition at line 124 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by getFunctionDofs().

Array<Array<int> > Sundance::InhomogeneousNodalDOFMap::nodeDofs_ [protected]

Definition at line 115 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by assignNode(), and getFunctionDofs().

Definition at line 127 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch().

Definition at line 121 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by getFunctionDofs().

Definition at line 112 of file SundanceInhomogeneousNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch().

Site Contact