Mesh generator for defining a reactor pin with background and duct regions, with the option to be 2-D or 3-D. More...
#include <PinMeshGenerator.h>
Public Types | |
typedef DataFileName | DataFileParameterType |
Public Member Functions | |
PinMeshGenerator (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 | generateFlexibleAssemblyBoundaries () |
void | generateMetadata () |
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 | |
const subdomain_id_type | _pin_type |
The id number for this pin type. More... | |
const Real | _pitch |
The face-to-face size of this pin. More... | |
const unsigned int | _num_sectors |
The number of azimuthal divisions. More... | |
std::vector< Real > | _ring_radii |
The outer radii of concentric rings in the pin. More... | |
const std::vector< Real > | _duct_halfpitch |
The inner apothem of any surrounding ducts in the pin. More... | |
std::vector< unsigned int > | _intervals |
The number of mesh intervals in a radial division starting from the center. 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 pin 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... | |
std::string | _mesh_geometry |
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 bool | _extrude |
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh. More... | |
bool | _quad_center |
Whether the centermost elements in the pin should be quad elements as opposed to tri elements. More... | |
bool | _homogenized |
Whether the resulting pin mesh should be homogenized. More... | |
bool | _is_assembly |
Whether the resulting pin mesh should also be used as an assembly mesh. 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 pin with background and duct regions, with the option to be 2-D or 3-D.
Definition at line 18 of file PinMeshGenerator.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.
PinMeshGenerator::PinMeshGenerator | ( | const InputParameters & | parameters | ) |
Definition at line 96 of file PinMeshGenerator.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(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().
|
staticinherited |
Definition at line 32 of file ReactorGeometryMeshBuilderBase.C.
Referenced by AssemblyMeshGenerator::validParams(), ControlDrumMeshGenerator::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::ControlDrumMeshGenerator(), CoreMeshGenerator::CoreMeshGenerator(), and 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(), generate(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().
|
overridevirtual |
Implements MeshGenerator.
Definition at line 580 of file PinMeshGenerator.C.
|
inlineoverridevirtualinherited |
Reimplemented from MeshGenerator.
Definition at line 116 of file ReactorGeometryMeshBuilderBase.h.
|
protected |
Definition at line 435 of file PinMeshGenerator.C.
Referenced by PinMeshGenerator().
|
protected |
Definition at line 504 of file PinMeshGenerator.C.
Referenced by PinMeshGenerator().
|
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(), generate(), ControlDrumMeshGenerator::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::ControlDrumMeshGenerator(), generateMetadata(), and 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::ControlDrumMeshGenerator(), CoreMeshGenerator::CoreMeshGenerator(), and 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(), generate(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().
|
static |
Definition at line 22 of file PinMeshGenerator.C.
|
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 PinMeshGenerator.h.
Referenced by generate(), generateMetadata(), and PinMeshGenerator().
|
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 82 of file PinMeshGenerator.h.
Referenced by generate(), and PinMeshGenerator().
|
protected |
The inner apothem of any surrounding ducts in the pin.
Definition at line 48 of file PinMeshGenerator.h.
Referenced by generateMetadata(), and PinMeshGenerator().
|
protected |
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh.
Definition at line 69 of file PinMeshGenerator.h.
Referenced by generate(), generateMetadata(), and PinMeshGenerator().
|
protected |
Whether block names have been provided by user.
Definition at line 57 of file PinMeshGenerator.h.
Referenced by generate(), and PinMeshGenerator().
|
protected |
Whether the resulting pin mesh should be homogenized.
Definition at line 75 of file PinMeshGenerator.h.
Referenced by generateFlexibleAssemblyBoundaries(), generateMetadata(), and PinMeshGenerator().
|
protected |
The number of mesh intervals in a radial division starting from the center.
Definition at line 51 of file PinMeshGenerator.h.
Referenced by generateFlexibleAssemblyBoundaries(), and PinMeshGenerator().
|
protected |
Whether the resulting pin mesh should also be used as an assembly mesh.
Definition at line 78 of file PinMeshGenerator.h.
Referenced by generate(), generateMetadata(), and PinMeshGenerator().
|
protected |
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshParams object)
Definition at line 66 of file PinMeshGenerator.h.
Referenced by generateMetadata(), and PinMeshGenerator().
|
protected |
The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object)
Definition at line 63 of file PinMeshGenerator.h.
Referenced by generateFlexibleAssemblyBoundaries(), and PinMeshGenerator().
|
protected |
The number of azimuthal divisions.
Definition at line 42 of file PinMeshGenerator.h.
Referenced by PinMeshGenerator().
|
protected |
The id number for this pin type.
Definition at line 36 of file PinMeshGenerator.h.
Referenced by generate(), generateFlexibleAssemblyBoundaries(), generateMetadata(), and PinMeshGenerator().
|
protected |
The face-to-face size of this pin.
Definition at line 39 of file PinMeshGenerator.h.
Referenced by generateMetadata(), and PinMeshGenerator().
|
protected |
Whether the centermost elements in the pin should be quad elements as opposed to tri elements.
Definition at line 72 of file PinMeshGenerator.h.
Referenced by PinMeshGenerator().
|
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 pin mesh elements
Definition at line 54 of file PinMeshGenerator.h.
Referenced by generate(), generateMetadata(), and PinMeshGenerator().
|
protected |
The outer radii of concentric rings in the pin.
Definition at line 45 of file PinMeshGenerator.h.
Referenced by generateMetadata(), and PinMeshGenerator().