15 #include "libmesh/elem.h" 25 params.addRequiredParam<std::vector<MeshGeneratorName>>(
27 "The AssemblyMeshGenerator and ControlDrumMeshGenerator objects that form the components of " 30 params.addParam<std::string>(
31 "dummy_assembly_name",
33 "The place holder name in \"inputs\" that indicates an empty position.");
35 params.addRequiredParam<std::vector<std::vector<unsigned int>>>(
37 "A double-indexed array starting with the upper-left corner where the index" 38 "represents the layout of input assemblies in the core lattice.");
39 params.addParam<
bool>(
40 "mesh_periphery",
false,
"Determines if the core periphery should be meshed.");
41 MooseEnum periphery_mesher(
"triangle quad_ring",
"triangle");
42 params.addParam<
MooseEnum>(
"periphery_generator",
44 "The meshgenerator to use when meshing the core boundary.");
47 params.addRangeCheckedParam<
Real>(
48 "outer_circle_radius", 0,
"outer_circle_radius>=0",
"Radius of outer circle boundary.");
49 params.addRangeCheckedParam<
unsigned int>(
50 "outer_circle_num_segments",
52 "outer_circle_num_segments>=0",
53 "Number of radial segments to subdivide outer circle boundary.");
54 params.addRangeCheckedParam<
unsigned int>(
55 "periphery_num_layers",
57 "periphery_num_layers>0",
58 "Number of layers to subdivide the periphery boundary.");
59 params.addParam<std::string>(
62 "periphery_region_id",
64 "ID for periphery zone for assignment of region_id extra element id.");
65 params.addRangeCheckedParam<
Real>(
69 "Desired (maximum) triangle area, or 0 to skip uniform refinement");
70 params.addParam<std::string>(
73 "Desired (local) triangle area as a function of x,y; omit to skip non-uniform refinement");
74 params.addParam<
bool>(
"assign_control_drum_id",
76 "Whether control drum id is assigned to the mesh as an extra integer.");
77 params.addParamNamesToGroup(
"periphery_block_name periphery_region_id outer_circle_radius " 78 "mesh_periphery periphery_generator",
80 params.addParamNamesToGroup(
"outer_circle_num_segments desired_area desired_area_func",
81 "Periphery Meshing: PTMG specific");
82 params.addParamNamesToGroup(
"periphery_num_layers",
"Periphery Meshing: PRMG specific");
85 params.addParam<
bool>(
"extrude",
87 "Determines if this is the final step in the geometry construction" 88 " and extrudes the 2D geometry to 3D. If this is true then this mesh " 89 "cannot be used in further mesh building in the Reactor workflow");
91 params.addClassDescription(
92 "This CoreMeshGenerator object is designed to generate a core-like " 93 "structure, with IDs, from a reactor geometry. " 94 "The core-like structure consists of a pattern of assembly-like " 95 "structures generated with AssemblyMeshGenerator and/or ControlDrumMeshGenerator " 96 "and is permitted to have \"empty\" locations. The size and spacing " 97 "of the assembly-like structures is defined, and " 98 "enforced by declaration in the ReactorMeshParams.");
110 _inputs(getParam<
std::vector<MeshGeneratorName>>(
"inputs")),
111 _empty_key(getParam<
std::string>(
"dummy_assembly_name")),
112 _pattern(getParam<
std::vector<
std::vector<unsigned
int>>>(
"pattern")),
113 _extrude(getParam<bool>(
"extrude")),
114 _mesh_periphery(getParam<bool>(
"mesh_periphery")),
115 _periphery_meshgenerator(getParam<
MooseEnum>(
"periphery_generator")),
117 _outer_circle_radius(getParam<
Real>(
"outer_circle_radius")),
118 _outer_circle_num_segments(getParam<unsigned
int>(
"outer_circle_num_segments")),
119 _periphery_block_name(getParam<
std::string>(
"periphery_block_name")),
120 _periphery_num_layers(getParam<unsigned
int>(
"periphery_num_layers")),
121 _desired_area(getParam<
Real>(
"desired_area")),
122 _desired_area_func(getParam<
std::string>(
"desired_area_func"))
137 "Outer circle radius must be specified when using periphery meshing.");
142 "Periphery region id must be specified when using periphery meshing.");
150 "outer_circle_num_segments cannot be used with PRMG periphery mesher.");
155 "extra_circle_radii cannot be used with PRMG periphery mesher.");
160 "extra_circle_num_segments cannot be used with PRMG periphery mesher.");
169 "periphery_num_layers cannot be used with PTMG periphery mesher.");
174 "Provided periphery meshgenerator has not been implemented.");
177 MeshGeneratorName first_nondummy_assembly =
"";
178 MeshGeneratorName reactor_params =
"";
179 bool assembly_homogenization =
false;
180 bool pin_as_assembly =
false;
181 std::map<subdomain_id_type, std::string> global_pin_map_type_to_name;
182 std::map<subdomain_id_type, std::string> assembly_map_type_to_name;
192 if (first_nondummy_assembly ==
"")
194 first_nondummy_assembly = MeshGeneratorName(
_inputs[i]);
201 mooseError(
"The name of all reactor_params objects should be identical across all pins in " 202 "the input assemblies.\n");
205 mooseError(
"In order to stitch heterogeneous assemblies with homogeneous assemblies in " 206 "CoreMeshGenerator, ReactorMeshParams/flexible_assembly_stitching should be set " 211 if (assembly_map_type_to_name.find(
assembly_type) != assembly_map_type_to_name.end() &&
214 "Constituent assemblies have shared assembly_type ids but different names. Each uniquely " 215 "defined assembly in AssemblyMeshGenerator must have its own assembly_type id.");
223 for (
const auto & input_pin_name :
pin_names)
226 if (global_pin_map_type_to_name.find(
pin_type) != global_pin_map_type_to_name.end() &&
227 global_pin_map_type_to_name[
pin_type] != input_pin_name)
229 "Constituent pins within assemblies have shared pin_type ids but different names. " 230 "Each uniquely defined pin in AssemblyMeshGenerator must have its own pin_type id.");
231 global_pin_map_type_to_name[
pin_type] = input_pin_name;
237 if (first_nondummy_assembly ==
"")
238 paramError(
"inputs",
"At least one non-dummy assembly must be defined in input assembly names");
248 "In order to extrude this mesh, ReactorMeshParams/dim needs to be set to 3\n");
251 mooseError(
"Both top_boundary_id and bottom_boundary_id must be provided in ReactorMeshParams " 252 "if using extruded geometry");
254 mooseError(
"radial_boundary_id must be provided in ReactorMeshParams for CoreMeshGenerators");
259 "If ReactorMeshParams/region_id_as_block_name is set, periphery_block_name should " 260 "not be specified in CoreMeshGenerator");
262 std::size_t empty_pattern_loc = 0;
263 bool make_empty =
false;
270 mooseError(
"Assemblies that have already been extruded cannot be used in CoreMeshGenerator " 296 mooseWarning(
"Constituent assemblies do not share the same number of nodes at the outer " 297 "boundary. In order to ensure that output mesh does not having hanging nodes, a " 298 "flexible stitching approach should be used by setting " 299 "ReactorMeshParams/flexible_assembly_stitching = true.");
311 if (assembly_homogenization)
316 params.set<std::vector<subdomain_id_type>>(
"block_id") = {
323 const auto adaptive_mg_name =
324 _geom_type ==
"Hex" ?
"HexagonConcentricCircleAdaptiveBoundaryMeshGenerator" 325 :
"CartesianConcentricCircleAdaptiveBoundaryMeshGenerator";
332 params.set<std::vector<unsigned int>>(
"num_sectors_per_side") =
333 std::vector<unsigned int>(6, 2);
338 params.set<std::vector<unsigned int>>(
"num_sectors_per_side") =
339 std::vector<unsigned int>(4, 2);
341 params.set<std::vector<unsigned int>>(
"sides_to_adapt") = std::vector<unsigned int>{0};
342 params.set<std::vector<MeshGeneratorName>>(
"meshes_to_adapt_to") =
343 std::vector<MeshGeneratorName>{first_nondummy_assembly};
344 params.set<std::vector<subdomain_id_type>>(
"background_block_ids") =
352 const auto patterned_mg_name =
353 _geom_type ==
"Hex" ?
"PatternedHexMeshGenerator" :
"PatternedCartesianMeshGenerator";
356 params.
set<std::vector<std::string>>(
"id_name") = {
"assembly_id"};
357 params.set<std::vector<MooseEnum>>(
"assign_type") = {
359 params.set<std::vector<MeshGeneratorName>>(
"inputs") =
_inputs;
360 params.set<std::vector<std::vector<unsigned int>>>(
"pattern") =
_pattern;
361 params.set<
MooseEnum>(
"pattern_boundary") =
"none";
362 params.set<
bool>(
"generate_core_metadata") = !pin_as_assembly;
363 params.set<
bool>(
"create_outward_interface_boundaries") =
false;
364 params.set<
bool>(
"assign_control_drum_id") = getParam<bool>(
"assign_control_drum_id");
367 params.set<std::vector<MeshGeneratorName>>(
"exclude_id") =
374 params.set<
double>(
"rotate_angle") = 0.0;
375 params.set<
bool>(
"allow_unused_inputs") =
true;
384 params.
set<std::vector<SubdomainName>>(
"block") = {
386 params.set<MeshGeneratorName>(
"input") =
name() +
"_pattern";
392 std::string build_mesh_name;
398 std::vector<BoundaryName> boundaries_to_delete = {};
399 for (
const auto & pattern_x :
_pattern)
401 for (
const auto & pattern_idx : pattern_x)
403 const auto assembly_name =
_inputs[pattern_idx];
406 const auto assembly_id =
408 const BoundaryName boundary_name =
410 if (!std::count(boundaries_to_delete.begin(), boundaries_to_delete.end(), boundary_name))
411 boundaries_to_delete.push_back(boundary_name);
416 params.
set<MeshGeneratorName>(
"input") =
418 params.set<std::vector<BoundaryName>>(
"boundary_names") = boundaries_to_delete;
420 build_mesh_name =
name() +
"_delbds";
435 std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>>>(
440 pin->first, pin->second));
443 getMeshProperty<std::map<subdomain_id_type, std::vector<std::vector<std::string>>>>(
456 std::vector<subdomain_id_type> background_region_ids =
469 std::vector<std::string> background_block_names =
476 background_block_names));
505 ?
"PeripheralTriangleMeshGenerator" 506 :
"PeripheralRingMeshGenerator";
510 params.
set<MeshGeneratorName>(
"input") =
name() +
"_delbds";
512 params.set<BoundaryName>(
"external_boundary_name") =
"outside_periphery";
530 build_mesh_name =
name() +
"_periphery";
563 std::vector<std::vector<int>> assembly_name_lattice;
564 std::vector<std::string> input_assembly_names;
565 std::vector<std::string> input_pin_names;
570 const auto input_assembly_name =
_inputs[i];
573 input_assembly_names.push_back(input_assembly_name);
578 getMeshProperty<std::vector<std::string>>(
RGMB::pin_names, input_assembly_name);
580 if (std::find(input_pin_names.begin(), input_pin_names.end(), pin_name) ==
581 input_pin_names.end())
582 input_pin_names.push_back(pin_name);
590 std::vector<int> assembly_name_idx(
_pattern[i].size());
596 assembly_name_idx[
j] = -1;
600 const auto it = std::find(
601 input_assembly_names.begin(), input_assembly_names.end(), input_assembly_name);
602 assembly_name_idx[
j] = it - input_assembly_names.begin();
605 assembly_name_lattice.push_back(assembly_name_idx);
617 MeshGeneratorName first_nondummy_assembly =
"";
618 bool assembly_homogenization =
false;
619 unsigned int n_constituent_pins = 0;
620 unsigned int n_pin_sectors = 0;
637 unsigned int total_pins = 0;
638 unsigned int pin_sectors_per_side = 0;
641 const auto first_pin_name =
643 pin_sectors_per_side = getMeshProperty<std::vector<unsigned int>>(
"num_sectors_per_side_meta",
644 first_pin_name +
"_2D")[0];
656 pin_sectors_per_side = 0;
662 pin_sectors_per_side = getMeshProperty<std::vector<unsigned int>>(
663 "num_sectors_per_side_meta",
_inputs[i] +
"_2D")[0];
667 if (first_nondummy_assembly ==
"")
669 first_nondummy_assembly = MeshGeneratorName(
_inputs[i]);
671 n_constituent_pins = total_pins;
672 n_pin_sectors = pin_sectors_per_side;
678 mooseWarning(
"Detected mix of homogenized and heterogeneous assemblies between " +
679 first_nondummy_assembly +
" and " +
_inputs[i]);
682 if (total_pins != n_constituent_pins)
685 "Detected assemblies with different number of total constituent pins between " +
686 first_nondummy_assembly +
" and " +
_inputs[i]);
689 if (pin_sectors_per_side != n_pin_sectors)
692 " differ in terms of number of sectors per side");
700 std::unique_ptr<MeshBase>
711 auto null_mesh =
nullptr;
720 std::string pin_type_id_name =
"pin_type_id";
721 std::string assembly_type_id_name =
"assembly_type_id";
722 std::string plane_id_name =
"plane_id";
723 std::string region_id_name =
"region_id";
724 std::string radial_id_name =
"radial_id";
731 unsigned int plane_id_int = 0;
737 std::map<std::string, SubdomainID> rgmb_name_id_map;
741 for (
auto & elem : (*_build_mesh)->active_element_ptr_range())
744 dof_id_type pin_type_id = elem->get_extra_integer(pin_type_id_int);
749 const dof_id_type radial_idx = elem->get_extra_integer(radial_id_int);
751 elem->set_extra_integer(region_id_int, elem_rid);
755 auto elem_block_name = default_block_name;
759 elem_block_name +=
"_REG" + std::to_string(elem_rid);
760 if (elem->type() ==
TRI3 || elem->type() ==
PRISM6)
763 *(*
_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id);
765 else if ((*_build_mesh)->subdomain_name(elem->subdomain_id()) ==
775 if (elem->type() ==
TRI3 || elem->type() ==
PRISM6)
778 *(*
_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id);
782 dof_id_type assembly_type_id = elem->get_extra_integer(assembly_type_id_int);
793 elem->set_extra_integer(region_id_int, elem_rid);
796 auto elem_block_name = default_block_name;
798 elem_block_name +=
"_REG" + std::to_string(elem_rid);
802 if (has_drum_block_name)
805 if (elem->type() ==
TRI3 || elem->type() ==
PRISM6)
808 *(*
_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id);
815 bool is_background_region = peripheral_idx == 0;
816 const auto elem_rid =
817 (is_background_region
820 elem->set_extra_integer(region_id_int, elem_rid);
823 auto elem_block_name = default_block_name;
825 elem_block_name +=
"_REG" + std::to_string(elem_rid);
828 if (is_background_region)
831 if (has_background_block_name)
837 if (has_duct_block_names)
842 if (elem->type() ==
TRI3 || elem->type() ==
PRISM6)
845 *(*
_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id);
853 BoundaryInfo & boundary_info = (*_build_mesh)->get_boundary_info();
857 const auto sideset_map = boundary_info.get_sideset_map();
859 for (
const auto & [elem, id_pair] : sideset_map)
861 const auto side_id = id_pair.first;
862 const auto sideset_id = id_pair.second;
865 if (sideset_id == source_id)
867 auto mm_it = sideset_map.equal_range(elem);
870 for (
auto it = mm_it.first; it != mm_it.second; it++)
872 if (it->second.first ==
side_id && it->second.second == target_id)
877 boundary_info.add_side(elem,
side_id, target_id);
881 if (getParam<bool>(
"generate_depletion_id"))
883 const MooseEnum option = getParam<MooseEnum>(
"depletion_id_type");
888 (*_build_mesh)->unset_is_prepared();
893 std::unique_ptr<CSG::CSGBase>
899 auto csg_obj = std::make_unique<CSG::CSGBase>();
901 const auto dummy_univ_name =
_empty_key +
"_univ";
907 const auto dummy_cell_name =
_empty_key +
"_cell";
908 const auto & dummy_univ = csg_obj->createUniverse(dummy_univ_name);
910 csg_obj->createCell(dummy_cell_name, empty_region, &dummy_univ);
918 std::unordered_map<unsigned int, std::string> univ_id_names;
919 std::vector<std::string> univs_to_discard;
923 univ_id_names[i] = dummy_univ_name;
926 const auto input_univ_name_discard =
_inputs[i] +
"_root_univ";
927 const auto input_univ_name =
_inputs[i] +
"_univ";
928 csg_obj->joinOtherBase(std::move(*
_input_csg_bases[i]),
true, input_univ_name_discard);
929 univs_to_discard.push_back(input_univ_name_discard);
930 univ_id_names[i] = input_univ_name;
935 for (
const auto & univ_name : univs_to_discard)
937 const auto & universe_to_delete = csg_obj->getUniverseByName(univ_name);
938 const auto cells_to_delete = universe_to_delete.getAllCells();
939 csg_obj->deleteUniverse(universe_to_delete);
940 for (
const auto & cell : cells_to_delete)
941 csg_obj->deleteCell(cell.get());
945 std::vector<std::vector<std::reference_wrapper<const CSG::CSGUniverse>>> universe_pattern;
948 std::vector<std::reference_wrapper<const CSG::CSGUniverse>> universe_row;
949 for (
const auto & univ_id : row)
951 const auto & lattice_univ = csg_obj->getUniverseByName(univ_id_names[univ_id]);
952 universe_row.push_back(lattice_univ);
954 universe_pattern.push_back(universe_row);
966 csg_obj->setLatticeOuter(core_lattice, region_name);
970 const auto & outer_univ = csg_obj->getUniverseByName(dummy_univ_name);
971 csg_obj->setLatticeOuter(core_lattice, outer_univ);
980 std::string lat_cell_name =
name() +
"_lattice_cell";
985 const auto ring_surf_name =
name() +
"_radial_ring";
986 std::unique_ptr<CSG::CSGSurface> ring_surf_ptr =
987 std::make_unique<CSG::CSGZCylinder>(ring_surf_name, 0, 0, ring_radius);
988 const auto & ring_surf = csg_obj->addSurface(std::move(ring_surf_ptr));
989 auto lat_cell_region = -ring_surf;
994 const auto & lowest_axial_surf = surfaces_by_axial_region.front().get();
995 const auto & highest_axial_surf = surfaces_by_axial_region.back().get();
996 lat_cell_region = lat_cell_region & +lowest_axial_surf & -highest_axial_surf;
998 csg_obj->createCell(lat_cell_name, core_lattice, lat_cell_region);
std::unique_ptr< MeshBase > & getMeshByName(const MeshGeneratorName &mesh_generator_name)
static void addDepletionIDParams(InputParameters ¶meters)
static InputParameters validParams()
const bool _mesh_periphery
Whether the core periphery should be meshed.
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 b...
static const std::string duct_block_names
static const std::string background_region_id
static const std::string assembly_type
void paramError(const std::string ¶m, Args... args) const
std::vector< std::unique_ptr< CSG::CSGBase > *> getCSGBases(const std::string ¶m_name)
static const std::string region_id_as_block_name
std::map< subdomain_id_type, std::vector< std::vector< subdomain_id_type > > > _duct_region_id_map
A mapping from assembly-type IDs to region IDs in the assembly duct regions used when assigning regio...
static const std::string assembly_lattice
const SubdomainName PERIPHERAL_RING_BLOCK_NAME
static const std::string is_single_pin
std::vector< std::unique_ptr< CSG::CSGBase > * > _input_csg_bases
List of pointers to all CSG bases created by input mesh generators.
std::unique_ptr< CSG::CSGBase > generateCSG() override
Mesh generator for defining a reactor core using a Cartesian or hexagonal lattice with the option to ...
static const std::string peripheral_ring_radius
const subdomain_id_type DUMMY_ASSEMBLY_BLOCK_ID
const InputParameters & parameters() const
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 exis...
const boundary_id_type side_id
static const std::string reactor_params_name
static const std::string mesh_geometry
void initializeReactorMeshParams(const std::string reactor_param_name)
Initializes and checks validity of ReactorMeshParams mesh generator object.
InputParameters getValidParams(const std::string &name) const
std::vector< std::reference_wrapper< const CSG::CSGSurface > > getAxialPlaneSurfaces(CSG::CSGBase &csg_obj)
Get CSGSurfaces corresponding to axial planes of the extruded RGMB mesh.
static const std::string assembly_names
static const std::string background_block_name
void addDepletionId(MeshBase &input_mesh, const MooseEnum &option, const DepletionIDGenerationLevel generation_level, const bool extrude)
add depletion IDs
static const std::string peripheral_ring_region_id
static const std::string assembly_pitch
static const std::string radial_boundary_id
static const std::string pin_type
const Real _outer_circle_radius
outer circle boundary radius
static InputParameters validParams()
const SubdomainName TRI_BLOCK_NAME_SUFFIX
bool _empty_pos
Whether empty positions are to be used in the pattern.
std::string _desired_area_func
Desired (local) triangle area as a function of (x,y)
static const std::string drum_block_names
const std::vector< MeshGeneratorName > _inputs
The names of the assemblies that compose the core.
static const std::string pin_region_id_map
std::map< subdomain_id_type, std::vector< subdomain_id_type > > _background_region_id_map
A mapping from assembly-type IDs to region IDs in the assembly background regions used when assigning...
static const std::string extruded
const subdomain_id_type PERIPHERAL_RING_BLOCK_ID
const bool _extrude
Whether this mesh should be extruded to 3-D, the core is always assumed to be the last...
const MooseEnum _periphery_meshgenerator
Which periphery meshgenerator to use.
const std::string & name() const
std::map< subdomain_id_type, std::vector< std::vector< std::string > > > _pin_block_name_map
A mapping from pin-type IDs to block names used when assigning block names during the assembly stitch...
static const std::string mesh_dimensions
const unsigned int _outer_circle_num_segments
Number of segments in the outer circle boundary.
void addMeshSubgenerator(const std::string &type, const std::string &name, Ts... extra_input_parameters)
MeshGeneratorName callExtrusionMeshSubgenerators(const MeshGeneratorName input_mesh_name)
Calls mesh subgenerators related to extrusion, renaming of top / bottom boundaries, and defining plane IDs.
registerMooseObject("ReactorApp", CoreMeshGenerator)
const unsigned int _periphery_num_layers
Number of periphery layers.
std::string _geom_type
The geometry type for the reactor that is stored on the ReactorMeshParams object. ...
void freeReactorParamsMesh()
Releases the mesh obtained in _reactor_params_mesh.
const SubdomainName CORE_BLOCK_NAME_PREFIX
bool constituentAssembliesNeedFlexibleStiching()
static const std::string top_boundary_id
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
std::vector< std::unique_ptr< MeshBase > *> getMeshes(const std::string ¶m_name)
std::map< subdomain_id_type, std::vector< std::vector< subdomain_id_type > > > _pin_region_id_map
A mapping from pin-type IDs to region IDs used when assigning region IDs during the assembly stitchin...
static void setHasGenerateCSG(InputParameters ¶ms)
std::map< subdomain_id_type, std::vector< std::vector< std::string > > > _duct_block_name_map
A mapping from assembly-type IDs to block names in the assembly duct regions used when assigning bloc...
static const std::string is_homogenized
void freeReactorParamsCSG()
Releases the CSG base object obtained in _reactor_params_csg.
static const std::string is_control_drum
std::map< subdomain_id_type, std::vector< std::string > > _background_block_name_map
A mapping from assembly-type IDs to block names in the assembly background regions used when assignin...
static const std::string flexible_assembly_stitching
static const std::string pin_lattice
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const BoundaryName CORE_BOUNDARY_NAME
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
std::unique_ptr< MeshBase > generate() override
const CSG::CSGLattice & createRGMBLattice(const Real pitch, const std::vector< std::vector< std::reference_wrapper< const CSG::CSGUniverse >>> pattern, CSG::CSGBase &csg_obj)
Create CSG lattice for assembly and core lattices.
const std::string _periphery_block_name
The subdomain name for the generated mesh outer boundary.
const MeshGeneratorName _empty_key
The name of "filler" assembly given in the input to represent an empty space in the core pattern...
void mooseWarning(Args &&... args) const
void mooseError(Args &&... args) const
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.
const BoundaryName ASSEMBLY_BOUNDARY_NAME_PREFIX
const Real _desired_area
Desired (maximum) triangle area.
T & declareMeshProperty(const std::string &data_name, Args &&... args)
static const std::string drum_region_ids
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const subdomain_id_type _periphery_region_id
"region_id" extra-element integer of the periphery mesh elements
static const std::string bypass_meshgen
static const std::string pin_names
std::map< subdomain_id_type, std::vector< std::vector< subdomain_id_type > > > _drum_region_id_map
A mapping from assembly-type IDs to region IDs in the drum regions used when assigning region IDs dur...
MeshGeneratorSystem & getMeshGeneratorSystem()
void declareMeshesForSub(const std::string ¶m_name)
void declareNullMeshName(const MeshGeneratorName &name)
SubdomainID getNextFreeSubdomainID(MeshBase &input_mesh)
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
const std::vector< std::vector< unsigned int > > _pattern
The 2D assembly layout of the core.
CoreMeshGenerator(const InputParameters ¶meters)
static const std::string duct_region_ids
void ErrorVector unsigned int
const subdomain_id_type MAX_PIN_TYPE_ID
auto index_range(const T &sizable)
std::map< subdomain_id_type, std::vector< std::vector< std::string > > > _drum_block_name_map
A mapping from assembly-type IDs to block names in the drum regions used when assigning block names d...
static const std::string bottom_boundary_id
static const std::string pin_block_name_map
unsigned int _mesh_dimensions
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshPar...