160 _mesh_ptrs(getMeshes(
"inputs")),
161 _input_names(getParam<
std::vector<MeshGeneratorName>>(
"inputs")),
162 _pattern(getParam<
std::vector<
std::vector<unsigned
int>>>(
"pattern")),
163 _pattern_boundary(getParam<
MooseEnum>(
"pattern_boundary")),
164 _generate_core_metadata(getParam<bool>(
"generate_core_metadata")),
165 _background_intervals(getParam<unsigned
int>(
"background_intervals")),
166 _has_assembly_duct(isParamValid(
"duct_sizes")),
167 _duct_sizes(isParamValid(
"duct_sizes") ? getParam<
std::vector<Real>>(
"duct_sizes")
168 :
std::vector<Real>()),
170 _duct_intervals(isParamValid(
"duct_intervals")
171 ? getParam<
std::vector<unsigned
int>>(
"duct_intervals")
172 :
std::vector<unsigned
int>()),
173 _uniform_mesh_on_sides(getParam<bool>(
"uniform_mesh_on_sides")),
174 _generate_control_drum_positions_file(getParam<bool>(
"generate_control_drum_positions_file")),
175 _assign_control_drum_id(getParam<bool>(
"assign_control_drum_id")),
176 _rotate_angle(getParam<Real>(
"rotate_angle")),
177 _duct_block_ids(isParamValid(
"duct_block_ids")
178 ? getParam<
std::vector<subdomain_id_type>>(
"duct_block_ids")
179 :
std::vector<subdomain_id_type>()),
180 _duct_block_names(getParam<
std::vector<SubdomainName>>(
"duct_block_names")),
181 _stitching_boundary_name(getParam<BoundaryName>(
"stitching_boundary_name")),
182 _external_boundary_id(isParamValid(
"external_boundary_id")
183 ? getParam<boundary_id_type>(
"external_boundary_id")
185 _external_boundary_name(getParam<BoundaryName>(
"external_boundary_name")),
186 _create_inward_interface_boundaries(getParam<bool>(
"create_inward_interface_boundaries")),
187 _create_outward_interface_boundaries(getParam<bool>(
"create_outward_interface_boundaries")),
188 _deform_non_circular_region(getParam<bool>(
"deform_non_circular_region")),
189 _use_reporting_id(isParamValid(
"id_name")),
190 _use_exclude_id(isParamValid(
"exclude_id")),
191 _use_interface_boundary_id_shift(isParamValid(
"interface_boundary_id_shift_pattern")),
192 _boundary_quad_elem_type(
194 _allow_unused_inputs(getParam<bool>(
"allow_unused_inputs")),
195 _verbose_stitching(getParam<bool>(
"verbose_stitching"))
199 declareMeshProperty<bool>(
"is_control_drum_meta",
false);
200 declareMeshProperty<std::vector<Point>>(
"control_drum_positions", std::vector<Point>());
201 declareMeshProperty<std::vector<Real>>(
"control_drum_angles", std::vector<Real>());
202 declareMeshProperty<std::vector<std::vector<Real>>>(
"control_drums_azimuthal_meta",
203 std::vector<std::vector<Real>>());
204 declareMeshProperty<std::string>(
"position_file_name", getParam<std::string>(
"position_file"));
206 declareMeshProperty<bool>(
"square_center_trimmability",
true);
207 declareMeshProperty<bool>(
"peripheral_modifier_compatible",
_pattern_boundary ==
"expanded");
209 const unsigned int n_pattern_layers =
_pattern.size();
211 if (n_pattern_layers == 1)
212 paramError(
"pattern",
"The length (layer number) of this parameter must be larger than unity.");
214 std::vector<unsigned int> pattern_max_array;
215 std::vector<unsigned int> pattern_1d;
216 std::set<unsigned int> pattern_elem_size;
217 for (
const auto & pattern_elem :
_pattern)
219 if (pattern_elem.empty())
221 "The element of the two-dimensional array parameter pattern must not be empty.");
222 pattern_elem_size.emplace(pattern_elem.size());
223 pattern_max_array.push_back(*std::max_element(pattern_elem.begin(), pattern_elem.end()));
224 pattern_1d.insert(pattern_1d.end(), pattern_elem.begin(), pattern_elem.end());
226 if (pattern_elem_size.size() > 1 || *pattern_elem_size.begin() !=
_pattern.size())
228 "The two-dimensional array parameter pattern must have a correct square shape.");
230 if (*std::max_element(pattern_max_array.begin(), pattern_max_array.end()) >=
_input_names.size())
233 "Elements of this parameter must be smaller than the length of inputs (0-indexing).");
234 if (std::set<unsigned int>(pattern_1d.begin(), pattern_1d.end()).size() <
_input_names.size() &&
237 "All the meshes provided in inputs must be used in the lattice pattern. To bypass "
238 "this requirement, set 'allow_unused_inputs = true'");
248 "This parameter and duct_block_ids must be "
249 "provided simultaneously.");
258 "This parameter and duct_block_names must be provided simultaneously.");
262 for (
unsigned int i = 1; i <
_duct_sizes.size(); i++)
264 paramError(
"duct_sizes",
"This parameter must be strictly ascending.");
267 "This parameter, if provided, must have a length equal to length of duct_sizes.");
271 "This parameter, if provided, must have a length equal to length of duct_sizes.");
274 "This parameter must be provided when pattern_boundary is expanded.");
280 "This parameter and background_block_name must not be set when the "
281 "pattern_boundary is none.");
284 "This parameter must not be provided when pattern_boundary is none.");
291 getParam<std::vector<std::vector<boundary_id_type>>>(
"interface_boundary_id_shift_pattern");
294 std::string shape_pattern =
295 "(" + std::to_string(
_pattern.size()) +
", " + std::to_string(
_pattern[0].size()) +
") ";
296 paramError(
"interface_boundary_id_shift_pattern",
297 "This parameter, if provided, should have the same two-dimensional array shape " +
300 "the 'pattern' parameter. First dimension '" +
302 "' does not match.");
304 for (
const auto i : make_range(
_pattern.size()))
307 std::string shape_pattern =
"(" + std::to_string(
_pattern.size()) +
", " +
308 std::to_string(
_pattern[0].size()) +
") ";
310 "interface_boundary_id_shift_pattern",
311 "This parameter, if provided, should have the same two-dimensional array shape " +
314 "the 'pattern' parameter. Second dimension '" +
316 "' does not match.");
320 declareMeshProperty<bool>(
"interface_boundaries",
false);
321 declareMeshProperty<std::set<boundary_id_type>>(
"interface_boundary_ids", {});
329 const auto input_assign_types = getParam<std::vector<MooseEnum>>(
"assign_type");
330 if (input_assign_types.size() != num_reporting_ids)
331 paramError(
"assign_type",
"This parameter must have a length equal to length of id_name.");
333 std::vector<std::string> manual_ids;
334 for (
const auto i : make_range(num_reporting_ids))
337 input_assign_types[i].getEnum<ReportingIDGeneratorUtils::AssignType>());
342 if (manual_ids.size() > 0 && !
isParamValid(
"id_pattern"))
343 paramError(
"id_pattern",
"required when 'manual' is defined in \"assign_type\"");
346 const auto input_id_patterns =
347 getParam<std::vector<std::vector<std::vector<dof_id_type>>>>(
"id_pattern");
348 if (input_id_patterns.size() != manual_ids.size())
350 "The number of patterns must be equal to the number of 'manual' types defined "
351 "in \"assign_type\".");
352 for (
unsigned int i = 0; i < manual_ids.size(); ++i)
361 std::vector<MeshGeneratorName> exclude_id_name =
362 getParam<std::vector<MeshGeneratorName>>(
"exclude_id");
366 for (
auto input_name : exclude_id_name)
383 std::vector<std::unique_ptr<ReplicatedMesh>> meshes(
_input_names.size());
387 meshes[i] = dynamic_pointer_cast<ReplicatedMesh>(std::move(*
_mesh_ptrs[i]));
391 if (hasMeshProperty<bool>(
"flat_side_up",
_input_names[i]))
392 if (!getMeshProperty<bool>(
"flat_side_up",
_input_names[i]))
396 "' does not have a flat side facing up, which is not supported.");
399 std::vector<Real> pitch_array;
400 std::vector<unsigned int> num_sectors_per_side_array;
401 std::vector<unsigned int> num_sectors_per_side_array_tmp;
402 std::vector<std::vector<Real>> control_drum_azimuthal_array;
403 std::vector<unsigned int> background_intervals_array;
404 std::vector<dof_id_type> node_id_background_array;
405 std::vector<Real> max_radius_array;
406 std::vector<bool> is_control_drum_array;
407 Real max_radius_global(0.0);
408 std::vector<Real> pattern_pitch_array;
416 if (!hasMeshProperty<Real>(
"pattern_pitch_meta",
_input_names[i]))
418 "In PatternedCartesianMeshGenerator ",
420 ": the unit square input mesh does not contain appropriate meta data "
421 "required for generating a core mesh. Involved input mesh: ",
423 "; metadata issue: 'pattern_pitch_meta' is missing. Note that "
424 "'generate_core_metadata' is set to true, which"
425 "means that the mesh generator is producing a core mesh by stitching the input "
426 "assembly meshes together. Therefore,"
427 "the input meshes must contain the metadata of assembly meshes, which can "
428 "usually be either automatically assigned "
429 "by using another PatternedCartesianMeshGenerator with 'generate_core_metadata' set as "
430 "false or manually assigned by AddMetaDataGenerator.");
431 pattern_pitch_array.push_back(getMeshProperty<Real>(
"pattern_pitch_meta",
_input_names[i]));
433 if (pattern_pitch_array.back() == 0.0)
435 "In PatternedCartesianMeshGenerator ",
437 ": the unit square input mesh does not contain appropriate meta data "
438 "required for generating a core mesh. Involved input mesh: ",
440 "; metadata issue: 'pattern_pitch_meta' is zero. Note that "
441 "'generate_core_metadata' is set to true, which"
442 "means that the mesh generator is producing a core mesh by stitching the input "
443 "assembly meshes together. Therefore,"
444 "the input meshes must contain the metadata of assembly meshes, which can "
445 "usually be either automatically assigned "
446 "by using another PatternedCartesianMeshGenerator with 'generate_core_metadata' set as "
447 "false or manually assigned by AddMetaDataGenerator.");
448 is_control_drum_array.push_back(
449 getMeshProperty<bool>(
"is_control_drum_meta",
_input_names[i]));
450 control_drum_azimuthal_array.push_back(
451 getMeshProperty<bool>(
"is_control_drum_meta",
_input_names[i])
453 : std::vector<Real>());
455 if (!MooseUtils::absoluteFuzzyEqual(
456 *std::max_element(pattern_pitch_array.begin(), pattern_pitch_array.end()),
457 *std::min_element(pattern_pitch_array.begin(), pattern_pitch_array.end())))
459 "In PatternedCartesianMeshGenerator ",
461 ": pattern_pitch metadata values of all input mesh generators must be identical when "
462 "pattern_boundary is 'none' and generate_core_metadata is true. Please check the "
463 "parameters of the mesh generators that produce the input meshes. "
464 "Note that some of these mesh generator, such as "
465 "CartesianConcentricCircleAdaptiveBoundaryMeshGenerator and FlexiblePatternGenerator,"
466 "may have different definitions of square size in their input parameters. Please refer "
467 "to the documentation of these mesh generators.",
483 if (!hasMeshProperty<Real>(
"pitch_meta",
_input_names[i]))
484 mooseError(
"In PatternedCartesianMeshGenerator ",
486 ": the unit square input mesh does not contain appropriate meta data "
487 "required for generating an assembly. Involved input mesh: ",
489 "; metadata issue: 'pitch_meta' is missing");
490 pitch_array.push_back(getMeshProperty<Real>(
"pitch_meta",
_input_names[i]));
492 num_sectors_per_side_array_tmp =
493 getMeshProperty<std::vector<unsigned int>>(
"num_sectors_per_side_meta",
_input_names[i]);
494 if (*std::max_element(num_sectors_per_side_array_tmp.begin(),
495 num_sectors_per_side_array_tmp.end()) !=
496 *std::min_element(num_sectors_per_side_array_tmp.begin(),
497 num_sectors_per_side_array_tmp.end()))
498 mooseError(
"In PatternedCartesianMeshGenerator ",
500 ": num_sectors_per_side metadata values of all four sides of each input mesh "
501 "generator must be identical.");
502 num_sectors_per_side_array.push_back(*num_sectors_per_side_array_tmp.begin());
503 background_intervals_array.push_back(
504 getMeshProperty<unsigned int>(
"background_intervals_meta",
_input_names[i]));
505 node_id_background_array.push_back(
506 getMeshProperty<dof_id_type>(
"node_id_background_meta",
_input_names[i]));
507 max_radius_array.push_back(getMeshProperty<Real>(
"max_radius_meta",
_input_names[i]));
509 max_radius_global = *max_element(max_radius_array.begin(), max_radius_array.end());
510 if (!MooseUtils::absoluteFuzzyEqual(*std::max_element(pitch_array.begin(), pitch_array.end()),
511 *std::min_element(pitch_array.begin(), pitch_array.end())))
512 mooseError(
"In PatternedCartesianMeshGenerator ",
514 ": pitch metadata values of all input mesh generators must be identical. Please "
515 "check the parameters of the mesh generators that produce the input meshes.",
518 if (*std::max_element(num_sectors_per_side_array.begin(), num_sectors_per_side_array.end()) !=
519 *std::min_element(num_sectors_per_side_array.begin(), num_sectors_per_side_array.end()))
521 "In PatternedCartesianMeshGenerator ",
523 ": num_sectors_per_side metadata values of all input mesh generators must be identical.");
529 std::vector<Real> extra_dist;
530 Real extra_dist_shift(0.0);
534 const Real extra_dist_tol =
_pattern_boundary ==
"expanded" ? pitch_array.front() / 10.0 : 0.0;
535 const Real extra_dist_shift_0 =
_pattern_boundary ==
"expanded" ? pitch_array.front() / 5.0 : 0.0;
536 std::vector<unsigned int> peripheral_duct_intervals;
541 for (
unsigned int i = 0; i <
_duct_sizes.size(); i++)
546 extra_dist.push_back(0.5 * (
_duct_sizes[i] * 2.0 - pitch_array.front() *
_pattern.size()));
551 "The duct sizes should not exceed the size of the square boundary.");
564 if (extra_dist.front() <= extra_dist_tol)
566 extra_dist_shift = extra_dist_shift_0 - extra_dist.front();
567 for (Real &
d : extra_dist)
568 d += extra_dist_shift;
572 : (pitch_array.front() / 2.0);
573 y_max_0 = pitch_array.front() / 2.0 + extra_dist.front();
574 y_max_n = y_max_0 - extra_dist_shift;
575 if (y_max_n <= y_min)
576 mooseError(
"In PatternedCartesianMeshGenerator ",
578 ": the assembly is cut off so much that the internal structure that should not "
579 "be altered is compromised.");
587 std::vector<std::set<boundary_id_type>> input_interface_boundary_ids;
588 input_interface_boundary_ids.resize(
_input_names.size());
593 if (!hasMeshProperty<bool>(
"interface_boundaries",
_input_names[i]))
594 mooseError(
"Metadata 'interface_boundaries' could not be found on the input mesh: ",
596 if (!getMeshProperty<bool>(
"interface_boundaries",
_input_names[i]))
597 mooseError(
"Interface boundary ids were not constructed in the input mesh",
600 mooseError(
"Metadata 'interface_boundary_ids' could not be found on the input mesh: ",
606 input_interface_boundary_ids[i] =
610 ? pitch_array.front()
612 std::vector<Real> control_drum_positions_x;
613 std::vector<Real> control_drum_positions_y;
614 std::vector<std::vector<Real>> control_drum_azimuthals;
616 std::unique_ptr<ReplicatedMesh> out_mesh;
618 for (
unsigned i = 0; i <
_pattern.size(); i++)
620 const Real deltax = 0.0;
621 Real deltay = -(Real)(i)*input_pitch;
623 for (
unsigned int j = 0; j <
_pattern[i].size(); j++)
625 const auto pattern =
_pattern[i][j];
626 ReplicatedMesh & pattern_mesh = *meshes[pattern];
634 control_drum_positions_x.push_back(deltax + j * input_pitch);
635 control_drum_positions_y.push_back(deltay);
636 control_drum_azimuthals.push_back(control_drum_azimuthal_array[pattern]);
639 if (j == 0 && i == 0)
641 out_mesh = dynamic_pointer_cast<ReplicatedMesh>(pattern_mesh.clone());
643 out_mesh->add_elem_integer(
646 is_control_drum_array[pattern] ? control_drum_azimuthals.size() : 0);
651 input_interface_boundary_ids[pattern]);
658 Real rotation_angle = std::numeric_limits<Real>::max();
659 Real orientation = std::numeric_limits<Real>::max();
660 unsigned int mesh_type = std::numeric_limits<unsigned int>::max();
661 bool on_periphery =
true;
663 if (j == 0 && i == 0)
665 rotation_angle = 90.;
669 else if (j == 0 && i ==
_pattern.size() - 1)
671 rotation_angle = 180.;
675 else if (j ==
_pattern[i].size() - 1 && i == 0)
683 rotation_angle = -90.;
695 rotation_angle = 180.;
701 rotation_angle = 90.;
705 else if (j ==
_pattern[i].size() - 1)
707 rotation_angle = -90.;
712 on_periphery =
false;
716 auto tmp_peripheral_mesh = dynamic_pointer_cast<ReplicatedMesh>(pattern_mesh.clone());
721 num_sectors_per_side_array,
722 peripheral_duct_intervals,
726 if (extra_dist_shift != 0)
728 *tmp_peripheral_mesh, orientation, y_max_0, y_max_n, y_min, mesh_type, 90.0);
734 input_interface_boundary_ids[pattern]);
736 if (i == 0 && j == 0)
737 out_mesh = std::move(tmp_peripheral_mesh);
742 const auto & increment_subdomain_map = tmp_peripheral_mesh->get_subdomain_name_map();
743 out_mesh->set_subdomain_name_map().insert(increment_subdomain_map.begin(),
744 increment_subdomain_map.end());
746 const auto stitching_boundary_id_base =
748 const auto stitching_boundary_id_periph =
751 MeshTools::Modification::translate(
752 *tmp_peripheral_mesh, deltax + j * input_pitch, deltay, 0);
753 out_mesh->stitch_meshes(*tmp_peripheral_mesh,
754 stitching_boundary_id_base,
755 stitching_boundary_id_periph,
766 pattern_mesh.add_elem_integer(
769 is_control_drum_array[pattern] ? control_drum_azimuthals.size() : 0);
772 MeshTools::Modification::translate(pattern_mesh, deltax + j * input_pitch, deltay, 0);
775 auto & main_subdomain_map = out_mesh->set_subdomain_name_map();
778 const auto & increment_subdomain_map = pattern_mesh.get_subdomain_name_map();
779 main_subdomain_map.insert(increment_subdomain_map.begin(), increment_subdomain_map.end());
781 std::set<SubdomainName> main_subdomain_map_name_list;
782 for (
auto const & id_name_pair : main_subdomain_map)
783 main_subdomain_map_name_list.emplace(id_name_pair.second);
784 if (main_subdomain_map.size() != main_subdomain_map_name_list.size())
785 paramError(
"inputs",
"The input meshes contain subdomain name maps with conflicts.");
790 input_interface_boundary_ids[pattern]);
792 const auto stitching_boundary_id_1 =
794 const auto stitching_boundary_id_2 =
796 out_mesh->stitch_meshes(pattern_mesh,
797 stitching_boundary_id_1,
798 stitching_boundary_id_2,
805 MeshTools::Modification::translate(pattern_mesh, -(deltax + j * input_pitch), -deltay, 0);
810 input_interface_boundary_ids[pattern],
816 auto side_list = out_mesh->get_boundary_info().build_side_list();
817 const auto stitching_boundary_id =
819 for (
auto & sl : side_list)
822 if (std::get<2>(sl) == stitching_boundary_id)
823 if (out_mesh->elem_ptr(std::get<0>(sl))->neighbor_ptr(std::get<1>(sl)) !=
nullptr)
824 out_mesh->get_boundary_info().remove_side(
825 out_mesh->elem_ptr(std::get<0>(sl)), std::get<1>(sl), std::get<2>(sl));
828 out_mesh->get_boundary_info().clear_boundary_node_ids();
830 out_mesh->get_boundary_info().build_node_list_from_side_list();
831 const auto node_list = out_mesh->get_boundary_info().build_node_list();
833 std::vector<Real> bd_x_list;
834 std::vector<Real> bd_y_list;
835 std::vector<std::pair<Real, dof_id_type>> node_azi_list;
837 const Real origin_x = origin_pt(0);
838 const Real origin_y = origin_pt(1);
840 MeshTools::Modification::translate(*out_mesh, -origin_x, -origin_y, 0);
844 MeshTools::Modification::rotate(*out_mesh, -45.0, 0.0, 0.0);
845 const Real azi_tol = 1E-8;
846 for (
unsigned int i = 0; i < node_list.size(); ++i)
848 if (std::get<1>(node_list[i]) == stitching_boundary_id)
850 node_azi_list.push_back(
851 std::make_pair(atan2(out_mesh->node_ref(std::get<0>(node_list[i]))(1),
852 out_mesh->node_ref(std::get<0>(node_list[i]))(0)) *
854 std::get<0>(node_list[i])));
856 if (node_azi_list.back().first + 180.0 <= azi_tol)
857 node_azi_list.back().first = 180;
860 std::sort(node_azi_list.begin(), node_azi_list.end());
861 const unsigned int side_intervals = node_azi_list.size() /
SQUARE_NUM_SIDES;
864 for (
unsigned int j = 1; j <= side_intervals; j++)
866 Real azi_corr_tmp = atan2((Real)j * 2.0 / (Real)side_intervals - 1.0, 1.0);
868 Real y_tmp = x_tmp * std::tan(azi_corr_tmp);
870 Point p_tmp = Point(x_tmp, y_tmp, 0.0);
871 out_mesh->add_point(p_tmp, node_azi_list[i * side_intervals + j - 1].second);
881 MeshTools::Modification::rotate(*out_mesh, 45.0, 0.0, 0.0);
884 MeshTools::Modification::rotate(*out_mesh,
_rotate_angle, 0.0, 0.0);
890 const Real azi_tol = 1E-8;
891 std::vector<std::tuple<Real, Point, std::vector<Real>, dof_id_type>> control_drum_tmp;
892 std::vector<dof_id_type> control_drum_id_sorted;
893 for (
unsigned int i = 0; i < control_drum_positions_x.size(); ++i)
895 control_drum_positions_x[i] -= origin_x;
896 control_drum_positions_y[i] -= origin_y;
898 Real cd_angle = atan2(control_drum_positions_y[i], control_drum_positions_x[i]);
900 for (
unsigned int j = 0; j < control_drum_azimuthals[i].size(); j++)
903 control_drum_azimuthals[i][j] =
904 atan2(std::sin(control_drum_azimuthals[i][j] / 180.0 * M_PI),
905 std::cos(control_drum_azimuthals[i][j] / 180.0 * M_PI)) /
908 std::sort(control_drum_azimuthals[i].begin(), control_drum_azimuthals[i].end());
910 if (std::abs(cd_angle) < azi_tol)
912 else if (cd_angle < 0.0)
913 cd_angle += 2 * M_PI;
914 control_drum_tmp.push_back(
915 std::make_tuple(cd_angle,
916 Point(control_drum_positions_x[i], control_drum_positions_y[i], 0.0),
917 control_drum_azimuthals[i],
920 std::sort(control_drum_tmp.begin(), control_drum_tmp.end());
921 std::vector<Point> control_drum_positions;
922 std::vector<Real> control_drum_angles;
923 std::vector<std::vector<Real>> control_drums_azimuthal_meta;
924 for (
unsigned int i = 0; i < control_drum_tmp.size(); ++i)
926 control_drum_positions.push_back(std::get<1>(control_drum_tmp[i]));
927 control_drum_angles.push_back(std::get<0>(control_drum_tmp[i]));
928 control_drums_azimuthal_meta.push_back(std::get<2>(control_drum_tmp[i]));
929 control_drum_id_sorted.push_back(std::get<3>(control_drum_tmp[i]));
933 setMeshProperty(
"control_drums_azimuthal_meta", control_drums_azimuthal_meta);
937 unsigned int drum_integer_index = out_mesh->get_elem_integer_index(
"control_drum_id");
938 for (
const auto & elem : out_mesh->element_ptr_range())
940 dof_id_type unsorted_control_drum_id = elem->get_extra_integer(drum_integer_index);
941 if (unsorted_control_drum_id != 0)
943 auto sorted_iter = std::find(control_drum_id_sorted.begin(),
944 control_drum_id_sorted.end(),
945 unsorted_control_drum_id);
946 elem->set_extra_integer(drum_integer_index,
947 std::distance(control_drum_id_sorted.begin(), sorted_iter) + 1);
954 std::string position_file_name = getMeshProperty<std::string>(
"position_file_name",
name());
955 std::ofstream pos_file(position_file_name);
956 for (
unsigned int i = 0; i < control_drum_positions.size(); ++i)
957 pos_file << control_drum_positions[i](0) <<
" " << control_drum_positions[i](1) <<
" 0.0\n";
969 for (
const auto & elem : out_mesh->active_element_ptr_range())
972 if (elem->subdomain_id() == i)
991 : (boundary_id_type)stitching_boundary_id) =
995 : (boundary_id_type)stitching_boundary_id) =
1000 auto & new_sideset_map = out_mesh->get_boundary_info().set_sideset_name_map();
1001 auto & new_nodeset_map = out_mesh->get_boundary_info().set_nodeset_name_map();
1002 for (
unsigned int i = 0; i < meshes.size(); i++)
1004 const auto input_sideset_map = meshes[i]->get_boundary_info().get_sideset_name_map();
1005 new_sideset_map.insert(input_sideset_map.begin(), input_sideset_map.end());
1006 const auto input_nodeset_map = meshes[i]->get_boundary_info().get_nodeset_name_map();
1007 new_nodeset_map.insert(input_nodeset_map.begin(), input_nodeset_map.end());
1011 const std::set<boundary_id_type> boundary_ids = out_mesh->get_boundary_info().get_boundary_ids();
1016 input_interface_boundary_ids,
1020 if (interface_boundary_ids.size() > 0)
1026 out_mesh->unset_is_prepared();
1027 auto mesh = dynamic_pointer_cast<MeshBase>(out_mesh);