43#ifndef __Panzer_WorksetDescriptor_hpp__
44#define __Panzer_WorksetDescriptor_hpp__
102 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
103 "WorksetDescriptor constr: Element block name must be non-empty!");
116 const std::string & sideset,
125 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
126 "WorksetDescriptor constr: Element block name must be non-empty!");
127 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_==
"",std::runtime_error,
128 "WorksetDescriptor constr: Side set name must be non-empty!");
147 const std::string & sideset,
158 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
159 "WorksetDescriptor constr: Element block name must be non-empty!");
160 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_==
"",std::runtime_error,
161 "WorksetDescriptor constr: Side set name must be non-empty!");
183 const std::string & elementBlock_1,
184 const std::string & sideset_0,
185 const std::string & sideset_1,
198 TEUCHOS_TEST_FOR_EXCEPTION(
elementBlock_==
"",std::runtime_error,
199 "WorksetDescriptor constr: Element block 0 name must be non-empty!");
200 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_==
"",std::runtime_error,
201 "WorksetDescriptor constr: Side set 0 name must be non-empty!");
203 "WorksetDescriptor constr: Element block 1 name must be non-empty!");
204 TEUCHOS_TEST_FOR_EXCEPTION(
sideset_2_==
"",std::runtime_error,
205 "WorksetDescriptor constr: Side set 1 name must be non-empty!");
318 std::size_t seed = 0;
334 os <<
"Side descriptor: "
337 <<
"side assembly = " << (wd.
sideAssembly() ?
"on" :
"off");
339 os <<
"Block descriptor: "
373 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)
bool operator==(const WorksetDescriptor &a, const WorksetDescriptor &b)
Equality operation for use with hash tables and maps.
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.
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