13#include "libmesh/unstructured_mesh.h"
21 params.
addRequiredParam<MeshGeneratorName>(
"input",
"The mesh we want to modify");
23 "stitch_boundaries_pair",
24 "Pair of boundaries to be stitched together.");
34 paramError(
"stitch_boundaries_pair",
"Can only stitch two boundaries together.");
37std::unique_ptr<MeshBase>
40 std::unique_ptr<UnstructuredMesh>
mesh =
41 dynamic_pointer_cast<UnstructuredMesh>(std::move(
_input));
43 const bool use_binary_search = (
_algorithm ==
"BINARY");
46 mesh->get_boundary_info().build_node_list_from_side_list();
53 mesh->stitch_surfaces(first_bid,
57 getParam<bool>(
"verbose_stitching"),
59 getParam<Real>(
"stitching_hmin_tolerance_factor"));
61 mesh->unset_is_prepared();
62 return dynamic_pointer_cast<MeshBase>(
mesh);
registerMooseObject("MooseApp", StitchBoundaryMeshGenerator)
const std::string & name() const
Get the name of the class.
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 ...
Allows a pair of boundaries to be "stitched" together.
static InputParameters validParams()
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
StitchBoundaryMeshGenerator(const InputParameters ¶meters)
std::unique_ptr< MeshBase > & _input
the input mesh
A base class for mesh generators that stitch boundaries together.
static InputParameters validParams()
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.
const bool _clear_stitched_boundary_ids
Whether or not to clear (remove) the stitched boundary IDs.
const std::vector< std::vector< std::string > > _stitch_boundaries_pairs
A transformed version of _stitch_boundaries into a more logical "pairwise" structure.
const MooseEnum _algorithm
Type of algorithm used to find matching nodes (binary or exhaustive)