Panzer  Version of the Day
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
panzer::WorksetContainer Class Reference

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 WorksetFactoryBasegetFactory () 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 PhysicsBlocklookupPhysicsBlock (const std::string &eBlock) const
 Look up an input physics block, throws an exception if it can not be found. More...
 
const WorksetNeedslookupNeeds (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 > >, LessSideSideMap
 

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 WorksetFactoryBasewkstFactory_
 
std::map< std::string, Teuchos::RCP< PhysicsBlock > > ebToPb_
 How to construct worksets. More...
 
std::map< std::string, WorksetNeedsebToNeeds_
 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::UniqueGlobalIndexerBaseglobalIndexer_
 

Detailed Description

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.

Member Typedef Documentation

◆ VolumeMap

typedef std::unordered_map<WorksetDescriptor,Teuchos::RCP<std::vector<Workset> > > panzer::WorksetContainer::VolumeMap
private

Definition at line 219 of file Panzer_WorksetContainer.hpp.

◆ SideMap

typedef std::map<SideId,Teuchos::RCP<std::map<unsigned,Workset> >,LessSide> panzer::WorksetContainer::SideMap
private

Definition at line 220 of file Panzer_WorksetContainer.hpp.

Constructor & Destructor Documentation

◆ WorksetContainer() [1/4]

panzer::WorksetContainer::WorksetContainer ( )

Default contructor, starts with no workset factory objects.

Definition at line 53 of file Panzer_WorksetContainer.cpp.

◆ WorksetContainer() [2/4]

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.

Parameters
[in]factoryFactory to be used for constructing worksets
[in]physicsBlocksVector of physics blocks
[in]wkstSzNumber of elements in a workset built by this container

Definition at line 57 of file Panzer_WorksetContainer.cpp.

◆ WorksetContainer() [3/4]

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.

Parameters
[in]factoryFactory to be used for constructing worksets
[in]needsWorkset needs mapped from the elemetn blocks (integration rules and basis values for each element block)

Definition at line 65 of file Panzer_WorksetContainer.cpp.

◆ WorksetContainer() [4/4]

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.

Member Function Documentation

◆ setFactory()

void panzer::WorksetContainer::setFactory ( const Teuchos::RCP< const WorksetFactoryBase > &  factory)
inline

Set the workset factory, and as a consequence clear out all previously computed worksets.

Definition at line 128 of file Panzer_WorksetContainer.hpp.

◆ getFactory()

Teuchos::RCP<const WorksetFactoryBase> panzer::WorksetContainer::getFactory ( ) const
inline

Access the workset factory pointer.

Definition at line 132 of file Panzer_WorksetContainer.hpp.

◆ setPhysicsBlockVector()

void panzer::WorksetContainer::setPhysicsBlockVector ( const std::vector< Teuchos::RCP< PhysicsBlock > > &  physicsBlocks)

The physics block vector.

Definition at line 82 of file Panzer_WorksetContainer.cpp.

◆ setWorksetSize()

void panzer::WorksetContainer::setWorksetSize ( std::size_t  worksetSize)
inline

set the workset size

Definition at line 139 of file Panzer_WorksetContainer.hpp.

◆ getWorksetSize()

std::size_t panzer::WorksetContainer::getWorksetSize ( ) const
inline

get the workset size

Definition at line 143 of file Panzer_WorksetContainer.hpp.

◆ clear()

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.

◆ lookupPhysicsBlock()

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.

◆ lookupNeeds()

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.

◆ getVolumeWorksets()

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.

◆ getWorksets()

Teuchos::RCP< std::vector< Workset > > panzer::WorksetContainer::getWorksets ( const WorksetDescriptor wd)

Access to volume worksets.

Definition at line 166 of file Panzer_WorksetContainer.cpp.

◆ getSideWorksets()

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.

◆ begin() [1/2]

std::vector<Workset>::iterator panzer::WorksetContainer::begin ( const std::string &  eBlock)
inline

Iterator access to volume worksets.

Definition at line 167 of file Panzer_WorksetContainer.hpp.

◆ end() [1/2]

std::vector<Workset>::iterator panzer::WorksetContainer::end ( const std::string &  eBlock)
inline

Iterator access to volume worksets.

Definition at line 171 of file Panzer_WorksetContainer.hpp.

◆ begin() [2/2]

std::map<unsigned,Workset>::iterator panzer::WorksetContainer::begin ( const BC bc)
inline

Iterator access to side worksets.

Definition at line 175 of file Panzer_WorksetContainer.hpp.

◆ end() [2/2]

std::map<unsigned,Workset>::iterator panzer::WorksetContainer::end ( const BC bc)
inline

Iterator access to side worksets.

Definition at line 179 of file Panzer_WorksetContainer.hpp.

◆ allocateVolumeWorksets()

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.

◆ allocateSideWorksets()

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.

◆ setGlobalIndexer()

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.

◆ addBasis()

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.

◆ applyOrientations() [1/3]

void panzer::WorksetContainer::applyOrientations ( const Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > &  ugi)
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.

◆ applyOrientations() [2/3]

void panzer::WorksetContainer::applyOrientations ( const std::string &  eBlock,
std::vector< Workset > &  worksets 
) const
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.

◆ applyOrientations() [3/3]

void panzer::WorksetContainer::applyOrientations ( const SideId sideId,
std::map< unsigned, Workset > &  worksets 
) const
private

Using the stored global indexer, set the orientations for a side workset.

Definition at line 384 of file Panzer_WorksetContainer.cpp.

Member Data Documentation

◆ wkstFactory_

Teuchos::RCP<const WorksetFactoryBase> panzer::WorksetContainer::wkstFactory_
private

Definition at line 222 of file Panzer_WorksetContainer.hpp.

◆ ebToPb_

std::map<std::string,Teuchos::RCP<PhysicsBlock> > panzer::WorksetContainer::ebToPb_
private

How to construct worksets.

Definition at line 223 of file Panzer_WorksetContainer.hpp.

◆ ebToNeeds_

std::map<std::string,WorksetNeeds> panzer::WorksetContainer::ebToNeeds_
private

Maps element blocks to input physics block objects.

Definition at line 224 of file Panzer_WorksetContainer.hpp.

◆ volWorksets_

VolumeMap panzer::WorksetContainer::volWorksets_
private

Maps element blocks to input physics block objects.

Definition at line 226 of file Panzer_WorksetContainer.hpp.

◆ sideWorksets_

SideMap panzer::WorksetContainer::sideWorksets_
private

Definition at line 227 of file Panzer_WorksetContainer.hpp.

◆ worksetSize_

std::size_t panzer::WorksetContainer::worksetSize_
private

Definition at line 229 of file Panzer_WorksetContainer.hpp.

◆ globalIndexer_

Teuchos::RCP<const panzer::UniqueGlobalIndexerBase> panzer::WorksetContainer::globalIndexer_
private

Definition at line 231 of file Panzer_WorksetContainer.hpp.


The documentation for this class was generated from the following files: