20 params.
addParam<std::vector<MeshGeneratorName>>(
21 "exclude_id",
"Name of input meshes to be excluded in ID generation");
22 MooseEnum option(
"cell pattern manual",
"cell");
23 params.
addParam<
MooseEnum>(
"assign_type", option,
"Type of integer ID assignment");
24 params.
addParam<std::vector<std::vector<dof_id_type>>>(
26 "User-defined element IDs. A double-indexed array starting with the upper-left corner");
27 params.
addClassDescription(
"Generate Certesian lattice meshes with reporting ID assignment that " 28 "indentifies individual components of lattice.");
36 _element_id_name(getParam<
std::string>(
"id_name")),
39 _use_exclude_id(isParamValid(
"exclude_id"))
42 paramError(
"exclude_id",
"works only when \"assign_type\" is equal 'cell'");
44 paramError(
"id_pattern",
"required when \"assign_type\" is equal to 'manual'");
47 _id_pattern = getParam<std::vector<std::vector<dof_id_type>>>(
"id_pattern");
51 std::vector<MeshGeneratorName> exclude_id_name =
52 getParam<std::vector<MeshGeneratorName>>(
"exclude_id");
56 for (
auto input_name : exclude_id_name)
69 std::unique_ptr<MeshBase>
74 unsigned int extra_id_index;
81 "id_name",
"An element integer with the name '",
_element_id_name,
"' already exists");
85 const bool has_assembly_duct =
false;
86 const std::set<subdomain_id_type> duct_block_ids;
std::vector< std::unique_ptr< ReplicatedMesh > > _meshes
void assignReportingIDs(MeshBase &mesh, const unsigned int extra_id_index, const ReportingIDGeneratorUtils::AssignType assign_type, const bool use_exclude_id, const std::vector< bool > &exclude_ids, const bool has_assembly_boundary, const std::set< subdomain_id_type > background_block_ids, const std::vector< std::unique_ptr< libMesh::ReplicatedMesh >> &input_meshes, const std::vector< std::vector< unsigned int >> &pattern, const std::vector< std::vector< dof_id_type >> &id_pattern)
assign the reporting IDs to the output mesh from the cartesian or hexagonal patterned mesh generator ...
assign IDs based on user-defined mapping
const std::vector< std::vector< unsigned int > > & _pattern
std::vector< bool > _exclude_ids
flag to indicate if exclude_id is used for each input
AssignType
Enum item for reporting id assign types.
static InputParameters validParams()
Generates patterned Cartesian meshes with a reporting ID.
bool isParamValid(const std::string &name) const
registerMooseObject("ReactorApp", CartesianIDPatternedMeshGenerator)
void paramError(const std::string ¶m, Args... args) const
assign unique IDs for each tile in the lattice in sequential order
CartesianIDPatternedMeshGenerator(const InputParameters ¶meters)
std::unique_ptr< MeshBase > generate() override
std::unique_ptr< MeshBase > generate() override
const bool _use_exclude_id
flag to indicate if exclude_id is defined
const ReportingIDGeneratorUtils::AssignType _assign_type
integer ID assignment type
static InputParameters validParams()
void paramWarning(const std::string ¶m, Args... args) const
std::vector< std::vector< dof_id_type > > _id_pattern
hold integer ID for each input pattern cell
const std::string _element_id_name
name of integer ID.
const std::vector< MeshGeneratorName > & _input_names