Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
panzer::WorksetDescriptor Class Reference

#include <Panzer_WorksetDescriptor.hpp>

Public Member Functions

 WorksetDescriptor (const std::string &elementBlock, const int worksetSize=WorksetSizeType::CLASSIC_MODE, const bool requiresPartitioning=false, const bool applyOrientations=true)
 
 WorksetDescriptor (const std::string &elementBlock, const std::string &sideset, const bool sideAssembly)
 
 WorksetDescriptor (const std::string &elementBlock, const std::string &sideset, const int worksetSize=WorksetSizeType::CLASSIC_MODE, const bool requiresPartitioning=false, const bool applyOrientations=true)
 
 WorksetDescriptor (const std::string &elementBlock_0, const std::string &elementBlock_1, const std::string &sideset_0, const std::string &sideset_1, const int worksetSize=WorksetSizeType::CLASSIC_MODE, const bool requiresPartitioning=false, const bool applyOrientations=true)
 
 WorksetDescriptor (const WorksetDescriptor &src)=default
 Copy constructor. More...
 
const std::string & getElementBlock (const int block=0) const
 Get element block name. More...
 
const std::string & getSideset (const int block=0) const
 Get sideset name. More...
 
bool sideAssembly () const
 Expects side set assembly on volume. More...
 
bool connectsElementBlocks () const
 Identifies this workset as an interface between two element blocks. More...
 
bool requiresPartitioning () const
 Do we need to partition the local mesh prior to generating worksets. More...
 
bool useSideset () const
 This descriptor is for a side set. More...
 
int getWorksetSize () const
 Get the requested workset size (default -2 (workset size is set elsewhere), -1 (largest possible workset size), >0 (workset size)) More...
 
bool applyOrientations () const
 

Private Attributes

std::string elementBlock_
 Element block, required to be non-empty. More...
 
std::string elementBlock_2_
 Element block on other side of side. More...
 
std::string sideset_
 Side set, must be non-empty if useSideset_ is true. More...
 
std::string sideset_2_
 Side set on other side of side, must be non-empty if useSideset_ is true and elementBlock2_ is not empty. More...
 
int worksetSize_
 Requested workset size. More...
 
bool requiresPartitioning_
 Marks if the mesh require partitioning before generating worksets. More...
 
bool applyOrientations_
 Apply orientations - used for continuous discretizations with edge/face elements. More...
 
bool sideAssembly_
 

Detailed Description

Class provides a simple description of the types of worksets that need to be constructed and used. This is a generalization of using strings and pairs of string to represent the element blocks and sidesets. It is primarily used in specifying the "domain" of the assembly algorithm, that is which elements will be used in the assembly process.

There are currently two construction paths supported, a CLASSIC path that is the legacy code that constructs worksets out of locally owned elements. The new path uses the PARTITIONED approach. The PARTITIONED approach supports creating worksets that might require ghosted and/or virtual cells commonly used in DG methods. For the CLASSIC mode, the workset size is determined by the deprecated CellData object in the WorksetNeeds. This is the current default for backwards compatibility. NOTE: For CLASSIC, this means that the worksetSize in this object is ignored! For PARTITIONED, used by DG codes, the worksetSize in the WorksetDescriptor is always used.

Definition at line 50 of file Panzer_WorksetDescriptor.hpp.

Constructor & Destructor Documentation

panzer::WorksetDescriptor::WorksetDescriptor ( const std::string &  elementBlock,
const int  worksetSize = WorksetSizeType::CLASSIC_MODE,
const bool  requiresPartitioning = false,
const bool  applyOrientations = true 
)
inline

Constructor specifying a lone element block with a requested workset size.

Parameters
[in]elementBlockName of the element block
[in]worksetSizeRequested workset size. This is an integer > 0 for a user specified size or can be of type WorksetSizeType for special cases
[in]requiresPartitioningIf set to true, uses the new path for building worksets with partitioning
[in]applyOrientationsIf set to true, computes and applies orientations to relevant bases

Definition at line 60 of file Panzer_WorksetDescriptor.hpp.

panzer::WorksetDescriptor::WorksetDescriptor ( const std::string &  elementBlock,
const std::string &  sideset,
const bool  sideAssembly 
)
inline

Constructor that defines a side set. Note that the specified sideset must be a non-empty string.

Parameters
[in]elementBlockElement block that includes the side
[in]sidesetSide set that is being used
[in]sideAssemblyAre integration rules and basis functions evaluated on the side or on the volume of the element.

Definition at line 83 of file Panzer_WorksetDescriptor.hpp.

panzer::WorksetDescriptor::WorksetDescriptor ( const std::string &  elementBlock,
const std::string &  sideset,
const int  worksetSize = WorksetSizeType::CLASSIC_MODE,
const bool  requiresPartitioning = false,
const bool  applyOrientations = true 
)
inline

Constructor that defines a side set. Note that the specified sideset must be a non-empty string.

Options for workset_size: EMPTY, FULL, SPECIAL, >0 EMPTY -> workset size is set by cellData in WorksetNeeds FULL -> workset size is set to largest possible value SPECIAL -> Special case >0 -> workset size is set to this value (overwrites WorksetNeeds)

Parameters
[in]element_blockElement block that includes the side
[in]sidesetSide set that is being used
[in]worksetSizeRequested workset size. This is an integer > 0 for a user specified size or can be of type WorksetSizeType for special cases
[in]requiresPartitioningIf set to true, uses the new path for building worksets with partitioning
[in]applyOrientationsIf set to true, computes and applies orientations to relevant bases

Definition at line 114 of file Panzer_WorksetDescriptor.hpp.

panzer::WorksetDescriptor::WorksetDescriptor ( const std::string &  elementBlock_0,
const std::string &  elementBlock_1,
const std::string &  sideset_0,
const std::string &  sideset_1,
const int  worksetSize = WorksetSizeType::CLASSIC_MODE,
const bool  requiresPartitioning = false,
const bool  applyOrientations = true 
)
inline

Constructor that defines a side set. Note that the specified sideset must be a non-empty string.

Options for workset_size: -2, -1, 0, >0 -2 -> workset size is set by cellData in WorksetNeeds -1 -> workset size is set to largest possible value 0 -> Special case >0 -> workset size is set to this value (overwrites WorksetNeeds)

Parameters
[in]element_block_0Element block on one side of sideset_0
[in]element_block_1Element block on other side of sideset_1
[in]sideset_0Sideset of interest attached to element_block_0
[in]sideset_1Sideset of interest attached to element_block_1
[in]worksetSizeRequested workset size. This is an integer > 0 for a user specified size or can be of type WorksetSizeType for special cases
[in]requiresPartitioningIf set to true, uses the new path for building worksets with partitioning
[in]applyOrientationsIf set to true, computes and applies orientations to relevant bases

Definition at line 150 of file Panzer_WorksetDescriptor.hpp.

panzer::WorksetDescriptor::WorksetDescriptor ( const WorksetDescriptor src)
default

Copy constructor.

Member Function Documentation

const std::string& panzer::WorksetDescriptor::getElementBlock ( const int  block = 0) const
inline

Get element block name.

Only set block if this is an interface between two element blocks

Parameters
[in]blockBlock id (0 or 1).
Returns
Name of element block

Definition at line 186 of file Panzer_WorksetDescriptor.hpp.

const std::string& panzer::WorksetDescriptor::getSideset ( const int  block = 0) const
inline

Get sideset name.

Only set block if this is an interface between two element blocks

Parameters
[in]blockBlock id (0 or 1).
Returns
Name of sideset

Definition at line 196 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::sideAssembly ( ) const
inline

Expects side set assembly on volume.

Definition at line 201 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::connectsElementBlocks ( ) const
inline

Identifies this workset as an interface between two element blocks.

Returns
True if element blocks exists on both sides of side

Definition at line 209 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::requiresPartitioning ( ) const
inline

Do we need to partition the local mesh prior to generating worksets.

Note that this is required if running surface integrals on a discontinuous discretization.

Returns
True if partitioning is required

Definition at line 220 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::useSideset ( ) const
inline

This descriptor is for a side set.

Definition at line 226 of file Panzer_WorksetDescriptor.hpp.

int panzer::WorksetDescriptor::getWorksetSize ( ) const
inline

Get the requested workset size (default -2 (workset size is set elsewhere), -1 (largest possible workset size), >0 (workset size))

Definition at line 231 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::applyOrientations ( ) const
inline

Definition at line 234 of file Panzer_WorksetDescriptor.hpp.

Member Data Documentation

std::string panzer::WorksetDescriptor::elementBlock_
private

Element block, required to be non-empty.

Definition at line 239 of file Panzer_WorksetDescriptor.hpp.

std::string panzer::WorksetDescriptor::elementBlock_2_
private

Element block on other side of side.

Definition at line 242 of file Panzer_WorksetDescriptor.hpp.

std::string panzer::WorksetDescriptor::sideset_
private

Side set, must be non-empty if useSideset_ is true.

Definition at line 245 of file Panzer_WorksetDescriptor.hpp.

std::string panzer::WorksetDescriptor::sideset_2_
private

Side set on other side of side, must be non-empty if useSideset_ is true and elementBlock2_ is not empty.

Definition at line 248 of file Panzer_WorksetDescriptor.hpp.

int panzer::WorksetDescriptor::worksetSize_
private

Requested workset size.

Definition at line 251 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::requiresPartitioning_
private

Marks if the mesh require partitioning before generating worksets.

Definition at line 254 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::applyOrientations_
private

Apply orientations - used for continuous discretizations with edge/face elements.

Definition at line 257 of file Panzer_WorksetDescriptor.hpp.

bool panzer::WorksetDescriptor::sideAssembly_
private

This indicates if side quadrature rules are constructed or volume rules are constructued. Ignored if useSideset_ is false.

Definition at line 263 of file Panzer_WorksetDescriptor.hpp.


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