15#include "libmesh/elem.h"
29 params.addRequiredParam<std::vector<MeshGeneratorName>>(
30 "inputs",
"The PinMeshGenerators that form the components of the assembly.");
32 params.addRequiredParam<subdomain_id_type>(
"assembly_type",
33 "The integer ID for this assembly type definition");
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 pins in the assembly lattice.");
40 params.addRangeCheckedParam<std::vector<Real>>(
43 "Distance(s) from center to duct(s) inner boundaries.");
45 params.addRangeCheckedParam<
unsigned int>(
"background_intervals",
46 "background_intervals>0",
47 "Radial intervals in the assembly peripheral region.");
49 params.addRangeCheckedParam<std::vector<unsigned int>>(
50 "duct_intervals",
"duct_intervals>0",
"Number of meshing intervals in each enclosing duct.");
52 params.addParam<std::vector<subdomain_id_type>>(
53 "background_region_id",
54 "The region id for the background area between the pins and the ducts to set region_id "
55 "extra-element integer");
57 params.addParam<std::vector<std::vector<subdomain_id_type>>>(
59 "The region id for the ducts from innermost to outermost, to set region_id "
60 "extra-element integer.");
62 params.addParam<std::vector<std::string>>(
"background_block_name",
63 "The block names for the assembly background regions");
65 params.addParam<std::vector<std::vector<std::string>>>(
67 "The block names for the assembly duct regions from innermost to outermost");
69 params.addParam<
bool>(
"extrude",
71 "Determines if this is the final step in the geometry construction"
72 " and extrudes the 2D geometry to 3D. If this is true then this mesh "
73 "cannot be used in further mesh building in the Reactor workflow");
74 params.addParamNamesToGroup(
"background_region_id duct_region_ids assembly_type",
"ID assigment");
75 params.addParamNamesToGroup(
"background_intervals background_region_id",
76 "Background specifications");
77 params.addParamNamesToGroup(
"duct_intervals duct_region_ids duct_halfpitch",
78 "Duct specifications");
80 params.addClassDescription(
"This AssemblyMeshGenerator object is designed to generate "
81 "assembly-like structures, with IDs, from a reactor geometry. "
82 "The assembly-like structures must consist of a full pattern of equal "
83 "sized pins from PinMeshGenerator. "
84 "A hexagonal assembly will be placed inside of a bounding hexagon "
85 "consisting of a background region and, optionally,"
98 _inputs(getParam<
std::vector<MeshGeneratorName>>(
"inputs")),
99 _assembly_type(getParam<subdomain_id_type>(
"assembly_type")),
100 _pattern(getParam<
std::vector<
std::vector<unsigned
int>>>(
"pattern")),
101 _duct_sizes(isParamValid(
"duct_halfpitch") ? getParam<
std::vector<Real>>(
"duct_halfpitch")
102 :
std::vector<Real>()),
103 _background_intervals(
104 isParamValid(
"background_intervals") ? getParam<unsigned
int>(
"background_intervals") : 0),
105 _duct_intervals(isParamValid(
"duct_intervals")
106 ? getParam<
std::vector<unsigned
int>>(
"duct_intervals")
107 :
std::vector<unsigned
int>()),
108 _background_region_id(isParamValid(
"background_region_id")
109 ? getParam<
std::vector<subdomain_id_type>>(
"background_region_id")
110 :
std::vector<subdomain_id_type>()),
111 _duct_region_ids(isParamValid(
"duct_region_ids")
112 ? getParam<
std::vector<
std::vector<subdomain_id_type>>>(
"duct_region_ids")
113 :
std::vector<
std::vector<subdomain_id_type>>()),
114 _extrude(getParam<bool>(
"extrude"))
116 MeshGeneratorName reactor_params =
119 for (
unsigned int i = 1; i <
_inputs.size(); i++)
121 mooseError(
"The name of all reactor_params objects should be identical across all input pins "
122 "in the assembly.\n");
132 "In order to extrude this mesh, ReactorMeshParams/dim needs to be set to 3\n");
135 mooseError(
"Both top_boundary_id and bottom_boundary_id must be provided in ReactorMeshParams "
136 "if using extruded geometry");
138 Real base_pitch = 0.0;
141 std::map<subdomain_id_type, std::string> pin_map_type_to_name;
142 for (
const auto i : index_range(
_inputs))
146 base_pitch = getMeshProperty<Real>(
RGMB::pitch, pin);
149 auto pitch = getMeshProperty<Real>(
RGMB::pitch, pin);
150 if (!MooseUtils::absoluteFuzzyEqual(pitch, base_pitch))
151 mooseError(
"All pins within an assembly must have the same pitch");
154 mooseError(
"Pins that have already been extruded cannot be used in AssemblyMeshGenerator "
156 const auto pin_type = getMeshProperty<subdomain_id_type>(
RGMB::pin_type, pin);
157 if (pin_map_type_to_name.find(pin_type) != pin_map_type_to_name.end() &&
158 pin_map_type_to_name[pin_type] != pin)
159 mooseError(
"Constituent pins have shared pin_type ids but different names. Each uniquely "
160 "defined pin in PinMeshGenerator must have its own pin_type id.");
161 pin_map_type_to_name[pin_type] = pin;
165 unsigned int n_axial_levels =
175 if ((!MooseUtils::absoluteFuzzyEqual(base_pitch * ny, assembly_pitch)) ||
176 (!MooseUtils::absoluteFuzzyEqual(base_pitch * nx, assembly_pitch)))
178 "Assembly pitch must be equal to lattice dimension times pin pitch for Cartesian "
179 "assemblies with no background region");
181 mooseError(
"\"background_region_id\" must be defined if \"background_intervals\" is "
186 if ((base_pitch * ny > assembly_pitch) || (base_pitch * nx > assembly_pitch))
188 "Assembly pitch must be larger than lattice dimension times pin pitch for Cartesian "
189 "assemblies with background region");
191 mooseError(
"\"background_intervals\" must be greater than 0 if \"background_region_id\" is "
195 "The size of background_region_id must be equal to the number of axial levels as "
196 "defined in the ReactorMeshParams object");
202 mooseError(
"Hexagonal assemblies must have a background region defined");
203 if (assembly_pitch / std::sin(M_PI / 3.0) <
_pattern.size() * base_pitch)
204 mooseError(
"Hexagonal diameter of assembly must be larger than the number of assembly rows "
205 "times the pin pitch");
208 mooseError(
"The size of background_region_id must be equal to the number of axial levels as "
209 "defined in the ReactorMeshParams object");
213 mooseError(
"If ducts are defined then \"duct_intervals\" and \"duct_region_ids\" must also be "
214 "defined and of equal size.");
220 mooseError(
"The size of duct_region_id must be equal to the number of axial levels as "
221 "defined in the ReactorMeshParams object");
224 "If ducts are defined, then \"duct_intervals\" and \"duct_region_ids\" "
225 "must also be defined and of equal size.");
233 "If ReactorMeshParams/region_id_as_block_name is set, background_block_name "
234 "should not be specified in AssemblyMeshGenerator");
238 mooseError(
"The size of background_block_name must match the size of background_region_id");
247 "If ReactorMeshParams/region_id_as_block_name is set, duct_block_names should not "
248 "be specified in AssemblyMeshGenerator");
250 _duct_block_names = getParam<std::vector<std::vector<std::string>>>(
"duct_block_names");
252 mooseError(
"The size of duct_block_names must match the size of duct_region_ids");
255 mooseError(
"The size of duct_block_names must match the size of duct_region_ids");
271 const auto patterned_mg_name =
272 _geom_type ==
"Hex" ?
"PatternedHexMeshGenerator" :
"PatternedCartesianMeshGenerator";
278 params.set<
MooseEnum>(
"hexagon_size_style") =
"apothem";
283 params.set<
MooseEnum>(
"pattern_boundary") =
"none";
286 params.set<
MooseEnum>(
"pattern_boundary") =
"expanded";
288 params.set<
bool>(
"uniform_mesh_on_sides") =
true;
292 params.set<std::vector<std::string>>(
"id_name") = {
"pin_id"};
293 params.set<std::vector<MooseEnum>>(
"assign_type") = {
295 params.set<std::vector<MeshGeneratorName>>(
"inputs") =
_inputs;
296 params.set<std::vector<std::vector<unsigned int>>>(
"pattern") =
_pattern;
297 params.set<
bool>(
"create_outward_interface_boundaries") =
false;
304 const auto background_block_name =
307 params.set<subdomain_id_type>(
"background_block_id") = background_block_id;
308 params.set<SubdomainName>(
"background_block_name") = background_block_name;
313 std::vector<subdomain_id_type> duct_block_ids;
314 std::vector<SubdomainName> duct_block_names;
319 std::to_string(duct_it + 1);
321 duct_block_ids.push_back(duct_block_id);
322 duct_block_names.push_back(duct_block_name);
325 params.set<std::vector<Real>>(
"duct_sizes") =
_duct_sizes;
326 params.set<std::vector<subdomain_id_type>>(
"duct_block_ids") = duct_block_ids;
327 params.set<std::vector<SubdomainName>>(
"duct_block_names") = duct_block_names;
328 params.set<std::vector<unsigned int>>(
"duct_intervals") =
_duct_intervals;
337 copyMeshProperty<bool>(
"is_control_drum_meta",
name() +
"_pattern");
338 copyMeshProperty<std::vector<Point>>(
"control_drum_positions",
name() +
"_pattern");
339 copyMeshProperty<std::vector<Real>>(
"control_drum_angles",
name() +
"_pattern");
340 copyMeshProperty<std::vector<std::vector<Real>>>(
"control_drums_azimuthal_meta",
341 name() +
"_pattern");
342 copyMeshProperty<std::string>(
"position_file_name",
name() +
"_pattern");
343 copyMeshProperty<Real>(
"pattern_pitch_meta",
name() +
"_pattern");
346 std::string build_mesh_name =
name() +
"_delbds";
351 std::vector<BoundaryName> boundaries_to_delete = {};
352 for (
const auto & pattern_x :
_pattern)
354 for (
const auto & pattern_idx : pattern_x)
356 const auto pin_name =
_inputs[pattern_idx];
357 const auto pin_id = getMeshProperty<subdomain_id_type>(
RGMB::pin_type, pin_name);
358 const BoundaryName boundary_name =
360 if (!std::count(boundaries_to_delete.begin(), boundaries_to_delete.end(), boundary_name))
361 boundaries_to_delete.push_back(boundary_name);
366 params.
set<MeshGeneratorName>(
"input") =
name() +
"_pattern";
367 params.set<std::vector<BoundaryName>>(
"boundary_names") = boundaries_to_delete;
374 if (use_flexible_stitching)
377 build_mesh_name =
name() +
"_fpg_delbds";
382 std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> region_id_map =
383 getMeshProperty<std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>>>(
386 std::pair<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>>(
387 region_id_map.begin()->first, region_id_map.begin()->second));
388 subdomain_id_type pin_type_id = getMeshProperty<subdomain_id_type>(
RGMB::pin_type, pinMG);
389 std::vector<std::vector<std::string>> pin_block_names =
392 std::pair<subdomain_id_type, std::vector<std::vector<std::string>>>(pin_type_id,
437 std::vector<std::vector<int>> pin_name_lattice;
438 std::vector<std::string> input_pin_names;
439 for (
const auto i : index_range(
_pattern))
441 std::vector<int> pin_name_idx(
_pattern[i].size());
442 for (
const auto j : index_range(
_pattern[i]))
445 const auto it = std::find(input_pin_names.begin(), input_pin_names.end(), input_pin_name);
446 if (it == input_pin_names.end())
448 pin_name_idx[j] = input_pin_names.size();
449 input_pin_names.push_back(input_pin_name);
452 pin_name_idx[j] = it - input_pin_names.begin();
454 pin_name_lattice.push_back(pin_name_idx);
465 SubdomainName block_to_delete =
"";
467 mooseError(
"Attempting to use flexible stitching on assembly " +
name() +
468 " that does not have a background region. This is not yet supported.");
471 std::to_string(radial_index);
477 params.
set<std::vector<SubdomainName>>(
"block") = {block_to_delete};
478 params.set<MeshGeneratorName>(
"input") =
name() +
"_delbds";
486 params.
set<std::vector<MeshGeneratorName>>(
"inputs") = {
name() +
"_del_outer"};
487 params.set<std::vector<libMesh::Point>>(
"extra_positions") = {
libMesh::Point(0, 0, 0)};
488 params.set<std::vector<unsigned int>>(
"extra_positions_mg_indices") = {0};
489 params.set<
bool>(
"use_auto_area_func") =
true;
491 params.set<
unsigned int>(
"boundary_sectors") =
496 params.set<SubdomainName>(
"background_subdomain_name") =
498 params.set<
bool>(
"verify_holes") =
false;
507 params.
set<MeshGeneratorName>(
"input") =
name() +
"_fpg";
508 params.set<std::vector<BoundaryName>>(
"boundary_names") = {std::to_string(1)};
514std::unique_ptr<MeshBase>
525 auto null_mesh =
nullptr;
531 if (hasMeshProperty<Real>(
"pattern_pitch_meta",
name() +
"_pattern"))
533 const auto pattern_pitch_meta =
534 getMeshProperty<Real>(
"pattern_pitch_meta",
name() +
"_pattern");
544 std::string plane_id_name =
"plane_id";
545 std::string region_id_name =
"region_id";
546 std::string pin_type_id_name =
"pin_type_id";
547 std::string assembly_type_id_name =
"assembly_type_id";
548 std::string radial_id_name =
"radial_id";
549 const std::string default_block_name =
558 unsigned int plane_id_int = 0;
564 std::map<std::string, SubdomainID> rgmb_name_id_map;
568 for (
auto & elem : (*_build_mesh)->active_element_ptr_range())
571 const dof_id_type pin_type_id = elem->get_extra_integer(pin_type_id_int);
572 const dof_id_type z_id =
_extrude ? elem->get_extra_integer(plane_id_int) : 0;
578 const dof_id_type radial_idx = elem->get_extra_integer(radial_id_int);
580 elem->set_extra_integer(region_id_int, elem_rid);
584 auto elem_block_name = default_block_name;
588 elem_block_name +=
"_REG" + std::to_string(elem_rid);
589 if (elem->type() == TRI3 || elem->type() == PRISM6)
592 *(*
_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id);
599 const auto base_block_id = elem->subdomain_id();
600 const auto base_block_name = (*_build_mesh)->subdomain_name(base_block_id);
604 if (!(base_block_name.find(prefix, 0) == 0))
607 const unsigned int peripheral_idx = std::stoi(base_block_name.substr(prefix.length()));
609 bool is_background_region = peripheral_idx == 0;
612 elem->set_extra_integer(pin_type_id_int, pin_type);
616 elem->set_extra_integer(region_id_int, elem_rid);
619 auto elem_block_name = default_block_name;
621 elem_block_name +=
"_REG" + std::to_string(elem_rid);
626 if (elem->type() == TRI3 || elem->type() == PRISM6)
629 *(*
_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id);
633 if (getParam<bool>(
"generate_depletion_id"))
635 const MooseEnum option = getParam<MooseEnum>(
"depletion_id_type");
640 (*_build_mesh)->unset_is_prepared();
645std::unique_ptr<CSG::CSGBase>
651 auto csg_obj = std::make_unique<CSG::CSGBase>();
656 std::unordered_map<unsigned int, std::string> univ_id_names;
657 for (
const auto i : index_range(
_inputs))
659 const auto input_univ_name_discard =
_inputs[i] +
"_root_univ";
660 csg_obj->joinOtherBase(std::move(*
_input_csg_bases[i]),
true, input_univ_name_discard);
662 const auto & universe_to_delete = csg_obj->getUniverseByName(input_univ_name_discard);
663 const auto cells_to_delete = universe_to_delete.getAllCells();
664 csg_obj->deleteUniverse(universe_to_delete);
668 for (
const auto & cell : cells_to_delete)
670 const auto & cell_to_delete = cell.get();
671 const auto & fill_univ_name = cell_to_delete.getFillUniverse().getName();
674 const auto & surfs_to_delete = cell_to_delete.getRegion().getSurfaces();
675 csg_obj->deleteCell(cell_to_delete);
676 univ_id_names[i] = fill_univ_name;
677 for (
const auto & surf : surfs_to_delete)
679 const auto & surf_name = surf.get().getName();
682 csg_obj->deleteSurface(csg_obj->getSurfaceByName(surf_name));
688 std::vector<std::vector<std::reference_wrapper<const CSG::CSGUniverse>>> universe_pattern;
691 std::vector<std::reference_wrapper<const CSG::CSGUniverse>> universe_row;
692 for (
const auto & univ_id : row)
694 const auto & lattice_univ = csg_obj->getUniverseByName(univ_id_names[univ_id]);
695 universe_row.push_back(lattice_univ);
697 universe_pattern.push_back(universe_row);
701 std::vector<std::reference_wrapper<const CSG::CSGSurface>> surfaces_by_axial_region;
704 if (extruded_assembly)
709 const auto & lowest_axial_surf = surfaces_by_axial_region.front().get();
710 const auto & highest_axial_surf = surfaces_by_axial_region.back().get();
711 axial_extent = +lowest_axial_surf & -highest_axial_surf;
719 const auto & assembly_univ = csg_obj->createUniverse(
name() +
"_univ");
720 const auto n_sides = (
_geom_type ==
"Hex") ? 6 : 4;
721 for (
const auto i : index_range(duct_boundaries))
723 bool is_last_radial_region = i == duct_boundaries.size() - 1;
728 auto & assembly_lattice =
createRGMBLattice(pin_pitch, universe_pattern, *csg_obj);
732 std::string lat_cell_name =
name() +
"_lattice_cell";
733 if (!is_last_radial_region)
735 const auto unit_name =
name() +
"_radial_duct_" + std::to_string(i);
736 std::unique_ptr<CSG::CSGNPolygonUnit> duct_ptr =
737 std::make_unique<CSG::CSGNPolygonUnit>(unit_name, n_sides, duct_boundaries[i]);
738 auto & duct_unit = csg_obj->addEngUnit(std::move(duct_ptr));
739 inner_region = -duct_unit;
745 csg_obj->applyAxisRotation(assembly_lattice, CSG::RotationAxisType::Z, 90.);
747 csg_obj->createCell(lat_cell_name, assembly_lattice, inner_region, &assembly_univ);
753 if (!is_last_radial_region)
755 const auto unit_name =
name() +
"_radial_duct_" + std::to_string(i);
756 std::unique_ptr<CSG::CSGNPolygonUnit> duct_ptr =
757 std::make_unique<CSG::CSGNPolygonUnit>(unit_name, n_sides, duct_boundaries[i]);
758 auto & duct_unit = csg_obj->addEngUnit(std::move(duct_ptr));
759 inner_region = -duct_unit;
760 radial_region &= inner_region;
764 std::string duct_cell_name =
name() +
"_duct_cell_radial_" + std::to_string(i - 1);
765 if (!extruded_assembly)
768 std::string region_name =
"rgmb_region_" + std::to_string(
_duct_region_ids[0][i - 1]);
769 csg_obj->createCell(duct_cell_name, region_name, radial_region, &assembly_univ);
774 const auto & name_prefix =
name() +
"_duct_radial_" + std::to_string(i - 1);
775 std::vector<subdomain_id_type> duct_region_ids;
779 name_prefix, surfaces_by_axial_region, duct_region_ids, *csg_obj);
780 csg_obj->createCell(duct_cell_name, fill_univ, radial_region, &assembly_univ);
787 const auto unit_name =
name() +
"_radial_boundary";
788 std::unique_ptr<CSG::CSGNPolygonUnit> duct_ptr =
789 std::make_unique<CSG::CSGNPolygonUnit>(unit_name, n_sides, duct_boundaries.back());
790 auto & duct_unit = csg_obj->addEngUnit(std::move(duct_ptr));
791 auto assembly_region = -duct_unit;
792 if (extruded_assembly)
793 assembly_region &= axial_extent;
794 csg_obj->createCell(
name() +
"_root_cell", assembly_univ, assembly_region);
797 csg_obj->expandAllEngUnits();
805 const std::vector<std::reference_wrapper<const CSG::CSGSurface>> & surfaces_by_axial_region,
830 const std::string & name_prefix,
831 const std::vector<std::reference_wrapper<const CSG::CSGSurface>> & surfaces_by_axial_region,
832 const std::vector<subdomain_id_type> & region_ids,
835 mooseAssert(surfaces_by_axial_region.size() - region_ids.size() == 1,
836 "Incorrect length of axial data vectors");
838 for (
const auto i : make_range(surfaces_by_axial_region.size() - 1))
841 const auto & lower_surf = surfaces_by_axial_region[i].get();
842 if (lower_surf != surfaces_by_axial_region.front())
843 axial_region = +lower_surf;
844 const auto & upper_surf = surfaces_by_axial_region[i + 1].get();
845 if (upper_surf != surfaces_by_axial_region.back())
847 if (axial_region.
getRegionType() == CSG::CSGRegion::RegionType::EMPTY)
848 axial_region = -upper_surf;
850 axial_region &= -upper_surf;
852 auto cell_name = name_prefix +
"_axial_" + std::to_string(i);
853 const auto mat_name =
"rgmb_region_" + std::to_string(region_ids[i]);
854 csg_obj.
createCell(cell_name, mat_name, axial_region, &fill_univ);
registerMooseObject("ReactorApp", AssemblyMeshGenerator)
void ErrorVector unsigned int
Mesh generator for defining a reactor assembly using a Cartesian or hexagonal lattice with the option...
const unsigned int _background_intervals
The number of divisions in the mesh outside of the pins and inside of the ducts.
std::vector< std::vector< subdomain_id_type > > _duct_region_ids
2-D vector (axial outer indexing, radial inner indexing) used to set the "region_id" extra-element in...
std::vector< std::unique_ptr< CSG::CSGBase > * > _input_csg_bases
List of pointers to all CSG bases created by input mesh generators.
const CSG::CSGUniverse & createDuctFillUniverse(const std::string &name_prefix, const std::vector< std::reference_wrapper< const CSG::CSGSurface > > &surfaces_by_axial_region, const std::vector< subdomain_id_type > ®ion_ids, CSG::CSGBase &csg_obj)
Create fill universe for ducted regions.
std::string _geom_type
The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object...
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 pin stitching sta...
boundary_id_type _assembly_boundary_id
The ID of the assembly outer boundary, equal to the assembly type ID + 2000.
std::vector< std::string > _background_block_name
Optional vector used to set the block names of the assembly background elements.
const bool _extrude
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh.
std::unique_ptr< MeshBase > generate() override
const std::vector< MeshGeneratorName > _inputs
The names of the pins that compose the Assembly.
static InputParameters validParams()
void generateFlexibleAssemblyBoundaries()
bool _has_duct_block_names
Whether block names for assembly duct elements have been provided by user.
std::unique_ptr< CSG::CSGBase > generateCSG() override
std::vector< subdomain_id_type > _background_region_id
Vector used to set the "region_id" extra-element integer of the assembly background elements.
BoundaryName _assembly_boundary_name
The name of the assembly outer boundary, equal to the concatenation of "outer_assembly_" and the asse...
AssemblyMeshGenerator(const InputParameters ¶meters)
const std::vector< Real > _duct_sizes
The inner apothem of any ducts around the assembly.
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 pin stitching s...
const std::vector< unsigned int > _duct_intervals
The number of divisions in the meshes of the ducts.
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
const subdomain_id_type _assembly_type
The id number for the type of the assembly.
unsigned int _mesh_dimensions
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshPar...
std::vector< std::vector< std::string > > _duct_block_names
Optional 2-D vector (axial outer indexing, radial inner indexing) used to set the block names of the ...
bool _has_background_block_name
Whether block names for assembly background elements have been provided by user.
void setAssemblyLatticeOuter(const CSG::CSGLattice &assembly_lattice, const std::vector< std::reference_wrapper< const CSG::CSGSurface > > &surfaces_by_axial_region, CSG::CSGBase &csg_obj)
Create CSG cell with lattice fill for region within first duct boundary.
const std::vector< std::vector< unsigned int > > _pattern
The 2D pin-by-pin layout of the assembly mapping indices into _inputs.
const CSGUniverse & createUniverse(const std::string &name)
void setLatticeOuter(const CSGLattice &lattice, const std::string &outer_name)
const CSGCell & createCell(const std::string &name, const std::string &mat_name, const CSGRegion ®ion, const CSGUniverse *add_to_univ=nullptr)
RegionType getRegionType() const
InputParameters getValidParams(const std::string &name) const
std::vector< std::unique_ptr< MeshBase > * > getMeshes(const std::string ¶m_name)
void addMeshSubgenerator(const std::string &type, const std::string &name, Ts... extra_input_parameters)
std::unique_ptr< MeshBase > & getMeshByName(const MeshGeneratorName &mesh_generator_name)
static void setHasGenerateCSG(InputParameters ¶ms)
T & setMeshProperty(const std::string &data_name, Args &&... args)
std::vector< std::unique_ptr< CSG::CSGBase > * > getCSGBases(const std::string ¶m_name)
void declareMeshesForSub(const std::string ¶m_name)
T & declareMeshProperty(const std::string &data_name, Args &&... args)
MeshGeneratorSystem & getMeshGeneratorSystem()
const std::string & name() const
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.
const T & getReactorParam(const std::string ¶m_name)
Returns reference of parameter in ReactorMeshParams object.
void initializeReactorMeshParams(const std::string reactor_param_name)
Initializes and checks validity of ReactorMeshParams mesh generator object.
std::vector< std::reference_wrapper< const CSG::CSGSurface > > getAxialPlaneSurfaces(CSG::CSGBase &csg_obj, const bool skip_intermediate_plane_generation)
Get CSGSurfaces corresponding to axial planes of the extruded RGMB mesh.
static void addDepletionIDParams(InputParameters ¶meters)
MeshGeneratorName callExtrusionMeshSubgenerators(const MeshGeneratorName input_mesh_name)
Calls mesh subgenerators related to extrusion, renaming of top / bottom boundaries,...
void freeReactorParamsMesh()
Releases the mesh obtained in _reactor_params_mesh.
static InputParameters validParams()
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...
void addDepletionId(MeshBase &input_mesh, const MooseEnum &option, const DepletionIDGenerationLevel generation_level, const bool extrude)
add depletion IDs
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.
void freeReactorParamsCSG()
Releases the CSG base object obtained in _reactor_params_csg.
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...
SubdomainID getNextFreeSubdomainID(MeshBase &input_mesh)
const subdomain_id_type MAX_PIN_TYPE_ID
static const std::string bottom_boundary_id
static const std::string is_single_pin
const SubdomainName ASSEMBLY_BLOCK_NAME_PREFIX
static const std::string pin_region_id_map
const BoundaryName PIN_BOUNDARY_NAME_PREFIX
static const std::string pin_lattice
static const std::string expand_units
static const std::string is_control_drum
static const std::string bypass_meshgen
const subdomain_id_type ASSEMBLY_BLOCK_ID_START
static constexpr boundary_id_type ASSEMBLY_BOUNDARY_ID_START
static const std::string top_boundary_id
static const std::string assembly_type
static const std::string pin_block_name_map
static const std::string duct_block_names
static const std::string duct_halfpitches
const SubdomainName TRI_BLOCK_NAME_SUFFIX
const BoundaryName ASSEMBLY_BOUNDARY_NAME_PREFIX
static const std::string assembly_pitch
static const std::string mesh_dimensions
static const std::string duct_region_ids
static const std::string pin_region_ids
static const std::string extruded
static const std::string num_sectors_flexible_stitching
static const std::string background_region_id
static const std::string flexible_assembly_stitching
static const std::string is_homogenized
static const std::string CSG_AXIAL_PLANE_PREFIX
const subdomain_id_type ASSEMBLY_BLOCK_ID_TRI_FLEXIBLE
static const std::string region_id_as_block_name
static const std::string background_block_name
static const std::string reactor_params_name
static const std::string axial_mesh_intervals
static const std::string pin_names
static const std::string pitch
static const std::string pin_block_names
static const std::string mesh_geometry
static const std::string pin_type