15 #include "libmesh/unstructured_mesh.h" 22 MooseEnum algorithm(
"BINARY EXHAUSTIVE",
"BINARY");
25 "stitching_hmin_tolerance_factor",
27 "Factor multiplied by the elements hmin to form a tolerance to use when stitching nodes");
29 "clear_stitched_boundary_ids",
true,
"Whether or not to clear the stitched boundary IDs");
31 "stitch_boundaries_pairs",
32 "Pairs of boundaries to be stitched together between the 1st mesh in inputs and each " 37 "Control the use of binary search for the nodes of the stitched surfaces.");
39 "verbose_stitching",
false,
"Whether mesh stitching should have verbose output.");
46 _clear_stitched_boundary_ids(getParam<bool>(
"clear_stitched_boundary_ids")),
47 _stitch_boundaries_pairs(
48 getParam<
std::vector<
std::vector<
std::string>>>(
"stitch_boundaries_pairs")),
55 const std::string & input_mg_name,
56 const BoundaryName & bname)
const 61 bid = MooseUtils::convert<boundary_id_type>(bname,
true);
65 bid =
mesh.get_boundary_info().get_id_by_name(bname);
67 if (bid == BoundaryInfo::invalid_id)
75 const std::string & input_mg_name,
76 const BoundaryName & bname)
const 78 std::stringstream error;
80 error <<
"Boundary " << bname <<
" doesn't exist on mesh '" << input_mg_name <<
"'\n";
81 error <<
"Boundary (sideset) names that do exist: \n";
82 error <<
" ID : Name\n";
84 auto & sideset_id_name_map =
mesh.get_boundary_info().get_sideset_name_map();
86 for (
auto & ss_name_map_pair : sideset_id_name_map)
87 error <<
" " << ss_name_map_pair.first <<
" : " << ss_name_map_pair.second <<
"\n";
89 error <<
"\nBoundary (nodeset) names that do exist: \n";
90 error <<
" ID : Name\n";
92 auto & nodeset_id_name_map =
mesh.get_boundary_info().get_nodeset_name_map();
94 for (
auto & ns_name_map_pair : nodeset_id_name_map)
95 error <<
" " << ns_name_map_pair.first <<
" : " << ns_name_map_pair.second <<
"\n";
97 paramError(
"stitch_boundaries_pairs", error.str());
boundary_id_type getBoundaryIdToStitch(const MeshBase &mesh, const std::string &input_mg_name, const BoundaryName &bname) const
Get the boundary id from the name of a boundary to stitch.
void errorMissingBoundary(const MeshBase &mesh, const std::string &input_mg_name, const BoundaryName &bname) const
Returns an error if the boundary to be stitched does not exist.
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
StitchMeshGeneratorBase(const InputParameters ¶meters)
MeshGenerators are objects that can modify or add to an existing mesh.