13 #include "libmesh/unstructured_mesh.h" 22 MooseEnum algorithm(
"BINARY EXHAUSTIVE",
"BINARY");
24 params.
addRequiredParam<MeshGeneratorName>(
"input",
"The mesh we want to modify");
26 "clear_stitched_boundary_ids",
true,
"Whether or not to clear the stitched boundary IDs");
30 "Control the use of binary search for the nodes of the stitched surfaces.");
32 "stitch_boundaries_pair",
"Pair of boundaries to be stitched together.");
40 _input(getMesh(
"input")),
41 _clear_stitched_boundary_ids(getParam<bool>(
"clear_stitched_boundary_ids")),
47 std::unique_ptr<MeshBase>
50 std::unique_ptr<UnstructuredMesh>
mesh =
53 const bool use_binary_search = (
_algorithm ==
"BINARY");
56 mesh->get_boundary_info().build_node_list_from_side_list();
65 mesh->set_isnt_prepared();
Allows a pair of boundaries to be "stitched" together.
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
const bool & _clear_stitched_boundary_ids
Whether or not to clear (remove) the stitched boundary IDs.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
std::vector< boundary_id_type > _stitch_boundaries_pair
Pair of stitch boundaries.
static InputParameters validParams()
StitchBoundaryMeshGenerator(const InputParameters ¶meters)
std::unique_ptr< MeshBase > & _input
the input mesh
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
registerMooseObject("MooseApp", StitchBoundaryMeshGenerator)
MooseEnum _algorithm
Type of algorithm used to find matching nodes (binary or exhaustive)
MeshGenerators are objects that can modify or add to an existing mesh.