Panzer
Version of the Day
|
Class that provides access to worksets on each element block and side set. More...
#include <Panzer_WorksetContainer.hpp>
Public Member Functions | |
WorksetContainer () | |
Default contructor, starts with no workset factory objects. More... | |
WorksetContainer (const Teuchos::RCP< const WorksetFactoryBase > &factory, const std::vector< Teuchos::RCP< PhysicsBlock > > &physicsBlocks, std::size_t wkstSz) | |
WorksetContainer (const Teuchos::RCP< const WorksetFactoryBase > &factory, const std::map< std::string, WorksetNeeds > &needs) | |
WorksetContainer (const WorksetContainer &wc) | |
void | setFactory (const Teuchos::RCP< const WorksetFactoryBase > &factory) |
Teuchos::RCP< const WorksetFactoryBase > | getFactory () const |
Access the workset factory pointer. More... | |
void | setPhysicsBlockVector (const std::vector< Teuchos::RCP< PhysicsBlock > > &physicsBlocks) |
The physics block vector. More... | |
void | setWorksetSize (std::size_t worksetSize) |
set the workset size More... | |
std::size_t | getWorksetSize () const |
get the workset size More... | |
void | clear () |
const PhysicsBlock & | lookupPhysicsBlock (const std::string &eBlock) const |
Look up an input physics block, throws an exception if it can not be found. More... | |
const WorksetNeeds & | lookupNeeds (const std::string &eBlock) const |
Look up an input physics block, throws an exception if it can not be found. More... | |
Teuchos::RCP< std::vector< Workset > > | getVolumeWorksets (const std::string &eBlock) |
Access to volume worksets. More... | |
Teuchos::RCP< std::vector< Workset > > | getWorksets (const WorksetDescriptor &wd) |
Access to volume worksets. More... | |
Teuchos::RCP< std::map< unsigned, Workset > > | getSideWorksets (const BC &bc) |
Access, and construction of side worksets. More... | |
std::vector< Workset >::iterator | begin (const std::string &eBlock) |
Iterator access to volume worksets. More... | |
std::vector< Workset >::iterator | end (const std::string &eBlock) |
Iterator access to volume worksets. More... | |
std::map< unsigned, Workset >::iterator | begin (const BC &bc) |
Iterator access to side worksets. More... | |
std::map< unsigned, Workset >::iterator | end (const BC &bc) |
Iterator access to side worksets. More... | |
void | allocateVolumeWorksets (const std::vector< std::string > &eBlocks) |
void | allocateSideWorksets (const std::vector< BC > &bcs) |
void | setGlobalIndexer (const Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > &ugi) |
void | addBasis (const std::string &type, int order, const std::string &rep_field) |
Private Types | |
typedef std::unordered_map< WorksetDescriptor, Teuchos::RCP< std::vector< Workset > > > | VolumeMap |
typedef std::map< SideId, Teuchos::RCP< std::map< unsigned, Workset > >, LessSide > | SideMap |
Private Member Functions | |
void | applyOrientations (const Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > &ugi) |
void | applyOrientations (const std::string &eBlock, std::vector< Workset > &worksets) const |
void | applyOrientations (const SideId &sideId, std::map< unsigned, Workset > &worksets) const |
Private Attributes | |
Teuchos::RCP< const WorksetFactoryBase > | wkstFactory_ |
std::map< std::string, Teuchos::RCP< PhysicsBlock > > | ebToPb_ |
How to construct worksets. More... | |
std::map< std::string, WorksetNeeds > | ebToNeeds_ |
Maps element blocks to input physics block objects. More... | |
VolumeMap | volWorksets_ |
Maps element blocks to input physics block objects. More... | |
SideMap | sideWorksets_ |
std::size_t | worksetSize_ |
Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > | globalIndexer_ |
Class that provides access to worksets on each element block and side set.
This class provides access to worksets on each element block and side set. This is done using an optional lazy construction mechnism that builds the worksets in a just in time fashion. Because the specifics of a workset is constructed are based on the type of mesh database, each new implementation must inherit from the WorksetFactoryBase
class. This class will then use that one to handle the lazy evaluation.
Definition at line 94 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 219 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 220 of file Panzer_WorksetContainer.hpp.
panzer::WorksetContainer::WorksetContainer | ( | ) |
Default contructor, starts with no workset factory objects.
Definition at line 53 of file Panzer_WorksetContainer.cpp.
panzer::WorksetContainer::WorksetContainer | ( | const Teuchos::RCP< const WorksetFactoryBase > & | factory, |
const std::vector< Teuchos::RCP< PhysicsBlock > > & | physicsBlocks, | ||
std::size_t | wkstSz | ||
) |
Instantiate a workset object with a specified factory and input physics block map.
[in] | factory | Factory to be used for constructing worksets |
[in] | physicsBlocks | Vector of physics blocks |
[in] | wkstSz | Number of elements in a workset built by this container |
Definition at line 57 of file Panzer_WorksetContainer.cpp.
panzer::WorksetContainer::WorksetContainer | ( | const Teuchos::RCP< const WorksetFactoryBase > & | factory, |
const std::map< std::string, WorksetNeeds > & | needs | ||
) |
Instantiate a workset object with a specified factory and input workset needs map.
[in] | factory | Factory to be used for constructing worksets |
[in] | needs | Workset needs mapped from the elemetn blocks (integration rules and basis values for each element block) |
Definition at line 65 of file Panzer_WorksetContainer.cpp.
panzer::WorksetContainer::WorksetContainer | ( | const WorksetContainer & | wc | ) |
Copies the workset factory, the PhysicsBlock vector, and the workset size, but not constructed worksets.
Copies the workset factory and the workset size, but not constructed worksets.
Definition at line 76 of file Panzer_WorksetContainer.cpp.
|
inline |
Set the workset factory, and as a consequence clear out all previously computed worksets.
Definition at line 128 of file Panzer_WorksetContainer.hpp.
|
inline |
Access the workset factory pointer.
Definition at line 132 of file Panzer_WorksetContainer.hpp.
void panzer::WorksetContainer::setPhysicsBlockVector | ( | const std::vector< Teuchos::RCP< PhysicsBlock > > & | physicsBlocks | ) |
The physics block vector.
Definition at line 82 of file Panzer_WorksetContainer.cpp.
|
inline |
set the workset size
Definition at line 139 of file Panzer_WorksetContainer.hpp.
|
inline |
get the workset size
Definition at line 143 of file Panzer_WorksetContainer.hpp.
void panzer::WorksetContainer::clear | ( | ) |
Clear all allocated worksets, maintain the workset factory and element to physics block map.
Definition at line 126 of file Panzer_WorksetContainer.cpp.
const PhysicsBlock & panzer::WorksetContainer::lookupPhysicsBlock | ( | const std::string & | eBlock | ) | const |
Look up an input physics block, throws an exception if it can not be found.
Look up an input physics block, throws an exception if it can be found.
Definition at line 133 of file Panzer_WorksetContainer.cpp.
const WorksetNeeds & panzer::WorksetContainer::lookupNeeds | ( | const std::string & | eBlock | ) | const |
Look up an input physics block, throws an exception if it can not be found.
Look up an input physics block, throws an exception if it can be found.
Definition at line 145 of file Panzer_WorksetContainer.cpp.
Teuchos::RCP< std::vector< Workset > > panzer::WorksetContainer::getVolumeWorksets | ( | const std::string & | eBlock | ) |
Access to volume worksets.
Access, and construction of volume worksets.
Definition at line 158 of file Panzer_WorksetContainer.cpp.
Teuchos::RCP< std::vector< Workset > > panzer::WorksetContainer::getWorksets | ( | const WorksetDescriptor & | wd | ) |
Access to volume worksets.
Definition at line 166 of file Panzer_WorksetContainer.cpp.
Teuchos::RCP< std::map< unsigned, Workset > > panzer::WorksetContainer::getSideWorksets | ( | const BC & | bc | ) |
Access, and construction of side worksets.
Definition at line 190 of file Panzer_WorksetContainer.cpp.
|
inline |
Iterator access to volume worksets.
Definition at line 167 of file Panzer_WorksetContainer.hpp.
|
inline |
Iterator access to volume worksets.
Definition at line 171 of file Panzer_WorksetContainer.hpp.
Iterator access to side worksets.
Definition at line 175 of file Panzer_WorksetContainer.hpp.
Iterator access to side worksets.
Definition at line 179 of file Panzer_WorksetContainer.hpp.
void panzer::WorksetContainer::allocateVolumeWorksets | ( | const std::vector< std::string > & | eBlocks | ) |
Allocate worksets associated with the element blocks in a vector, this will overwrite any previously constructed worksets.
Definition at line 221 of file Panzer_WorksetContainer.cpp.
void panzer::WorksetContainer::allocateSideWorksets | ( | const std::vector< BC > & | bcs | ) |
Allocate worksets associated with the BC objects in a vector, this will overwrite any previously constructed worksets.
Definition at line 238 of file Panzer_WorksetContainer.cpp.
void panzer::WorksetContainer::setGlobalIndexer | ( | const Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > & | ugi | ) |
Set the global indexer. This is used solely for accessing the orientations.
Definition at line 257 of file Panzer_WorksetContainer.cpp.
void panzer::WorksetContainer::addBasis | ( | const std::string & | type, |
int | order, | ||
const std::string & | rep_field | ||
) |
Add a basis to the worksets (if required). If reuqired this will clear the workset reconstructing all the arrays. Add to all element blocks.
Definition at line 264 of file Panzer_WorksetContainer.cpp.
|
private |
Set the orientations. Can only be called once, this also sets the internally stored global indexer. If an exception is raised, saying it wasn't null then this method has been previously called.
Definition at line 283 of file Panzer_WorksetContainer.cpp.
|
private |
Using the stored global indexer, set the orientations for a volume workset on a specified element block.
Definition at line 308 of file Panzer_WorksetContainer.cpp.
|
private |
Using the stored global indexer, set the orientations for a side workset.
Definition at line 384 of file Panzer_WorksetContainer.cpp.
|
private |
Definition at line 222 of file Panzer_WorksetContainer.hpp.
|
private |
How to construct worksets.
Definition at line 223 of file Panzer_WorksetContainer.hpp.
|
private |
Maps element blocks to input physics block objects.
Definition at line 224 of file Panzer_WorksetContainer.hpp.
|
private |
Maps element blocks to input physics block objects.
Definition at line 226 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 227 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 229 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 231 of file Panzer_WorksetContainer.hpp.