11#ifndef __Panzer_WorksetDescriptor_hpp__
12#define __Panzer_WorksetDescriptor_hpp__
70 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
71 "WorksetDescriptor constr: Element block name must be non-empty!");
84 const std::string & sideset,
93 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
94 "WorksetDescriptor constr: Element block name must be non-empty!");
95 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_==
"",std::runtime_error,
96 "WorksetDescriptor constr: Side set name must be non-empty!");
115 const std::string & sideset,
126 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
127 "WorksetDescriptor constr: Element block name must be non-empty!");
128 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_==
"",std::runtime_error,
129 "WorksetDescriptor constr: Side set name must be non-empty!");
151 const std::string & elementBlock_1,
152 const std::string & sideset_0,
153 const std::string & sideset_1,
166 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
167 "WorksetDescriptor constr: Element block 0 name must be non-empty!");
168 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_==
"",std::runtime_error,
169 "WorksetDescriptor constr: Side set 0 name must be non-empty!");
171 "WorksetDescriptor constr: Element block 1 name must be non-empty!");
172 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_2_==
"",std::runtime_error,
173 "WorksetDescriptor constr: Side set 1 name must be non-empty!");
286 std::size_t seed = 0;
302 os <<
"Side descriptor: "
305 <<
"side assembly = " << (wd.
sideAssembly() ?
"on" :
"off");
307 os <<
"Block descriptor: "
341 std::size_t seed = 0;
WorksetDescriptor(const WorksetDescriptor &src)=default
Copy constructor.
bool requiresPartitioning_
Marks if the mesh require partitioning before generating worksets.
int worksetSize_
Requested workset size.
const std::string & getElementBlock(const int block=0) const
Get element block name.
WorksetDescriptor(const std::string &elementBlock, const std::string &sideset, const int worksetSize=WorksetSizeType::CLASSIC_MODE, const bool requiresPartitioning=false, const bool applyOrientations=true)
bool sideAssembly() const
Expects side set assembly on volume.
std::string sideset_
Side set, must be non-empty if useSideset_ is true.
const std::string & getSideset(const int block=0) const
Get sideset name.
WorksetDescriptor(const std::string &elementBlock, const std::string &sideset, const bool sideAssembly)
int getWorksetSize() const
Get the requested workset size (default -2 (workset size is set elsewhere), -1 (largest possible work...
std::string elementBlock_2_
Element block on other side of side.
bool applyOrientations_
Apply orientations - used for continuous discretizations with edge/face elements.
bool connectsElementBlocks() const
Identifies this workset as an interface between two element blocks.
bool applyOrientations() const
bool useSideset() const
This descriptor is for a side set.
std::string sideset_2_
Side set on other side of side, must be non-empty if useSideset_ is true and elementBlock2_ is not em...
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)
std::string elementBlock_
Element block, required to be non-empty.
WorksetDescriptor(const std::string &elementBlock, const int worksetSize=WorksetSizeType::CLASSIC_MODE, const bool requiresPartitioning=false, const bool applyOrientations=true)
bool requiresPartitioning() const
Do we need to partition the local mesh prior to generating worksets.
WorksetDescriptor sidesetDescriptor(const std::string &eBlock, const std::string &sideset)
WorksetDescriptor blockDescriptor(const std::string &eBlock)
std::ostream & operator<<(std::ostream &os, const AssemblyEngineInArgs &in)
WorksetSizeType
Special values for the workset size. When the workset size is set on the WorksetDescriptor an interge...
@ NO_ELEMENTS
Workset size is set to zero.
@ ALL_ELEMENTS
Workset size is set to the total number of local elements in the MPI process.
@ CLASSIC_MODE
Backwards compatibility mode that ignores the worksetSize in the WorksetDescriptor.
bool operator==(const panzer::BasisDescriptor &left, const panzer::BasisDescriptor &right)
void hash_combine(std::size_t &seed, const T &v)
WorksetDescriptor sidesetVolumeDescriptor(const std::string &eBlock, const std::string &sideset)
std::size_t hash_value(const WorksetDescriptor &wd)
Hash function that satisifies the stl hash interface.
std::size_t operator()(const panzer::WorksetDescriptor &wd) const