
Public Member Functions | |
| PartialElementDOFMap (const Mesh &mesh, const CellFilter &subdomain, int nFuncs, int setupVerb) | |
| virtual | ~PartialElementDOFMap () |
| RCP< const MapStructure > | getDOFsForCellBatch (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< CellFilter > | funcDomains_ |
| Array< int > | elemDofs_ |
| RCP< MapStructure > | structure_ |
| RCP< const Set< int > > | allFuncs_ |
All elements must have the same set of functions.
Definition at line 51 of file SundancePartialElementDOFMap.hpp.
| PartialElementDOFMap::PartialElementDOFMap | ( | const Mesh & | mesh, | |
| const CellFilter & | subdomain, | |||
| int | nFuncs, | |||
| int | setupVerb | |||
| ) |
Definition at line 45 of file SundancePartialElementDOFMap.cpp.
References allFuncs_, init(), nFuncs_, and Sundance::Set< Key, Compare >::put().
| virtual Sundance::PartialElementDOFMap::~PartialElementDOFMap | ( | ) | [inline, virtual] |
Definition at line 61 of file SundancePartialElementDOFMap.hpp.
| 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.
| 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] |
Definition at line 191 of file SundancePartialElementDOFMap.cpp.
References Sundance::DOFMapBase::comm(), Sundance::Mesh::comm(), elemDofs_, Playa::MPIComm::getNProc(), Playa::MPIComm::getRank(), Sundance::DOFMapBase::mesh(), nElems_, nFuncs_, Sundance::DOFMapBase::setLowestLocalDOF(), Sundance::DOFMapBase::setNumLocalDOFs(), and Sundance::DOFMapBase::setTotalNumDOFs().
Referenced by init().
| 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.
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.
| 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() 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] k=0...nDOFsPerCell[c]-1 nDOFsPerCell[c]
= mapStructure.basis(basisChunk).nNodes( spatialDim,
this->mesh()->cellType(cellDim) ) *
mapStructure.numFuncs(basisChunk)
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. |
requestedFuncSet.setDifference( this->allowedFuncsOnCellBatch(cellDim,cellLIDs) ).size() == 0
mapStructure where mapStructure = *returnVal.
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] |
Definition at line 130 of file SundancePartialElementDOFMap.cpp.
References Sundance::CellSet::begin(), Sundance::DOFMapBase::comm(), computeOffsets(), elemDofs_, Sundance::CellSet::end(), Sundance::CellFilter::getCells(), Sundance::DOFMapBase::isRemote(), Sundance::Mesh::mapLIDToGID(), Sundance::DOFMapBase::mesh(), nFuncs_, Sundance::DOFMapBase::setupVerb(), shareRemoteDOFs(), Sundance::Mesh::spatialDim(), subdomain_, and SUNDANCE_MSG1.
Referenced by PartialElementDOFMap().
| 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] |
Definition at line 220 of file SundancePartialElementDOFMap.cpp.
References Sundance::DOFMapBase::addGhostIndex(), Sundance::DOFMapBase::comm(), Sundance::Mesh::comm(), elemDofs_, Playa::MPIComm::getNProc(), Playa::MPIComm::getRank(), Sundance::Mesh::mapGIDToLID(), Sundance::DOFMapBase::mesh(), nFuncs_, Sundance::DOFMapBase::setupVerb(), Sundance::Mesh::spatialDim(), SUNDANCE_MSG2, SUNDANCE_MSG3, and SUNDANCE_MSG4.
Referenced by init().
RCP<const Set<int> > Sundance::PartialElementDOFMap::allFuncs_ [protected] |
Definition at line 99 of file SundancePartialElementDOFMap.hpp.
Referenced by PartialElementDOFMap().
int Sundance::PartialElementDOFMap::dim_ [protected] |
Definition at line 92 of file SundancePartialElementDOFMap.hpp.
Referenced by getDOFsForCellBatch().
Array<int> Sundance::PartialElementDOFMap::elemDofs_ [protected] |
Definition at line 97 of file SundancePartialElementDOFMap.hpp.
Referenced by computeOffsets(), getDOFsForCellBatch(), init(), print(), and shareRemoteDOFs().
Array<CellFilter> Sundance::PartialElementDOFMap::funcDomains_ [protected] |
int Sundance::PartialElementDOFMap::nElems_ [protected] |
int Sundance::PartialElementDOFMap::nFuncs_ [protected] |
Definition at line 93 of file SundancePartialElementDOFMap.hpp.
Referenced by computeOffsets(), getDOFsForCellBatch(), init(), PartialElementDOFMap(), and shareRemoteDOFs().
RCP<MapStructure> Sundance::PartialElementDOFMap::structure_ [protected] |
Definition at line 98 of file SundancePartialElementDOFMap.hpp.
Referenced by getDOFsForCellBatch().
CellFilter Sundance::PartialElementDOFMap::subdomain_ [protected] |