Mesh generator for defining a reactor control drum that can be used in a Cartesian or hexagonal lattice with the option to be 2-D or 3-D. More...
#include <ControlDrumMeshGenerator.h>
Public Types | |
typedef DataFileName | DataFileParameterType |
Public Member Functions | |
ControlDrumMeshGenerator (const InputParameters ¶meters) | |
std::unique_ptr< MeshBase > | generate () override |
void | generateData () override |
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 |
virtual const std::string & | name () const |
std::string | typeAndName () const |
std::string | errorPrefix (const std::string &error_type) const |
void | callMooseError (std::string msg, const bool with_prefix) const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
const InputParameters & | parameters () const |
MooseObjectName | uniqueName () 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 &nm) 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 |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | mooseError (Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) 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 | setHasGenerateData (InputParameters ¶ms) |
Public Attributes | |
const ConsoleStream | _console |
Static Public Attributes | |
static const std::string | data_only_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 | |
void | generateMetadata () |
Define metadata associated with ControlDrumMeshGenerator. More... | |
unsigned int | getDrumIdxFromRadialIdx (const unsigned int radial_idx, const Real elem_x, const Real elem_y) |
Get drum index from radial index of mesh element, drum index is used to retrieve region ID and block names for each element. More... | |
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 | |
std::string | _geom_type |
The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object) More... | |
unsigned int | _mesh_dimensions |
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshParams object) More... | |
const subdomain_id_type | _assembly_type |
The id number for the type of the assembly. More... | |
const Real | _drum_inner_radius |
The inner radius of drum region. More... | |
const Real | _drum_outer_radius |
The outer radius of drum region. More... | |
const bool | _extrude |
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh. More... | |
std::vector< std::vector< subdomain_id_type > > | _region_ids |
2-D vector (axial outer indexing, radial inner indexing) used to set "region_id" extra-element integer of the control drum mesh elements More... | |
bool | _has_block_names |
Whether block names have been provided by user. More... | |
std::vector< std::vector< std::string > > | _block_names |
2-D vector (axial outer indexing, radial inner indexing) used to set block names of pin mesh elements More... | |
Real | _pad_start_angle |
Starting angle of drum pad region. More... | |
Real | _pad_end_angle |
Ending angle of drum pad region. More... | |
bool | _has_pad_region |
Whether pad start and end angles are provided by user. More... | |
std::unique_ptr< MeshBase > * | _build_mesh |
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators with only element and boundary IDs changed. More... | |
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 |
const std::string | _type |
const std::string | _name |
const InputParameters & | _pars |
Factory & | _factory |
ActionFactory & | _action_factory |
const Parallel::Communicator & | _communicator |
Mesh generator for defining a reactor control drum that can be used in a Cartesian or hexagonal lattice with the option to be 2-D or 3-D.
Definition at line 18 of file ControlDrumMeshGenerator.h.
|
strongprotectedinherited |
specify the depletion id is generated at which reactor generation level
Enumerator | |
---|---|
Pin | |
Assembly | |
Drum | |
Core |
Definition at line 249 of file ReactorGeometryMeshBuilderBase.h.
ControlDrumMeshGenerator::ControlDrumMeshGenerator | ( | const InputParameters & | parameters | ) |
Definition at line 92 of file ControlDrumMeshGenerator.C.
|
protectedinherited |
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(), generate(), and CoreMeshGenerator::generate().
|
staticinherited |
Definition at line 32 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::validParams(), validParams(), and CoreMeshGenerator::validParams().
|
protectedinherited |
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(), CoreMeshGenerator::CoreMeshGenerator(), and PinMeshGenerator::PinMeshGenerator().
|
protectedinherited |
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(), generate(), and CoreMeshGenerator::generate().
|
overridevirtual |
Implements MeshGenerator.
Definition at line 374 of file ControlDrumMeshGenerator.C.
|
inlineoverridevirtualinherited |
Reimplemented from MeshGenerator.
Definition at line 116 of file ReactorGeometryMeshBuilderBase.h.
|
protected |
Define metadata associated with ControlDrumMeshGenerator.
Definition at line 355 of file ControlDrumMeshGenerator.C.
Referenced by ControlDrumMeshGenerator().
|
protected |
Get drum index from radial index of mesh element, drum index is used to retrieve region ID and block names for each element.
Definition at line 469 of file ControlDrumMeshGenerator.C.
Referenced by generate().
|
protectedinherited |
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(), generate(), and CoreMeshGenerator::generate().
|
protectedinherited |
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(), ReactorGeometryMeshBuilderBase::callExtrusionMeshSubgenerators(), ControlDrumMeshGenerator(), PinMeshGenerator::generateMetadata(), and PinMeshGenerator::PinMeshGenerator().
|
protectedinherited |
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.
|
protectedinherited |
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(), CoreMeshGenerator::CoreMeshGenerator(), and PinMeshGenerator::PinMeshGenerator().
|
protectedinherited |
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 |
|
protectedinherited |
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 |
|
protectedinherited |
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 |
|
protectedinherited |
Print global ReactorMeshParams metadata associated with ReactorGeometryMeshBuilder object.
|
protectedinherited |
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 |
|
protectedinherited |
Print pin-level metadata associated with ReactorGeometryMeshBuilder object.
mg_name | name of mesh generator associated with assembly |
|
protectedinherited |
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 |
|
protectedinherited |
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(), generate(), and CoreMeshGenerator::generate().
|
static |
Definition at line 23 of file ControlDrumMeshGenerator.C.
|
protected |
The id number for the type of the assembly.
Definition at line 42 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), generate(), and generateMetadata().
|
protected |
2-D vector (axial outer indexing, radial inner indexing) used to set block names of pin mesh elements
Definition at line 60 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), generate(), and generateMetadata().
|
protected |
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators with only element and boundary IDs changed.
Definition at line 73 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), and generate().
|
protected |
The inner radius of drum region.
Definition at line 45 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), and generateMetadata().
|
protected |
The outer radius of drum region.
Definition at line 48 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), and generateMetadata().
|
protected |
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh.
Definition at line 51 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), generate(), and generateMetadata().
|
protected |
The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object)
Definition at line 36 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator().
|
protected |
Whether block names have been provided by user.
Definition at line 57 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), and generate().
|
protected |
Whether pad start and end angles are provided by user.
Definition at line 69 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), generateMetadata(), and getDrumIdxFromRadialIdx().
|
protected |
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshParams object)
Definition at line 39 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), and generateMetadata().
|
protected |
Ending angle of drum pad region.
Definition at line 66 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), generateMetadata(), and getDrumIdxFromRadialIdx().
|
protected |
Starting angle of drum pad region.
Definition at line 63 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), generateMetadata(), and getDrumIdxFromRadialIdx().
|
protectedinherited |
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 ReactorGeometryMeshBuilderBase::getReactorParam(), ReactorGeometryMeshBuilderBase::hasReactorParam(), and ReactorGeometryMeshBuilderBase::initializeReactorMeshParams().
|
protected |
2-D vector (axial outer indexing, radial inner indexing) used to set "region_id" extra-element integer of the control drum mesh elements
Definition at line 54 of file ControlDrumMeshGenerator.h.
Referenced by ControlDrumMeshGenerator(), generate(), and generateMetadata().