A base class that contains common members for Reactor Geometry Mesh Builder mesh generators. More...
#include <ReactorGeometryMeshBuilderBase.h>
Public Types | |
typedef DataFileName | DataFileParameterType |
Public Member Functions | |
ReactorGeometryMeshBuilderBase (const InputParameters ¶meters) | |
void | generateData () override |
virtual std::unique_ptr< MeshBase > | generate ()=0 |
std::unique_ptr< MeshBase > | generateInternal () |
const std::set< MeshGeneratorName > & | getRequestedMeshGenerators () const |
const std::set< MeshGeneratorName > & | getRequestedMeshGeneratorsForSub () const |
void | addParentMeshGenerator (const MeshGenerator &mg, const AddParentChildKey) |
void | addChildMeshGenerator (const MeshGenerator &mg, const AddParentChildKey) |
const std::set< const MeshGenerator *, Comparator > & | getParentMeshGenerators () const |
const std::set< const MeshGenerator *, Comparator > & | getChildMeshGenerators () const |
const std::set< const MeshGenerator *, Comparator > & | getSubMeshGenerators () const |
bool | isParentMeshGenerator (const MeshGeneratorName &name, const bool direct=true) const |
bool | isChildMeshGenerator (const MeshGeneratorName &name, const bool direct=true) const |
bool | isNullMeshName (const MeshGeneratorName &name) const |
bool | hasSaveMesh () const |
bool | hasOutput () const |
const std::string & | getSavedMeshName () const |
bool | hasGenerateData () const |
bool | isDataOnly () const |
virtual bool | enabled () const |
std::shared_ptr< MooseObject > | getSharedPtr () |
std::shared_ptr< const MooseObject > | getSharedPtr () const |
MooseApp & | getMooseApp () const |
const std::string & | type () const |
const std::string & | name () const |
std::string | typeAndName () const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
MooseObjectName | uniqueName () const |
const InputParameters & | parameters () const |
const hit::Node * | getHitNode () const |
bool | hasBase () const |
const std::string & | getBase () const |
const T & | getParam (const std::string &name) const |
std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
const T * | queryParam (const std::string &name) const |
const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
bool | isParamValid (const std::string &name) const |
bool | isParamSetByUser (const std::string &name) const |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | paramError (const std::string ¶m, Args... args) const |
void | paramWarning (const std::string ¶m, Args... args) const |
void | paramInfo (const std::string ¶m, Args... args) const |
std::string | messagePrefix (const bool hit_prefix=true) const |
std::string | errorPrefix (const std::string &) const |
void | mooseError (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) const |
void | callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const |
std::string | getDataFileName (const std::string ¶m) const |
std::string | getDataFileNameByName (const std::string &relative_path) const |
std::string | getDataFilePath (const std::string &relative_path) const |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
Static Public Member Functions | |
static InputParameters | validParams () |
static void | addDepletionIDParams (InputParameters ¶meters) |
static bool | hasGenerateData (const InputParameters ¶ms) |
static void | callMooseError (MooseApp *const app, const InputParameters ¶ms, std::string msg, const bool with_prefix, const hit::Node *node) |
static void | setHasGenerateData (InputParameters ¶ms) |
Public Attributes | |
const ConsoleStream | _console |
Static Public Attributes | |
static const std::string | data_only_param |
static const std::string | type_param |
static const std::string | name_param |
static const std::string | unique_name_param |
static const std::string | app_param |
static const std::string | moose_base_param |
static constexpr auto | SYSTEM |
static constexpr auto | NAME |
Protected Types | |
enum | DepletionIDGenerationLevel { DepletionIDGenerationLevel::Pin, DepletionIDGenerationLevel::Assembly, DepletionIDGenerationLevel::Drum, DepletionIDGenerationLevel::Core } |
specify the depletion id is generated at which reactor generation level More... | |
Protected Member Functions | |
unsigned int | getElemIntegerFromMesh (MeshBase &input_mesh, std::string extra_int_name, bool should_exist=false) |
Initializes extra element integer from id name for a given mesh and throws an error if it should exist but cannot be found within the mesh. More... | |
void | initializeReactorMeshParams (const std::string reactor_param_name) |
Initializes and checks validity of ReactorMeshParams mesh generator object. More... | |
void | printReactorMetadata (const std::string geometry_type, const std::string mg_name, const bool first_function_call=true) |
Print metadata associated with ReactorGeometryMeshBuilder object. More... | |
void | printCoreMetadata (const std::string mg_name, const bool first_function_call) |
Print core-level metadata associated with ReactorGeometryMeshBuilder object. More... | |
void | printAssemblyMetadata (const std::string mg_name, const bool first_function_call) |
Print assembly-level metadata associated with ReactorGeometryMeshBuilder object. More... | |
void | printPinMetadata (const std::string mg_name) |
Print pin-level metadata associated with ReactorGeometryMeshBuilder object. More... | |
void | printGlobalReactorMetadata () |
Print global ReactorMeshParams metadata associated with ReactorGeometryMeshBuilder object. More... | |
template<typename T > | |
void | printMetadataToConsole (const std::string metadata_name, const std::string mg_name) |
Print metadata with provided name that can be found with given mesh generator name. More... | |
template<typename T > | |
void | print2dMetadataToConsole (const std::string metadata_name, const std::string mg_name) |
Print metadata with data type std::vector<std::vector<T>> and provided name that can be found with given mesh generator name. More... | |
void | freeReactorMeshParams () |
Releases the mesh obtained in _reactor_params_mesh. More... | |
template<typename T > | |
bool | hasReactorParam (const std::string param_name) |
Checks whether parameter is defined in ReactorMeshParams metadata. More... | |
template<typename T > | |
const T & | getReactorParam (const std::string ¶m_name) |
Returns reference of parameter in ReactorMeshParams object. More... | |
void | updateElementBlockNameId (MeshBase &input_mesh, Elem *elem, std::map< std::string, SubdomainID > &name_id_map, std::string elem_block_name, SubdomainID &next_free_id) |
Updates the block names and ids of the element in an input mesh according to a map of block name to block ids. More... | |
MeshGeneratorName | callExtrusionMeshSubgenerators (const MeshGeneratorName input_mesh_name) |
Calls mesh subgenerators related to extrusion, renaming of top / bottom boundaries, and defining plane IDs. More... | |
void | addDepletionId (MeshBase &input_mesh, const MooseEnum &option, const DepletionIDGenerationLevel generation_level, const bool extrude) |
add depletion IDs More... | |
T & | copyMeshProperty (const std::string &target_data_name, const std::string &source_data_name, const std::string &source_mesh) |
T & | copyMeshProperty (const std::string &source_data_name, const std::string &source_mesh) |
std::unique_ptr< MeshBase > & | getMesh (const std::string ¶m_name, const bool allow_invalid=false) |
std::vector< std::unique_ptr< MeshBase > *> | getMeshes (const std::string ¶m_name) |
std::unique_ptr< MeshBase > & | getMeshByName (const MeshGeneratorName &mesh_generator_name) |
std::vector< std::unique_ptr< MeshBase > *> | getMeshesByName (const std::vector< MeshGeneratorName > &mesh_generator_names) |
void | declareMeshForSub (const std::string ¶m_name) |
void | declareMeshesForSub (const std::string ¶m_name) |
void | declareMeshForSubByName (const MeshGeneratorName &mesh_generator_name) |
void | declareMeshesForSubByName (const std::vector< MeshGeneratorName > &mesh_generator_names) |
std::unique_ptr< MeshBase > | buildMeshBaseObject (unsigned int dim=libMesh::invalid_uint) |
std::unique_ptr< ReplicatedMesh > | buildReplicatedMesh (unsigned int dim=libMesh::invalid_uint) |
std::unique_ptr< DistributedMesh > | buildDistributedMesh (unsigned int dim=libMesh::invalid_uint) |
void | addMeshSubgenerator (const std::string &type, const std::string &name, Ts... extra_input_parameters) |
void | addMeshSubgenerator (const std::string &type, const std::string &name, InputParameters params) |
void | declareNullMeshName (const MeshGeneratorName &name) |
const T & | getMeshProperty (const std::string &data_name, const std::string &prefix) |
const T & | getMeshProperty (const std::string &data_name) |
bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
bool | hasMeshProperty (const std::string &data_name) const |
bool | hasMeshProperty (const std::string &data_name) const |
std::string | meshPropertyName (const std::string &data_name) const |
T & | declareMeshProperty (const std::string &data_name, Args &&... args) |
T & | declareMeshProperty (const std::string &data_name, const T &data_value) |
T & | declareMeshProperty (const std::string &data_name, Args &&... args) |
T & | declareMeshProperty (const std::string &data_name, const T &data_value) |
T & | setMeshProperty (const std::string &data_name, Args &&... args) |
T & | setMeshProperty (const std::string &data_name, const T &data_value) |
T & | setMeshProperty (const std::string &data_name, Args &&... args) |
T & | setMeshProperty (const std::string &data_name, const T &data_value) |
Static Protected Member Functions | |
static std::string | meshPropertyName (const std::string &data_name, const std::string &prefix) |
Protected Attributes | |
MeshGeneratorName | _reactor_params |
The ReactorMeshParams object that is storing the reactor global information for this reactor geometry mesh. More... | |
MooseMesh *const | _mesh |
const bool & | _enabled |
MooseApp & | _app |
Factory & | _factory |
ActionFactory & | _action_factory |
const std::string & | _type |
const std::string & | _name |
const InputParameters & | _pars |
const Parallel::Communicator & | _communicator |
Private Attributes | |
std::unique_ptr< MeshBase > * | _reactor_params_mesh |
The dummy param mesh that we need to clear once we've generated (in freeReactorMeshParams) More... | |
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.
Definition at line 107 of file ReactorGeometryMeshBuilderBase.h.
|
strongprotected |
specify the depletion id is generated at which reactor generation level
Enumerator | |
---|---|
Pin | |
Assembly | |
Drum | |
Core |
Definition at line 249 of file ReactorGeometryMeshBuilderBase.h.
ReactorGeometryMeshBuilderBase::ReactorGeometryMeshBuilderBase | ( | const InputParameters & | parameters | ) |
Definition at line 43 of file ReactorGeometryMeshBuilderBase.C.
|
protected |
add depletion IDs
input_mesh | input mesh |
option | option for specifying level of details |
generation_level | depletion id is generated at which reactor generator level |
extrude | whether input mesh is extruded, if false, assume that input mesh is defined in 2D and do not use 'plane_id` in depletion id generation |
Definition at line 115 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::generate(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().
|
static |
Definition at line 32 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::validParams(), ControlDrumMeshGenerator::validParams(), and CoreMeshGenerator::validParams().
|
protected |
Calls mesh subgenerators related to extrusion, renaming of top / bottom boundaries, and defining plane IDs.
input_mesh_name | name of input 2D mesh generator to extrude |
Definition at line 172 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::AssemblyMeshGenerator(), ControlDrumMeshGenerator::ControlDrumMeshGenerator(), CoreMeshGenerator::CoreMeshGenerator(), and PinMeshGenerator::PinMeshGenerator().
|
protected |
Releases the mesh obtained in _reactor_params_mesh.
This must be called in any object that derives from this one, because the MeshGenerator system requires that all meshes that are requested from the system are moved out of the MeshGenerator system and into the MeshGenerator that requests them. In our case, we move it into this MeshGenerator and then release (delete) it.
Definition at line 68 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::generate(), PinMeshGenerator::generate(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().
|
inlineoverridevirtual |
Reimplemented from MeshGenerator.
Definition at line 116 of file ReactorGeometryMeshBuilderBase.h.
|
protected |
Initializes extra element integer from id name for a given mesh and throws an error if it should exist but cannot be found within the mesh.
input_mesh | input mesh |
extra_int_name | extra element id name |
should_exist | whether extra element integer should already exist in mesh |
Definition at line 74 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::generate(), PinMeshGenerator::generate(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().
|
protected |
Returns reference of parameter in ReactorMeshParams object.
T | datatype of metadata value associated with metadata name |
param_name | name of ReactorMeshParams parameter |
Definition at line 284 of file ReactorGeometryMeshBuilderBase.h.
Referenced by AssemblyMeshGenerator::AssemblyMeshGenerator(), callExtrusionMeshSubgenerators(), ControlDrumMeshGenerator::ControlDrumMeshGenerator(), PinMeshGenerator::generateMetadata(), and PinMeshGenerator::PinMeshGenerator().
|
protected |
Checks whether parameter is defined in ReactorMeshParams metadata.
T | datatype of metadata value associated with metadata name |
param_name | name of ReactorMeshParams parameter |
Definition at line 277 of file ReactorGeometryMeshBuilderBase.h.
|
protected |
Initializes and checks validity of ReactorMeshParams mesh generator object.
reactor_param_name | name of ReactorMeshParams mesh generator |
Definition at line 49 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::AssemblyMeshGenerator(), ControlDrumMeshGenerator::ControlDrumMeshGenerator(), CoreMeshGenerator::CoreMeshGenerator(), and PinMeshGenerator::PinMeshGenerator().
|
protected |
Print metadata with data type std::vector<std::vector<T>> and provided name that can be found with given mesh generator name.
T | datatype of elements in 2-D vector to output |
metadata_name | Name of metadata to output |
mg_name | Name of mesh generator that stores metadata |
|
protected |
Print assembly-level metadata associated with ReactorGeometryMeshBuilder object.
mg_name | name of mesh generator associated with assembly |
whether | this is the original function call, which will trigger additional output messages |
|
protected |
Print core-level metadata associated with ReactorGeometryMeshBuilder object.
mg_name | name of mesh generator associated with core |
first_function_call | whether this is the original function call, which will trigger additional output messages |
|
protected |
Print global ReactorMeshParams metadata associated with ReactorGeometryMeshBuilder object.
|
protected |
Print metadata with provided name that can be found with given mesh generator name.
T | datatype of metadata value to output |
metadata_name | Name of metadata to output |
mg_name | Name of mesh generator that stores metadata |
|
protected |
Print pin-level metadata associated with ReactorGeometryMeshBuilder object.
mg_name | name of mesh generator associated with assembly |
|
protected |
Print metadata associated with ReactorGeometryMeshBuilder object.
geometry_type | type of geometry (pin / assembly / core) under consideration |
mg_name | name of mesh generator associated with this object |
first_function_call | whether this is the original function call, which will trigger additional output messages |
|
protected |
Updates the block names and ids of the element in an input mesh according to a map of block name to block ids.
Updates the map if the block name is not in the map
input_name | input mesh |
elem | iterator to mesh element |
name_id_map | map of name-id pairs used in mesh |
elem_block_name | block name to set for element |
next_free_id | next free block id to use if block name does not exist in map |
Definition at line 90 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::generate(), PinMeshGenerator::generate(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().
|
static |
Definition at line 15 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::validParams(), PinMeshGenerator::validParams(), ControlDrumMeshGenerator::validParams(), and CoreMeshGenerator::validParams().
|
protected |
The ReactorMeshParams object that is storing the reactor global information for this reactor geometry mesh.
Definition at line 247 of file ReactorGeometryMeshBuilderBase.h.
Referenced by getReactorParam(), hasReactorParam(), and initializeReactorMeshParams().
|
private |
The dummy param mesh that we need to clear once we've generated (in freeReactorMeshParams)
Definition at line 272 of file ReactorGeometryMeshBuilderBase.h.
Referenced by freeReactorMeshParams(), and initializeReactorMeshParams().