13 #include "libmesh/mesh_base.h" 14 #include "libmesh/elem.h" 23 "Divide the mesh by increasing extra element IDs. The division will be contiguously " 24 "numbered even if the extra element ids are not");
26 "The name of the extra element ID in the mesh");
31 :
MeshDivision(parameters), _extra_id_name(getParam<ExtraElementIDName>(
"extra_id_name"))
34 paramError(
"extra_id_name",
"The source element ID does not exist on the input mesh");
45 std::set<libMesh::dof_id_type> extra_ids;
46 for (
const auto & elem :
_mesh.
getMesh().active_local_element_ptr_range())
47 extra_ids.insert(elem->get_extra_integer(
_extra_id));
52 for (
const auto extra_id : extra_ids)
67 std::set<const Elem *> candidates;
68 (*pl)(pt, candidates);
72 const Elem * elem =
nullptr;
74 for (
const auto elem_ptr : candidates)
75 if (elem_ptr->get_extra_integer(
_extra_id) < min_extra_id)
78 min_extra_id = elem_ptr->get_extra_integer(
_extra_id);
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 ...
const Parallel::Communicator & comm() const
Base class for MeshDivision objects.
const MooseMesh & _mesh
Mesh that is being divided.
auto max(const L &left, const R &right)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
bool _mesh_fully_indexed
Whether the mesh is fully covered / indexed, all elements and points have a valid index...
void setNumDivisions(const unsigned int ndivs)
Set the number of divisions.
static InputParameters validParams()
Class constructor.
void set_union(T &data, const unsigned int root_id) const