https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ReactorGeometryMeshBuilderBase Class Referenceabstract

A base class that contains common members for Reactor Geometry Mesh Builder mesh generators. More...

#include <ReactorGeometryMeshBuilderBase.h>

Inheritance diagram for ReactorGeometryMeshBuilderBase:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 ReactorGeometryMeshBuilderBase (const InputParameters &parameters)
 
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< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () 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 &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
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 &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, 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 &param) 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 &parameters)
 
static bool hasGenerateData (const InputParameters &params)
 
static void setHasGenerateData (InputParameters &params)
 

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

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 &param_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 &param_name, const bool allow_invalid=false)
 
std::vector< std::unique_ptr< MeshBase > *> getMeshes (const std::string &param_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 &param_name)
 
void declareMeshesForSub (const std::string &param_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
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
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...
 

Detailed Description

A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.

Definition at line 107 of file ReactorGeometryMeshBuilderBase.h.

Member Enumeration Documentation

◆ DepletionIDGenerationLevel

specify the depletion id is generated at which reactor generation level

Enumerator
Pin 
Assembly 
Drum 
Core 

Definition at line 249 of file ReactorGeometryMeshBuilderBase.h.

250  {
251  Pin,
252  Assembly,
253  Drum,
254  Core
255  };

Constructor & Destructor Documentation

◆ ReactorGeometryMeshBuilderBase()

ReactorGeometryMeshBuilderBase::ReactorGeometryMeshBuilderBase ( const InputParameters parameters)

Definition at line 43 of file ReactorGeometryMeshBuilderBase.C.

45 {
46 }
MeshGenerator(const InputParameters &parameters)
const InputParameters & parameters() const

Member Function Documentation

◆ addDepletionId()

void ReactorGeometryMeshBuilderBase::addDepletionId ( MeshBase &  input_mesh,
const MooseEnum option,
const DepletionIDGenerationLevel  generation_level,
const bool  extrude 
)
protected

add depletion IDs

Parameters
input_meshinput mesh
optionoption for specifying level of details
generation_leveldepletion id is generated at which reactor generator level
extrudewhether 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().

119 {
120  // prepare set of extra elem ids for depletion ID generation
121  std::vector<ExtraElementIDName> id_names = {};
122  if (extrude)
123  id_names.push_back("plane_id");
124  if (generation_level == DepletionIDGenerationLevel::Core)
125  {
126  if (option == "pin")
127  id_names.insert(id_names.end(), {"assembly_id", "pin_id"});
128  else if (option == "pin_type")
129  id_names.insert(id_names.end(), {"assembly_id", "pin_type_id"});
130  else if (option == "assembly")
131  id_names.push_back("assembly_id");
132  else if (option == "assembly_type")
133  id_names.push_back("assembly_type_id");
134  }
135  else if (generation_level == DepletionIDGenerationLevel::Assembly)
136  {
137  if (option == "pin")
138  id_names.push_back("pin_id");
139  else if (option == "pin_type")
140  id_names.push_back("pin_type_id");
141  else
142  paramError("depletion_id_type",
143  "'assembly_id' or 'assembly_type_id' is not allowed in depletion ID generation at "
144  "assembly level");
145  }
146  else if (generation_level == DepletionIDGenerationLevel::Drum)
147  {
148  if (option == "pin_type")
149  id_names.push_back("pin_type_id");
150  else
151  paramError("depletion_id_type",
152  "Only 'pin_type' is allowed in depletion ID generation at "
153  "drum level");
154  }
155  else if (generation_level == DepletionIDGenerationLevel::Pin)
156  mooseError("Depletion ID generation is not supported at pin level yet in RGMB");
157  id_names.push_back("region_id");
158  // no block restriction
159  std::set<SubdomainID> block_ids = {};
160  // create depletion IDs
161  // depletion IDs will be assigned in the following order:
162  // regions (materials) within pin -> pins in assembly -> assemblies in core -> axial planes
163  std::unordered_map<dof_id_type, dof_id_type> depl_ids =
164  MooseMeshUtils::getExtraIDUniqueCombinationMap(input_mesh, block_ids, id_names);
165  // assign depletion ids to elements
166  const auto depl_id_index = input_mesh.add_elem_integer("depletion_id");
167  for (Elem * const elem : input_mesh.active_element_ptr_range())
168  elem->set_extra_integer(depl_id_index, depl_ids.at(elem->id()));
169 }
std::unordered_map< dof_id_type, dof_id_type > getExtraIDUniqueCombinationMap(const MeshBase &mesh, const std::set< SubdomainID > &block_ids, std::vector< ExtraElementIDName > extra_ids)
void paramError(const std::string &param, Args... args) const
void mooseError(Args &&... args) const

◆ addDepletionIDParams()

void ReactorGeometryMeshBuilderBase::addDepletionIDParams ( InputParameters parameters)
static

Definition at line 32 of file ReactorGeometryMeshBuilderBase.C.

Referenced by AssemblyMeshGenerator::validParams(), ControlDrumMeshGenerator::validParams(), and CoreMeshGenerator::validParams().

33 {
34  params.addParam<bool>(
35  "generate_depletion_id", false, "Determine wheter the depletion ID is assigned.");
36  MooseEnum depletion_id_option("assembly assembly_type pin pin_type");
37  params.addParam<MooseEnum>("depletion_id_type",
38  depletion_id_option,
39  "Determine level of details in depletion ID assignment.");
40  params.addParamNamesToGroup("generate_depletion_id depletion_id_type", "Depletion ID assignment");
41 }

◆ callExtrusionMeshSubgenerators()

MeshGeneratorName ReactorGeometryMeshBuilderBase::callExtrusionMeshSubgenerators ( const MeshGeneratorName  input_mesh_name)
protected

Calls mesh subgenerators related to extrusion, renaming of top / bottom boundaries, and defining plane IDs.

Parameters
input_mesh_namename of input 2D mesh generator to extrude
Returns
name of final output 3D mesh generator

Definition at line 172 of file ReactorGeometryMeshBuilderBase.C.

Referenced by AssemblyMeshGenerator::AssemblyMeshGenerator(), ControlDrumMeshGenerator::ControlDrumMeshGenerator(), CoreMeshGenerator::CoreMeshGenerator(), and PinMeshGenerator::PinMeshGenerator().

174 {
175  std::vector<Real> axial_boundaries = getReactorParam<std::vector<Real>>(RGMB::axial_mesh_sizes);
176  const auto top_boundary = getReactorParam<boundary_id_type>(RGMB::top_boundary_id);
177  const auto bottom_boundary = getReactorParam<boundary_id_type>(RGMB::bottom_boundary_id);
178 
179  {
180  auto params = _app.getFactory().getValidParams("AdvancedExtruderGenerator");
181 
182  params.set<MeshGeneratorName>("input") = input_mesh_name;
183  params.set<Point>("direction") = Point(0, 0, 1);
184  params.set<std::vector<unsigned int>>("num_layers") =
185  getReactorParam<std::vector<unsigned int>>(RGMB::axial_mesh_intervals);
186  params.set<std::vector<Real>>("heights") = axial_boundaries;
187  params.set<BoundaryName>("bottom_boundary") = std::to_string(bottom_boundary);
188  params.set<BoundaryName>("top_boundary") = std::to_string(top_boundary);
189  addMeshSubgenerator("AdvancedExtruderGenerator", name() + "_extruded", params);
190  }
191 
192  {
193  auto params = _app.getFactory().getValidParams("RenameBoundaryGenerator");
194 
195  params.set<MeshGeneratorName>("input") = name() + "_extruded";
196  params.set<std::vector<BoundaryName>>("old_boundary") = {
197  std::to_string(top_boundary),
198  std::to_string(bottom_boundary)}; // hard coded boundary IDs in patterned mesh generator
199  params.set<std::vector<BoundaryName>>("new_boundary") = {"top", "bottom"};
200  addMeshSubgenerator("RenameBoundaryGenerator", name() + "_change_plane_name", params);
201  }
202 
203  const MeshGeneratorName output_mesh_name = name() + "_extrudedIDs";
204  {
205  auto params = _app.getFactory().getValidParams("PlaneIDMeshGenerator");
206 
207  params.set<MeshGeneratorName>("input") = name() + "_change_plane_name";
208 
209  std::vector<Real> plane_heights{0};
210  for (Real z : axial_boundaries)
211  plane_heights.push_back(z + plane_heights.back());
212 
213  params.set<std::vector<Real>>("plane_coordinates") = plane_heights;
214 
215  std::string plane_id_name = "plane_id";
216  params.set<std::string>("id_name") = "plane_id";
217 
218  addMeshSubgenerator("PlaneIDMeshGenerator", output_mesh_name, params);
219  }
220 
221  return output_mesh_name;
222 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
static const std::string axial_mesh_sizes
virtual const std::string & name() const
Factory & getFactory()
const T & getReactorParam(const std::string &param_name)
Returns reference of parameter in ReactorMeshParams object.
void addMeshSubgenerator(const std::string &type, const std::string &name, Ts... extra_input_parameters)
static const std::string top_boundary_id
MooseApp & _app
static const std::string axial_mesh_intervals
static const std::string bottom_boundary_id

◆ freeReactorMeshParams()

void ReactorGeometryMeshBuilderBase::freeReactorMeshParams ( )
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().

69 {
70  _reactor_params_mesh->reset();
71 }
std::unique_ptr< MeshBase > * _reactor_params_mesh
The dummy param mesh that we need to clear once we&#39;ve generated (in freeReactorMeshParams) ...

◆ generateData()

void ReactorGeometryMeshBuilderBase::generateData ( )
inlineoverridevirtual

Reimplemented from MeshGenerator.

Definition at line 116 of file ReactorGeometryMeshBuilderBase.h.

116 {};

◆ getElemIntegerFromMesh()

unsigned int ReactorGeometryMeshBuilderBase::getElemIntegerFromMesh ( MeshBase &  input_mesh,
std::string  extra_int_name,
bool  should_exist = false 
)
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.

Parameters
input_meshinput mesh
extra_int_nameextra element id name
should_existwhether extra element integer should already exist in mesh
Returns
extra element integer

Definition at line 74 of file ReactorGeometryMeshBuilderBase.C.

Referenced by AssemblyMeshGenerator::generate(), PinMeshGenerator::generate(), ControlDrumMeshGenerator::generate(), and CoreMeshGenerator::generate().

77 {
78  if (input_mesh.has_elem_integer(extra_int_name))
79  return input_mesh.get_elem_integer_index(extra_int_name);
80  else
81  {
82  if (should_exist)
83  mooseError("Expected extruded mesh to have " + extra_int_name + " extra integers");
84  else
85  return input_mesh.add_elem_integer(extra_int_name);
86  }
87 }
void mooseError(Args &&... args) const

◆ getReactorParam()

template<typename T >
const T & ReactorGeometryMeshBuilderBase::getReactorParam ( const std::string &  param_name)
protected

Returns reference of parameter in ReactorMeshParams object.

Template Parameters
Tdatatype of metadata value associated with metadata name
Parameters
param_namename of ReactorMeshParams parameter
Returns
reference to parameter defined in ReactorMeshParams metadata

Definition at line 284 of file ReactorGeometryMeshBuilderBase.h.

Referenced by AssemblyMeshGenerator::AssemblyMeshGenerator(), callExtrusionMeshSubgenerators(), ControlDrumMeshGenerator::ControlDrumMeshGenerator(), PinMeshGenerator::generateMetadata(), and PinMeshGenerator::PinMeshGenerator().

285 {
286  return getMeshProperty<T>(param_name, _reactor_params);
287 }
MeshGeneratorName _reactor_params
The ReactorMeshParams object that is storing the reactor global information for this reactor geometry...

◆ hasReactorParam()

template<typename T >
bool ReactorGeometryMeshBuilderBase::hasReactorParam ( const std::string  param_name)
protected

Checks whether parameter is defined in ReactorMeshParams metadata.

Template Parameters
Tdatatype of metadata value associated with metadata name
Parameters
param_namename of ReactorMeshParams parameter
Returns
whether parameter is defined in ReactorMeshParams metadata

Definition at line 277 of file ReactorGeometryMeshBuilderBase.h.

278 {
279  return hasMeshProperty<T>(param_name, _reactor_params);
280 }
MeshGeneratorName _reactor_params
The ReactorMeshParams object that is storing the reactor global information for this reactor geometry...

◆ initializeReactorMeshParams()

void ReactorGeometryMeshBuilderBase::initializeReactorMeshParams ( const std::string  reactor_param_name)
protected

Initializes and checks validity of ReactorMeshParams mesh generator object.

Parameters
reactor_param_namename of ReactorMeshParams mesh generator

Definition at line 49 of file ReactorGeometryMeshBuilderBase.C.

Referenced by AssemblyMeshGenerator::AssemblyMeshGenerator(), ControlDrumMeshGenerator::ControlDrumMeshGenerator(), CoreMeshGenerator::CoreMeshGenerator(), and PinMeshGenerator::PinMeshGenerator().

50 {
51  _reactor_params = reactor_param_name;
52 
53  // Ensure that the user has supplied a valid ReactorMeshParams object
54  _reactor_params_mesh = &getMeshByName(reactor_param_name);
56  mooseError("The reactor_params mesh is not of the correct type");
57 
58  if (!hasMeshProperty<unsigned int>("mesh_dimensions", _reactor_params) ||
59  !hasMeshProperty<std::string>("mesh_geometry", _reactor_params))
60  mooseError("The reactor_params input must be a ReactorMeshParams type MeshGenerator\n Please "
61  "check that a valid definition and name of ReactorMeshParams has been provided.");
62 
63  // Set reactor_params_name metadata for use by future mesh generators
64  declareMeshProperty("reactor_params_name", std::string(_reactor_params));
65 }
std::unique_ptr< MeshBase > & getMeshByName(const MeshGeneratorName &mesh_generator_name)
std::unique_ptr< MeshBase > * _reactor_params_mesh
The dummy param mesh that we need to clear once we&#39;ve generated (in freeReactorMeshParams) ...
MeshGeneratorName _reactor_params
The ReactorMeshParams object that is storing the reactor global information for this reactor geometry...
void mooseError(Args &&... args) const
T & declareMeshProperty(const std::string &data_name, Args &&... args)

◆ print2dMetadataToConsole()

template<typename T >
void ReactorGeometryMeshBuilderBase::print2dMetadataToConsole ( const std::string  metadata_name,
const std::string  mg_name 
)
protected

Print metadata with data type std::vector<std::vector<T>> and provided name that can be found with given mesh generator name.

Template Parameters
Tdatatype of elements in 2-D vector to output
Parameters
metadata_nameName of metadata to output
mg_nameName of mesh generator that stores metadata

◆ printAssemblyMetadata()

void ReactorGeometryMeshBuilderBase::printAssemblyMetadata ( const std::string  mg_name,
const bool  first_function_call 
)
protected

Print assembly-level metadata associated with ReactorGeometryMeshBuilder object.

Parameters
mg_namename of mesh generator associated with assembly
whetherthis is the original function call, which will trigger additional output messages

◆ printCoreMetadata()

void ReactorGeometryMeshBuilderBase::printCoreMetadata ( const std::string  mg_name,
const bool  first_function_call 
)
protected

Print core-level metadata associated with ReactorGeometryMeshBuilder object.

Parameters
mg_namename of mesh generator associated with core
first_function_callwhether this is the original function call, which will trigger additional output messages

◆ printGlobalReactorMetadata()

void ReactorGeometryMeshBuilderBase::printGlobalReactorMetadata ( )
protected

Print global ReactorMeshParams metadata associated with ReactorGeometryMeshBuilder object.

◆ printMetadataToConsole()

template<typename T >
void ReactorGeometryMeshBuilderBase::printMetadataToConsole ( const std::string  metadata_name,
const std::string  mg_name 
)
protected

Print metadata with provided name that can be found with given mesh generator name.

Template Parameters
Tdatatype of metadata value to output
Parameters
metadata_nameName of metadata to output
mg_nameName of mesh generator that stores metadata

◆ printPinMetadata()

void ReactorGeometryMeshBuilderBase::printPinMetadata ( const std::string  mg_name)
protected

Print pin-level metadata associated with ReactorGeometryMeshBuilder object.

Parameters
mg_namename of mesh generator associated with assembly

◆ printReactorMetadata()

void ReactorGeometryMeshBuilderBase::printReactorMetadata ( const std::string  geometry_type,
const std::string  mg_name,
const bool  first_function_call = true 
)
protected

Print metadata associated with ReactorGeometryMeshBuilder object.

Parameters
geometry_typetype of geometry (pin / assembly / core) under consideration
mg_namename of mesh generator associated with this object
first_function_callwhether this is the original function call, which will trigger additional output messages

◆ updateElementBlockNameId()

void ReactorGeometryMeshBuilderBase::updateElementBlockNameId ( MeshBase &  input_mesh,
Elem *  elem,
std::map< std::string, SubdomainID > &  name_id_map,
std::string  elem_block_name,
SubdomainID next_free_id 
)
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

Parameters
input_nameinput mesh
elemiterator to mesh element
name_id_mapmap of name-id pairs used in mesh
elem_block_nameblock name to set for element
next_free_idnext 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().

96 {
97  SubdomainID elem_block_id;
98  if (name_id_map.find(elem_block_name) == name_id_map.end())
99  {
100  // Block name does not exist in mesh yet, assign new block id and name
101  elem_block_id = next_free_id++;
102  elem->subdomain_id() = elem_block_id;
103  input_mesh.subdomain_name(elem_block_id) = elem_block_name;
104  name_id_map[elem_block_name] = elem_block_id;
105  }
106  else
107  {
108  // Block name exists in mesh, reuse block id
109  elem_block_id = name_id_map[elem_block_name];
110  elem->subdomain_id() = elem_block_id;
111  }
112 }

◆ validParams()

InputParameters ReactorGeometryMeshBuilderBase::validParams ( )
static

Definition at line 15 of file ReactorGeometryMeshBuilderBase.C.

Referenced by AssemblyMeshGenerator::validParams(), PinMeshGenerator::validParams(), ControlDrumMeshGenerator::validParams(), and CoreMeshGenerator::validParams().

16 {
18 
19  params.addDeprecatedParam<bool>("show_rgmb_metadata",
20  "Print out RGMB-related metadata to console output",
21  "This parameter is deprecated. Please use MeshMetaDataReporter "
22  "system to print out mesh metadata to JSON output file instead");
23  params.addClassDescription("A base class that contains common members and methods for Reactor "
24  "Geometry Mesh Builder mesh generators.");
25 
26  // Declare that this generator has a generateData method
28  return params;
29 }
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
static InputParameters validParams()
static void setHasGenerateData(InputParameters &params)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _reactor_params

MeshGeneratorName ReactorGeometryMeshBuilderBase::_reactor_params
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().

◆ _reactor_params_mesh

std::unique_ptr<MeshBase>* ReactorGeometryMeshBuilderBase::_reactor_params_mesh
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().


The documentation for this class was generated from the following files: