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::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 | setWorksetSize (std::size_t worksetSize) |
set the workset size More... | |
std::size_t | getWorksetSize () const |
get the workset size More... | |
void | setNeeds (const std::string &eBlock, const WorksetNeeds &needs) |
void | clear () |
void | clearVolumeWorksets () |
void | clearSideWorksets () |
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 > > | getWorksets (const WorksetDescriptor &wd) |
Access to volume worksets. More... | |
Teuchos::RCP< std::map < unsigned, Workset > > | getSideWorksets (const WorksetDescriptor &desc) |
Access, and construction of side worksets. More... | |
void | setGlobalIndexer (const Teuchos::RCP< const panzer::GlobalIndexer > &ugi) |
void | addBasis (const std::string &type, int order, const std::string &rep_field) |
Teuchos::RCP< const std::vector < Intrepid2::Orientation > > | getOrientations () const |
Private Types | |
typedef std::unordered_map < WorksetDescriptor, Teuchos::RCP< std::vector < Workset > > > | WorksetMap |
typedef std::unordered_map < WorksetDescriptor, Teuchos::RCP< std::map < unsigned, Workset > > > | SideMap |
Private Member Functions | |
void | applyOrientations (const Teuchos::RCP< const panzer::GlobalIndexer > &ugi) |
void | applyOrientations (const std::vector< Intrepid2::Orientation > &orientations, const std::string &eBlock, std::vector< Workset > &worksets) const |
void | applyOrientations (const std::vector< Intrepid2::Orientation > &orientations, const WorksetDescriptor &desc, std::map< unsigned, Workset > &worksets) const |
void | applyOrientations (const std::string &eBlock, std::vector< Workset > &worksets) const |
void | applyOrientations (const WorksetDescriptor &desc, std::map< unsigned, Workset > &worksets) const |
void | setIdentifiers (const WorksetDescriptor &wd, std::vector< Workset > &worksets) |
void | setIdentifiers (const WorksetDescriptor &wd, std::map< unsigned, Workset > &wkstMap) |
Private Attributes | |
Teuchos::RCP< const WorksetFactoryBase > | wkstFactory_ |
std::map< std::string, WorksetNeeds > | ebToNeeds_ |
How to construct worksets. More... | |
WorksetMap | worksets_ |
Maps element blocks to input physics block objects. More... | |
SideMap | sideWorksets_ |
std::size_t | worksetSize_ |
Teuchos::RCP< const panzer::GlobalIndexer > | globalIndexer_ |
Teuchos::RCP< std::vector < Intrepid2::Orientation > > | orientations_ |
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 73 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 185 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 186 of file Panzer_WorksetContainer.hpp.
panzer::WorksetContainer::WorksetContainer | ( | ) |
Default contructor, starts with no workset factory objects.
Definition at line 55 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 element blocks (integration rules and basis values for each element block) |
Definition at line 58 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 69 of file Panzer_WorksetContainer.cpp.
|
inline |
Set the workset factory, and as a consequence clear out all previously computed worksets.
Definition at line 96 of file Panzer_WorksetContainer.hpp.
|
inline |
Access the workset factory pointer.
Definition at line 100 of file Panzer_WorksetContainer.hpp.
|
inline |
set the workset size
Definition at line 104 of file Panzer_WorksetContainer.hpp.
|
inline |
get the workset size
Definition at line 108 of file Panzer_WorksetContainer.hpp.
void panzer::WorksetContainer::setNeeds | ( | const std::string & | eBlock, |
const WorksetNeeds & | needs | ||
) |
Set the needs for an element block. Note any old needs will be erased, and all worksets will be deleted. This is equivalent to calling clear();
then setNeeds()
. This clearing is required in order to for the worksets to remain consistent.
[in] | eBlock | Element block associated with the needs object |
[in] | needs | Needs for the element block. |
Definition at line 95 of file Panzer_WorksetContainer.cpp.
void panzer::WorksetContainer::clear | ( | ) |
Clear all allocated worksets, maintain the workset factory and element to physics block map.
Definition at line 78 of file Panzer_WorksetContainer.cpp.
void panzer::WorksetContainer::clearVolumeWorksets | ( | ) |
Clear all allocated worksets for the volume assembly, maintain the workset factory, element to physics block map and side worksets. This is meant for cases where volume assembly is needed during setup, but during a run only side worksets are needed to adjust boundary conditions. This allows for significant memory savings.
Definition at line 84 of file Panzer_WorksetContainer.cpp.
void panzer::WorksetContainer::clearSideWorksets | ( | ) |
Clear all allocated worksets for the side assembly, maintain the workset factory, element to physics block map and volume worksets.
Definition at line 89 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 102 of file Panzer_WorksetContainer.cpp.
Teuchos::RCP< std::vector< Workset > > panzer::WorksetContainer::getWorksets | ( | const WorksetDescriptor & | wd | ) |
Access to volume worksets.
Definition at line 114 of file Panzer_WorksetContainer.cpp.
Teuchos::RCP< std::map< unsigned, Workset > > panzer::WorksetContainer::getSideWorksets | ( | const WorksetDescriptor & | desc | ) |
Access, and construction of side worksets.
Definition at line 142 of file Panzer_WorksetContainer.cpp.
void panzer::WorksetContainer::setGlobalIndexer | ( | const Teuchos::RCP< const panzer::GlobalIndexer > & | ugi | ) |
Set the global indexer. This is used solely for accessing the orientations.
Definition at line 178 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 185 of file Panzer_WorksetContainer.cpp.
|
inline |
Get the cell orientations used to build the basis values objects.
Definition at line 162 of file Panzer_WorksetContainer.hpp.
|
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 204 of file Panzer_WorksetContainer.cpp.
|
private |
Using the stored global indexer, set the orientations for a volume workset on a specified element block.
|
private |
Using the stored global indexer, set the orientations for a side workset.
|
private |
Using the stored global indexer, set the orientations for a volume workset on a specified element block.
Definition at line 254 of file Panzer_WorksetContainer.cpp.
|
private |
Using the stored global indexer, set the orientations for a side workset.
Definition at line 366 of file Panzer_WorksetContainer.cpp.
|
private |
Set all the workset identifier in a vector.
[in] | wd | Workset descriptor, this defines the base point for the identifiers |
[in] | worksets | Set the unique identifiers on these worksets |
Definition at line 233 of file Panzer_WorksetContainer.cpp.
|
private |
Set all the workset identifier in a vector.
[in] | wd | Workset descriptor, this defines the base point for the identifiers |
[in] | worksets | Set the unique identifiers on these worksets |
Definition at line 241 of file Panzer_WorksetContainer.cpp.
|
private |
Definition at line 211 of file Panzer_WorksetContainer.hpp.
|
private |
How to construct worksets.
Definition at line 212 of file Panzer_WorksetContainer.hpp.
|
private |
Maps element blocks to input physics block objects.
Definition at line 214 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 215 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 217 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 219 of file Panzer_WorksetContainer.hpp.
|
private |
Definition at line 221 of file Panzer_WorksetContainer.hpp.