Sundance::PartialElementDOFMap Class Reference

PartialElementDOFMap is a DOF map specialized to the case of element-based DOFs on a subset of cells in the domain. More...

Inheritance diagram for Sundance::PartialElementDOFMap:

Sundance::DOFMapBase Playa::Printable

List of all members.

Public Member Functions

 PartialElementDOFMap (const Mesh &mesh, const CellFilter &subdomain, int nFuncs, int setupVerb)
virtual ~PartialElementDOFMap ()
RCP< const MapStructuregetDOFsForCellBatch (int cellDim, const Array< int > &cellLID, const Set< int > &requestedFuncSet, Array< Array< int > > &dofs, Array< int > &nNodes, int verbosity) 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 init ()
void computeOffsets (int localCount)
void shareRemoteDOFs (const Array< Array< int > > &remoteElems)

Protected Attributes

int dim_
int nFuncs_
int nElems_
CellFilter subdomain_
Array< CellFilterfuncDomains_
Array< int > elemDofs_
RCP< MapStructurestructure_
RCP< const Set< int > > allFuncs_


Detailed Description

PartialElementDOFMap is a DOF map specialized to the case of element-based DOFs on a subset of cells in the domain.

All elements must have the same set of functions.

Definition at line 51 of file SundancePartialElementDOFMap.hpp.


Constructor & Destructor Documentation

PartialElementDOFMap::PartialElementDOFMap ( const Mesh mesh,
const CellFilter subdomain,
int  nFuncs,
int  setupVerb 
)

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

Definition at line 61 of file SundancePartialElementDOFMap.hpp.


Member Function Documentation

RCP< const Set< int > > PartialElementDOFMap::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 177 of file SundancePartialElementDOFMap.cpp.

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

const Array<CellFilter>& Sundance::PartialElementDOFMap::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 78 of file SundancePartialElementDOFMap.hpp.

References funcDomains_.

RCP< const MapStructure > PartialElementDOFMap::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 67 of file SundancePartialElementDOFMap.cpp.

References Sundance::DOFMapBase::batchedDofLookupTimer(), dim_, elemDofs_, Sundance::Mesh::maxCofacetLID(), Sundance::DOFMapBase::mesh(), nFuncs_, structure_, and SUNDANCE_MSG3.

void PartialElementDOFMap::init (  )  [protected]

void PartialElementDOFMap::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 314 of file SundancePartialElementDOFMap.cpp.

References elemDofs_.

void PartialElementDOFMap::shareRemoteDOFs ( const Array< Array< int > > &  remoteElems  )  [protected]


Member Data Documentation

RCP<const Set<int> > Sundance::PartialElementDOFMap::allFuncs_ [protected]

Definition at line 99 of file SundancePartialElementDOFMap.hpp.

Referenced by PartialElementDOFMap().

Definition at line 92 of file SundancePartialElementDOFMap.hpp.

Referenced by getDOFsForCellBatch().

Definition at line 96 of file SundancePartialElementDOFMap.hpp.

Referenced by funcDomains().

Definition at line 94 of file SundancePartialElementDOFMap.hpp.

Referenced by computeOffsets().

Definition at line 98 of file SundancePartialElementDOFMap.hpp.

Referenced by getDOFsForCellBatch().

Definition at line 95 of file SundancePartialElementDOFMap.hpp.

Referenced by init().

Site Contact