Public Member Functions | |
MapBundle (const Array< RCP< DOFMapBase > > &dofMap, const Array< RCP< Array< int > > > &isBCIndex, const Array< int > &lowestLocalIndex, bool partitionBCs, int verb) | |
void | buildLocalDOFMaps (const RCP< StdFwkEvalMediator > &mediator, IntegrationCellSpecifier intCellSpec, const Array< Set< int > > &requiredFuncs, int verbosity) |
RCP< const Array< int > > | workSet (int block, bool useCofacets) const |
const RCP< DOFMapBase > & | dofMap (int b) const |
const RCP< Array< int > > & | isBCIndex (int b) const |
int | lowestLocalIndex (int b) const |
int | nCells () const |
const RCP< LocalDOFMap > & | chooseMap (int block, bool useCofacets) const |
const RCP< const MapStructure > & | mapStruct (int block, bool useCofacetCells) const |
const Array< int > & | localDOFs (int block, bool useCofacetCells, int chunk) const |
int | nNodesInChunk (int block, bool useCofacetCells, int chunk) const |
int | verb () const |
Private Attributes | |
int | verb_ |
Array< RCP< DOFMapBase > > | dofMap_ |
Array< RCP< Array< int > > > | isBCIndex_ |
Array< int > | lowestLocalIndex_ |
RCP< LocalDOFMap > | localDOFMap_ |
RCP< LocalDOFMap > | cofacetLocalDOFMap_ |
The main reason for this class is the need to maintain in some cases two local maps: one based on a set of cells, another based on a set of cofacets. In a given calculation both might be needed. The chooseMap() method is used to select the correct map for a given calculation.
A cofacet-based map will be needed when evaluating a boundary integral involving a non-Lagrange basis or a derivative of a Lagrange basis. The most common integrals are over interior cells, for which the non-cofacet map is used regardless of basis (because an interior cell has no cofacets and has all information needed for DOF mapping).
Definition at line 66 of file SundanceMapBundle.hpp.
MapBundle::MapBundle | ( | const Array< RCP< DOFMapBase > > & | dofMap, | |
const Array< RCP< Array< int > > > & | isBCIndex, | |||
const Array< int > & | lowestLocalIndex, | |||
bool | partitionBCs, | |||
int | verb | |||
) |
Definition at line 48 of file SundanceMapBundle.cpp.
void MapBundle::buildLocalDOFMaps | ( | const RCP< StdFwkEvalMediator > & | mediator, | |
IntegrationCellSpecifier | intCellSpec, | |||
const Array< Set< int > > & | requiredFuncs, | |||
int | verbosity | |||
) |
Build fast lookup tables of DOFs for local cells.
Definition at line 116 of file SundanceMapBundle.cpp.
References Sundance::AllTermsNeedCofacets, cofacetLocalDOFMap_, dofMap_, localDOFMap_, Sundance::NoTermsNeedCofacets, SUNDANCE_MSG3, and SUNDANCE_MSG4.
Referenced by Sundance::VectorFillingAssemblyKernel::buildLocalDOFMaps(), and Sundance::MatrixVectorAssemblyKernel::prepareForWorkSet().
const RCP< LocalDOFMap > & MapBundle::chooseMap | ( | int | block, | |
bool | useCofacets | |||
) | const |
Select a local DOF map according to whether cofacet cells or ordinary cells should be used.
Definition at line 94 of file SundanceMapBundle.cpp.
References cofacetLocalDOFMap_, and localDOFMap_.
Referenced by localDOFs(), mapStruct(), nNodesInChunk(), and workSet().
const RCP<DOFMapBase>& Sundance::MapBundle::dofMap | ( | int | b | ) | const [inline] |
Return the global DOF map for the b-th block
Definition at line 95 of file SundanceMapBundle.hpp.
References dofMap_.
Referenced by Sundance::MatrixVectorAssemblyKernel::insertLocalMatrixBatch(), and Sundance::VectorFillingAssemblyKernel::insertLocalVectorBatch().
const RCP<Array<int> >& Sundance::MapBundle::isBCIndex | ( | int | b | ) | const [inline] |
Return the bc indicator array for the b-th block
Definition at line 100 of file SundanceMapBundle.hpp.
References isBCIndex_.
Referenced by Sundance::MatrixVectorAssemblyKernel::insertLocalMatrixBatch(), and Sundance::VectorFillingAssemblyKernel::insertLocalVectorBatch().
const Array<int>& Sundance::MapBundle::localDOFs | ( | int | block, | |
bool | useCofacetCells, | |||
int | chunk | |||
) | const [inline] |
Definition at line 132 of file SundanceMapBundle.hpp.
References chooseMap().
Referenced by Sundance::MatrixVectorAssemblyKernel::insertLocalMatrixBatch(), and Sundance::VectorFillingAssemblyKernel::insertLocalVectorBatch().
int Sundance::MapBundle::lowestLocalIndex | ( | int | b | ) | const [inline] |
Return the lowest index owned by the b-th block
Definition at line 106 of file SundanceMapBundle.hpp.
References lowestLocalIndex_.
Referenced by Sundance::MatrixVectorAssemblyKernel::insertLocalMatrixBatch(), and Sundance::VectorFillingAssemblyKernel::insertLocalVectorBatch().
const RCP<const MapStructure>& Sundance::MapBundle::mapStruct | ( | int | block, | |
bool | useCofacetCells | |||
) | const [inline] |
Definition at line 121 of file SundanceMapBundle.hpp.
References chooseMap().
Referenced by Sundance::MatrixVectorAssemblyKernel::insertLocalMatrixBatch(), and Sundance::VectorFillingAssemblyKernel::insertLocalVectorBatch().
int MapBundle::nCells | ( | ) | const |
Definition at line 63 of file SundanceMapBundle.cpp.
References cofacetLocalDOFMap_, and localDOFMap_.
Referenced by Sundance::MatrixVectorAssemblyKernel::insertLocalMatrixBatch(), Sundance::VectorFillingAssemblyKernel::insertLocalVectorBatch(), and Sundance::MatrixVectorAssemblyKernel::writeLSMs().
int Sundance::MapBundle::nNodesInChunk | ( | int | block, | |
bool | useCofacetCells, | |||
int | chunk | |||
) | const [inline] |
Definition at line 144 of file SundanceMapBundle.hpp.
References chooseMap().
Referenced by Sundance::MatrixVectorAssemblyKernel::insertLocalMatrixBatch(), and Sundance::VectorFillingAssemblyKernel::insertLocalVectorBatch().
int Sundance::MapBundle::verb | ( | ) | const [inline] |
Return the verbosity setting
Definition at line 156 of file SundanceMapBundle.hpp.
References verb_.
RCP< const Array< int > > MapBundle::workSet | ( | int | block, | |
bool | useCofacets | |||
) | const |
Definition at line 87 of file SundanceMapBundle.cpp.
References chooseMap().
Referenced by Sundance::MatrixVectorAssemblyKernel::writeLSMs().
RCP<LocalDOFMap> Sundance::MapBundle::cofacetLocalDOFMap_ [private] |
localDOFMap is the compact map built with cofacet DOFs
Definition at line 168 of file SundanceMapBundle.hpp.
Referenced by buildLocalDOFMaps(), chooseMap(), and nCells().
Array<RCP<DOFMapBase> > Sundance::MapBundle::dofMap_ [private] |
Definition at line 160 of file SundanceMapBundle.hpp.
Referenced by buildLocalDOFMaps(), and dofMap().
Array<RCP<Array<int> > > Sundance::MapBundle::isBCIndex_ [private] |
RCP<LocalDOFMap> Sundance::MapBundle::localDOFMap_ [private] |
localDOFMap is the compact map built w/o cofacet DOFs. Either this map or the cofacet map might be used in a given calculation
Definition at line 166 of file SundanceMapBundle.hpp.
Referenced by buildLocalDOFMaps(), chooseMap(), and nCells().
Array<int> Sundance::MapBundle::lowestLocalIndex_ [private] |
int Sundance::MapBundle::verb_ [private] |