Sundance::NodalDOFMap Class Reference

Inheritance diagram for Sundance::NodalDOFMap:

Sundance::SpatiallyHomogeneousDOFMapBase Sundance::DOFMapBase Playa::Printable

List of all members.

Public Member Functions

 NodalDOFMap (const Mesh &mesh, int nFuncs, const CellFilter &maxCellFilter, int setupVerb)
virtual ~NodalDOFMap ()
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 MapStructuremapStruct () const
int nFuncs () const

Protected Member Functions

void init ()
void computeOffsets (int localCount)
void shareRemoteDOFs (const Array< Array< int > > &remoteNodes)

Protected Attributes

CellFilter maxCellFilter_
int dim_
int nFuncs_
int nElems_
int nNodes_
int nNodesPerElem_
Array< int > elemDofs_
Array< int > nodeDofs_
RCP< const MapStructurestructure_


Detailed Description

Definition at line 48 of file SundanceNodalDOFMap.hpp.


Constructor & Destructor Documentation

NodalDOFMap::NodalDOFMap ( const Mesh mesh,
int  nFuncs,
const CellFilter maxCellFilter,
int  setupVerb 
)

Definition at line 45 of file SundanceNodalDOFMap.cpp.

References init().

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

Definition at line 57 of file SundanceNodalDOFMap.hpp.


Member Function Documentation

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

RCP< const MapStructure > NodalDOFMap::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 65 of file SundanceNodalDOFMap.cpp.

References Sundance::DOFMapBase::batchedDofLookupTimer(), dim_, elemDofs_, Sundance::Mesh::getFacetLIDs(), Sundance::DOFMapBase::mesh(), nFuncs_, nNodesPerElem_, nodeDofs_, Sundance::Mesh::numFacets(), structure_, and SUNDANCE_MSG3.

void NodalDOFMap::init (  )  [protected]

RCP<const MapStructure> Sundance::NodalDOFMap::mapStruct (  )  const [inline, virtual]

Implements Sundance::SpatiallyHomogeneousDOFMapBase.

Definition at line 69 of file SundanceNodalDOFMap.hpp.

References structure_.

int Sundance::NodalDOFMap::nFuncs (  )  const [inline]

Definition at line 73 of file SundanceNodalDOFMap.hpp.

References nFuncs_.

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


Member Data Documentation

int Sundance::NodalDOFMap::dim_ [protected]

Definition at line 84 of file SundanceNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch(), and init().

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

Definition at line 89 of file SundanceNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch(), and init().

Definition at line 83 of file SundanceNodalDOFMap.hpp.

Referenced by init().

Definition at line 86 of file SundanceNodalDOFMap.hpp.

Referenced by init().

Definition at line 87 of file SundanceNodalDOFMap.hpp.

Referenced by computeOffsets(), and init().

Definition at line 88 of file SundanceNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch().

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

Definition at line 90 of file SundanceNodalDOFMap.hpp.

Referenced by computeOffsets(), getDOFsForCellBatch(), init(), and shareRemoteDOFs().

Definition at line 91 of file SundanceNodalDOFMap.hpp.

Referenced by getDOFsForCellBatch(), and mapStruct().

Site Contact