25 #include "libmesh/libmesh_config.h" 28 #ifdef LIBMESH_ENABLE_AMR 30 #include "libmesh/boundary_info.h" 31 #include "libmesh/error_vector.h" 32 #include "libmesh/libmesh_logging.h" 33 #include "libmesh/mesh_base.h" 34 #include "libmesh/mesh_communication.h" 35 #include "libmesh/mesh_refinement.h" 36 #include "libmesh/parallel.h" 37 #include "libmesh/parallel_ghost_sync.h" 38 #include "libmesh/partitioner.h" 39 #include "libmesh/remote_elem.h" 40 #include "libmesh/sync_refinement_flags.h" 41 #include "libmesh/int_range.h" 45 #include "libmesh/mesh_tools.h" 48 #ifdef LIBMESH_ENABLE_PERIODIC 49 #include "libmesh/periodic_boundaries.h" 97 _use_member_parameters(false),
98 _coarsen_by_parents(false),
99 _refine_fraction(0.3),
100 _coarsen_fraction(0.0),
102 _coarsen_threshold(10),
104 _absolute_global_tolerance(0.0),
105 _face_level_mismatch_limit(1),
106 _edge_level_mismatch_limit(0),
107 _node_level_mismatch_limit(0),
108 _overrefined_boundary_limit(0),
109 _underrefined_boundary_limit(0),
110 _allow_unrefined_patches(false),
111 _enforce_mismatch_limit_prior_to_refinement(false)
112 #ifdef LIBMESH_ENABLE_PERIODIC
113 , _periodic_boundaries(nullptr)
120 #ifdef LIBMESH_ENABLE_PERIODIC 145 LOG_SCOPE(
"add_node()",
"MeshRefinement");
152 const std::vector<std::pair<dof_id_type, dof_id_type>>
184 libmesh_assert_not_equal_to (em_val, 1);
222 Real & parent_error_min,
223 Real & parent_error_max)
226 parallel_object_only();
230 for (
const auto & val : error_per_cell)
232 libmesh_assert_greater_equal (val, 0);
241 std::vector<ErrorVectorReal> & epc = error_per_parent;
243 #endif // #ifdef DEBUG 246 error_per_parent.clear();
247 error_per_parent.resize(error_per_cell.size(), 0.0);
251 for (
auto & elem :
_mesh.active_local_element_ptr_range())
256 error_per_parent[elem->id()] = -1.0;
261 parent = parent->
parent();
265 libmesh_assert_less (parentid, error_per_parent.size());
266 error_per_parent[parentid] = -1.0;
274 std::vector<ErrorVectorReal> & epp = error_per_parent;
286 for (
auto & elem :
_mesh.active_local_element_ptr_range())
294 libmesh_assert_less (parentid, error_per_parent.size());
299 if (error_per_parent[parentid] != -1.0)
300 error_per_parent[parentid] += (error_per_cell[elem->id()] *
301 error_per_cell[elem->id()]);
306 this->
comm().
sum(
static_cast<std::vector<ErrorVectorReal> &
>(error_per_parent));
309 parent_error_min = std::numeric_limits<double>::max();
310 parent_error_max = 0.;
319 if (error_per_parent[i] < 0.)
321 error_per_parent[i] = -1.;
328 if (error_per_cell[i])
330 error_per_parent[i] = error_per_cell[i];
335 error_per_parent[i] = std::sqrt(error_per_parent[i]);
337 parent_error_min = std::min (parent_error_min,
338 error_per_parent[i]);
339 parent_error_max = std::max (parent_error_max,
340 error_per_parent[i]);
356 parallel_object_only();
361 std::unique_ptr<PointLocatorBase> point_locator;
363 #ifdef LIBMESH_ENABLE_PERIODIC 364 bool has_periodic_boundaries =
368 if (has_periodic_boundaries)
372 bool failure =
false;
375 Elem * failed_elem =
nullptr;
376 Elem * failed_neighbor =
nullptr;
379 for (
auto & elem :
_mesh.active_local_element_ptr_range())
380 for (
auto n : elem->side_index_range())
385 if (!neighbor || !neighbor->
active() ||
389 if ((neighbor->
level() + 1 < elem->level()) ||
390 (neighbor->
p_level() + 1 < elem->p_level()) ||
391 (neighbor->
p_level() > elem->p_level() + 1))
396 failed_neighbor = neighbor;
410 if (libmesh_assert_pass)
412 libMesh::out <<
"MeshRefinement Level one failure, element: " 415 libMesh::out <<
"MeshRefinement Level one failure, neighbor: " 431 parallel_object_only();
433 bool found_flag =
false;
436 Elem * failed_elem =
nullptr;
440 for (
auto & elem :
_mesh.active_local_element_ptr_range())
459 if (libmesh_assert_pass)
462 "MeshRefinement test_unflagged failure, element: " <<
463 *failed_elem << std::endl;
479 parallel_object_only();
488 bool elements_flagged =
false;
490 for (
auto & elem :
_mesh.element_ptr_range())
497 if ( !elem->active())
504 else if (!elements_flagged)
507 elements_flagged =
true;
511 elem->p_refinement_flag();
513 elements_flagged =
true;
523 if (!elements_flagged)
539 const bool coarsening_changed_mesh =
562 const bool refining_changed_mesh =
567 if (coarsening_changed_mesh || refining_changed_mesh)
611 parallel_object_only();
619 for (
auto & elem :
_mesh.element_ptr_range())
647 if (!flags_were_consistent)
648 libmesh_warning(
"Warning: Refinement flags were not consistent between processors! " 649 "Correcting and continuing.\n");
655 const bool mesh_changed =
685 parallel_object_only();
692 for (
auto & elem :
_mesh.element_ptr_range())
720 if (!flags_were_consistent)
721 libmesh_warning(
"Warning: Refinement flags were not consistent between processors! " 722 "Correcting and continuing.\n");
729 const bool mesh_changed =
752 parallel_object_only();
754 LOG_SCOPE (
"make_flags_parallel_consistent()",
"MeshRefinement");
759 (this->
comm(),
_mesh.elements_begin(),
_mesh.elements_end(), hsync);
764 (this->
comm(),
_mesh.elements_begin(),
_mesh.elements_end(), psync);
769 psync.parallel_consistent;
770 this->
comm().
min(parallel_consistent);
772 return parallel_consistent;
780 parallel_object_only();
785 std::unique_ptr<PointLocatorBase> point_locator;
787 #ifdef LIBMESH_ENABLE_PERIODIC 788 bool has_periodic_boundaries =
792 if (has_periodic_boundaries)
796 LOG_SCOPE (
"make_coarsening_compatible()",
"MeshRefinement");
800 bool level_one_satisfied =
true;
805 bool compatible_with_refinement =
true;
809 unsigned int max_level = 0;
810 unsigned int max_p_level = 0;
816 for (
auto & elem :
_mesh.active_element_ptr_range())
818 max_level = std::max(max_level, elem->level());
820 std::max(max_p_level,
821 static_cast<unsigned int>(elem->p_level()));
823 if ((elem->level() == 0) &&
827 if ((elem->p_level() == 0) &&
838 if (max_level == 0 && max_p_level == 0)
841 this->
comm().
min(compatible_with_refinement);
843 return compatible_with_refinement;
857 level_one_satisfied =
true;
861 level_one_satisfied =
true;
863 for (
auto & elem :
_mesh.active_element_ptr_range())
865 bool my_flag_changed =
false;
870 const unsigned int my_level = elem->level();
872 for (
auto n : elem->side_index_range())
874 const Elem * neighbor =
877 if (neighbor !=
nullptr &&
882 if ((neighbor->
level() == my_level) &&
887 my_flag_changed =
true;
897 my_flag_changed =
true;
906 const unsigned int my_p_level = elem->p_level();
908 for (
auto n : elem->side_index_range())
910 const Elem * neighbor =
913 if (neighbor !=
nullptr &&
918 if ((neighbor->
p_level() > my_p_level &&
920 || (neighbor->
p_level() == my_p_level &&
924 my_flag_changed =
true;
941 if ((subneighbor.p_level() > my_p_level &&
943 || (subneighbor.p_level() == my_p_level &&
947 my_flag_changed =
true;
960 level_one_satisfied =
false;
968 for (
auto n : elem->side_index_range())
979 compatible_with_refinement =
false;
990 compatible_with_refinement =
false;
996 while (!level_one_satisfied);
1007 for (
int level = max_level; level >= 0; level--)
1008 for (
auto & elem :
as_range(
_mesh.level_elements_begin(level),
_mesh.level_elements_end(level)))
1009 if (elem->ancestor())
1013 bool is_a_candidate =
true;
1014 bool found_remote_child =
false;
1016 for (
auto & child : elem->child_ref_range())
1019 found_remote_child =
true;
1022 is_a_candidate =
false;
1025 if (!is_a_candidate && !found_remote_child)
1029 for (
auto & child : elem->child_ref_range())
1035 level_one_satisfied =
false;
1061 std::vector<std::vector<dof_id_type>>
1062 uncoarsenable_parents(n_proc);
1064 for (
auto & elem :
as_range(
_mesh.ancestor_elements_begin(),
_mesh.ancestor_elements_end()))
1068 bool all_children_flagged_for_coarsening =
true;
1070 for (
auto & child : elem->child_ref_range())
1075 all_children_flagged_for_coarsening =
false;
1076 if (!distributed_mesh)
1078 if (child.processor_id() != elem->processor_id())
1080 uncoarsenable_parents[elem->processor_id()].push_back(elem->id());
1086 if (all_children_flagged_for_coarsening)
1094 if (distributed_mesh)
1097 parallel_object_only();
1101 std::vector<Parallel::Request> uncoarsenable_push_requests(n_proc-1);
1105 if (p == my_proc_id)
1109 uncoarsenable_push_requests[p - (p > my_proc_id)];
1112 (p, uncoarsenable_parents[p],
request, uncoarsenable_tag);
1117 std::vector<dof_id_type> my_uncoarsenable_parents;
1119 (Parallel::any_source, my_uncoarsenable_parents,
1122 for (
const auto &
id : my_uncoarsenable_parents)
1131 Parallel::wait(uncoarsenable_push_requests);
1136 (this->
comm(),
_mesh.not_local_elements_begin(),
1137 _mesh.not_local_elements_end(),
1145 this->
comm().
min(compatible_with_refinement);
1147 return compatible_with_refinement;
1160 parallel_object_only();
1165 std::unique_ptr<PointLocatorBase> point_locator;
1167 #ifdef LIBMESH_ENABLE_PERIODIC 1168 bool has_periodic_boundaries =
1172 if (has_periodic_boundaries)
1176 LOG_SCOPE (
"make_refinement_compatible()",
"MeshRefinement");
1180 bool compatible_with_coarsening =
true;
1188 bool level_one_satisfied =
true;
1192 level_one_satisfied =
true;
1194 for (
auto & elem :
_mesh.active_element_ptr_range())
1196 const unsigned short n_sides = elem->n_sides();
1201 const unsigned int my_level = elem->level();
1203 for (
unsigned short side = 0; side != n_sides;
1209 if (neighbor !=
nullptr &&
1217 if (neighbor->
level() == my_level)
1224 compatible_with_coarsening =
false;
1225 level_one_satisfied =
false;
1236 else if ((neighbor->
level()+1) == my_level)
1243 compatible_with_coarsening =
false;
1244 level_one_satisfied =
false;
1252 libmesh_error_msg(
"ERROR: Neighbor level must be equal or 1 higher than mine.");
1260 const unsigned int my_p_level = elem->p_level();
1262 for (
unsigned int side=0; side != n_sides; side++)
1267 if (neighbor !=
nullptr &&
1272 if (neighbor->
p_level() < my_p_level &&
1276 level_one_satisfied =
false;
1277 compatible_with_coarsening =
false;
1279 if (neighbor->
p_level() == my_p_level &&
1283 level_one_satisfied =
false;
1284 compatible_with_coarsening =
false;
1294 if (subneighbor.p_level() < my_p_level &&
1299 libmesh_assert_greater (subneighbor.p_level() + 2u,
1302 level_one_satisfied =
false;
1303 compatible_with_coarsening =
false;
1305 if (subneighbor.p_level() == my_p_level &&
1309 level_one_satisfied =
false;
1310 compatible_with_coarsening =
false;
1320 while (!level_one_satisfied);
1325 this->
comm().
min(compatible_with_coarsening);
1327 return compatible_with_coarsening;
1336 parallel_object_only();
1338 LOG_SCOPE (
"_coarsen_elements()",
"MeshRefinement");
1341 bool mesh_changed =
false;
1342 bool mesh_p_changed =
false;
1356 for (
auto & elem :
_mesh.element_ptr_range())
1359 mesh_changed =
true;
1364 this->
comm().
max(mesh_changed);
1370 for (
auto & elem :
_mesh.element_ptr_range())
1382 libmesh_assert_not_equal_to (elem->level(), 0);
1386 elem->nullify_neighbors();
1413 mesh_changed =
true;
1417 if (elem->p_level() > 0)
1420 elem->set_p_level(elem->p_level() - 1);
1421 mesh_p_changed =
true;
1430 this->
comm().
max(mesh_p_changed);
1450 MeshTools::libmesh_assert_valid_procids<Node>(
_mesh);
1461 return (mesh_changed || mesh_p_changed);
1471 parallel_object_only();
1477 LOG_SCOPE (
"_refine_elements()",
"MeshRefinement");
1483 for (
auto & elem :
_mesh.element_ptr_range())
1490 std::vector<Elem *> local_copy_of_elements;
1491 local_copy_of_elements.reserve(n_elems_flagged);
1495 bool mesh_p_changed =
false;
1525 local_copy_of_elements.push_back(elem);
1529 elem->set_p_level(elem->p_level()+1);
1531 mesh_p_changed =
true;
1537 for (
auto & elem :
as_range(
_mesh.active_not_local_elements_begin(),
1538 _mesh.active_not_local_elements_end()))
1541 local_copy_of_elements.push_back(elem);
1545 elem->set_p_level(elem->p_level()+1);
1547 mesh_p_changed =
true;
1555 for (
auto & elem : local_copy_of_elements)
1556 elem->refine(*
this);
1559 bool mesh_changed = !local_copy_of_elements.empty();
1562 this->
comm().
max(mesh_changed);
1563 this->
comm().
max(mesh_p_changed);
1582 (
_mesh.unpartitioned_elements_begin() ==
1583 _mesh.unpartitioned_elements_end()))
1594 return (mesh_changed || mesh_p_changed);
1609 bool satisfied =
false;
1614 const bool coarsening_satisfied =
1618 const bool refinement_satisfied =
1622 bool smoothing_satisfied =
1626 smoothing_satisfied = smoothing_satisfied &&
1630 smoothing_satisfied = smoothing_satisfied &&
1634 smoothing_satisfied = smoothing_satisfied &&
1638 smoothing_satisfied = smoothing_satisfied &&
1641 satisfied = (coarsening_satisfied &&
1642 refinement_satisfied &&
1643 smoothing_satisfied);
1656 for (
unsigned int rstep=0; rstep<n; rstep++)
1657 for (
auto & elem :
_mesh.active_element_ptr_range())
1660 elem->set_p_level(elem->p_level()+1);
1670 for (
unsigned int rstep=0; rstep<n; rstep++)
1671 for (
auto & elem :
_mesh.active_element_ptr_range())
1672 if (elem->p_level() > 0)
1675 elem->set_p_level(elem->p_level()-1);
1687 for (
unsigned int rstep=0; rstep<n; rstep++)
1693 for (
auto & elem :
_mesh.active_element_ptr_range())
1710 for (
unsigned int rstep=0; rstep<n; rstep++)
1716 for (
auto & elem :
_mesh.active_element_ptr_range())
1731 std::vector<std::vector<dof_id_type>>
1732 parents_to_coarsen(n_proc);
1734 for (
const auto & elem :
as_range(
_mesh.ancestor_elements_begin(),
_mesh.ancestor_elements_end()))
1735 if (elem->processor_id() != my_proc_id &&
1737 parents_to_coarsen[elem->processor_id()].push_back(elem->id());
1741 std::vector<Parallel::Request> coarsen_push_requests(n_proc-1);
1745 if (p == my_proc_id)
1749 coarsen_push_requests[p - (p > my_proc_id)];
1752 (p, parents_to_coarsen[p],
request, coarsen_tag);
1757 std::vector<dof_id_type> my_parents_to_coarsen;
1759 (Parallel::any_source, my_parents_to_coarsen,
1762 for (
const auto &
id : my_parents_to_coarsen)
1771 Parallel::wait(coarsen_push_requests);
1776 (this->
comm(),
_mesh.not_local_elements_begin(),
1777 _mesh.not_local_elements_end(),
1797 const unsigned int side)
const 1799 #ifdef LIBMESH_ENABLE_PERIODIC 1813 const Elem * neighbor)
const 1815 #ifdef LIBMESH_ENABLE_PERIODIC bool limit_level_mismatch_at_edge(const unsigned int max_mismatch)
~MeshRefinement()
Destructor.
bool has_neighbor(const Elem *elem) const
RefinementState refinement_flag() const
void uniformly_p_refine(unsigned int n=1)
Uniformly p refines the mesh n times.
const Elem * parent() const
void add_scaled(const TypeVector< T2 > &, const T &)
Add a scaled value to this vector without creating a temporary.
virtual const std::vector< std::pair< dof_id_type, dof_id_type > > bracketing_nodes(unsigned int c, unsigned int n) const
bool _refine_elements()
Refines user-requested elements.
A Node is like a Point, but with more information.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
bool test_level_one(bool libmesh_assert_yes=false) const
std::unique_ptr< PointLocatorBase > sub_point_locator() const
bool limit_level_mismatch_at_node(const unsigned int max_mismatch)
This algorithm restricts the maximum level mismatch at any node in the mesh.
void update_nodes_map()
Updates the _new_nodes_map.
const Elem * topological_neighbor(const unsigned int i, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) const
TopologyMap _new_nodes_map
Data structure that holds the new nodes information.
bool limit_underrefined_boundary(const signed char max_mismatch)
bool has_topological_neighbor(const Elem *elem, const PointLocatorBase *point_locator, const Elem *neighbor) const
Local dispatch function for checking the correct has_neighbor function from the Elem class...
MeshBase & _mesh
Reference to the mesh.
The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite eleme...
We're using a class instead of a typedef to allow forward declarations and future flexibility...
MessageTag get_unique_tag(int tagvalue=MessageTag::invalid_tag) const
bool refine_elements()
Only refines the user-requested elements.
void make_elems_parallel_consistent(MeshBase &)
Copy ids of ghost elements from their local processors.
static void set_node_processor_ids(MeshBase &mesh)
This function is called after partitioning to set the processor IDs for the nodes.
dof_id_type find(dof_id_type bracket_node1, dof_id_type bracket_node2) const
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
RefinementState p_refinement_flag() const
void add_node(const Node &mid_node, const std::vector< std::pair< dof_id_type, dof_id_type >> &bracketing_nodes)
Add a node to the map, between each pair of specified bracketing nodes.
void remove(const Node *node)
Removes the boundary conditions associated with node node, if any exist.
This is the base class from which all geometric element types are derived.
void uniformly_p_coarsen(unsigned int n=1)
Attempts to uniformly p coarsen the mesh n times.
RefinementState
Enumeration of possible element refinement states.
void set_refinement_flag(const RefinementState rflag)
Sets the value of the refinement flag for the element.
const Parallel::Communicator & comm() const
bool limit_overrefined_boundary(const signed char max_mismatch)
unsigned int p_level() const
void clean_refinement_flags()
Sets the refinement flag to Elem::DO_NOTHING for each element in the mesh.
void create_parent_error_vector(const ErrorVector &error_per_cell, ErrorVector &error_per_parent, Real &parent_error_min, Real &parent_error_max)
Calculates the error on all coarsenable parents.
The libMesh namespace provides an interface to certain functionality in the library.
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
PeriodicBoundaries * _periodic_boundaries
signed char _underrefined_boundary_limit
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id)=0
Add a new Node at Point p to the end of the vertex array, with processor_id procid.
uint8_t processor_id_type
This is the MeshBase class.
SimpleRange< ChildRefIter > child_ref_range()
Returns a range with all children of a parent element, usable in range-based for loops.
bool make_refinement_compatible()
Take user-specified refinement flags and augment them so that level-one dependency is satisfied...
bool coarsen_elements()
Only coarsens the user-requested elements.
bool has_topological_neighbor(const Elem *elem, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) const
virtual Real embedding_matrix(const unsigned int child_num, const unsigned int child_node_num, const unsigned int parent_node_num) const =0
processor_id_type n_processors() const
virtual bool is_serial() const
Status receive(const unsigned int dest_processor_id, T &buf, const MessageTag &tag=any_tag) const
This is the MeshCommunication class.
void min(const T &r, T &o, Request &req) const
unsigned char _face_level_mismatch_limit
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
virtual unsigned int as_parent_node(unsigned int c, unsigned int n) const
virtual Elem * add_elem(Elem *e)=0
Add elem e to the end of the element array.
virtual void update_parallel_id_counts()=0
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors...
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
Helper function that allows us to treat a homogenous pair as a range.
void uniformly_coarsen(unsigned int n=1)
Attempts to uniformly coarsen the mesh n times.
void make_p_levels_parallel_consistent(MeshBase &)
Copy p levels of ghost elements from their local processors.
bool test_unflagged(bool libmesh_assert_yes=false) const
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
bool make_flags_parallel_consistent()
Copy refinement flags on ghost elements from their local processors.
This is the base class for point locators.
signed char _overrefined_boundary_limit
bool make_coarsening_compatible()
Take user-specified coarsening flags and augment them so that level-one dependency is satisfied...
void sync_dofobject_data_by_id(const Communicator &comm, const Iterator &range_begin, const Iterator &range_end, SyncFunctor &sync)
Request data about a range of ghost dofobjects uniquely identified by their id.
An object whose state is distributed along a set of processors.
MeshRefinement(MeshBase &mesh)
Constructor.
Node * add_node(Elem &parent, unsigned int child, unsigned int node, processor_id_type proc_id)
Add a node to the mesh.
void send_coarse_ghosts(MeshBase &) const
Examine a just-coarsened mesh, and for any newly-coarsened elements, send the associated ghosted elem...
unsigned char _node_level_mismatch_limit
const Elem * neighbor_ptr(unsigned int i) const
unsigned int level() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void max(const T &r, T &o, Request &req) const
Elem * add_elem(Elem *elem)
Adds the element elem to the mesh.
const Node * node_ptr(const unsigned int i) const
void make_nodes_parallel_consistent(MeshBase &)
Copy processor_ids and ids on ghost nodes from their local processors.
void send(const unsigned int dest_processor_id, const T &buf, const MessageTag &tag=no_tag) const
bool refine_and_coarsen_elements()
Refines and coarsens user-requested elements.
virtual bool is_replicated() const
virtual const Elem & elem_ref(const dof_id_type i) const
void clear()
Deletes all the data that are currently stored.
Elem * topological_neighbor(Elem *elem, const PointLocatorBase *point_locator, const unsigned int side) const
Local dispatch function for getting the correct topological neighbor from the Elem class...
IntRange< unsigned short > node_index_range() const
void _smooth_flags(bool refining, bool coarsening)
Smooths refinement flags according to current settings.
virtual void libmesh_assert_valid_parallel_ids() const
Verify id and processor_id consistency of our elements and nodes containers.
bool is_children_on_boundary_side() const
unsigned char _edge_level_mismatch_limit
void set_p_refinement_flag(const RefinementState pflag)
Sets the value of the p-refinement flag for the element.
bool _coarsen_elements()
Coarsens user-requested elements.
virtual const Node * node_ptr(const dof_id_type i) const =0
bool eliminate_unrefined_patches()
This algorithm selects an element for refinement if all of its neighbors are (or will be) refined...
processor_id_type processor_id() const
void make_new_nodes_parallel_consistent(MeshBase &)
Copy processor_ids and ids on new nodes from their local processors.
processor_id_type processor_id() const
void set_periodic_boundaries_ptr(PeriodicBoundaries *pb_ptr)
Sets the PeriodicBoundaries pointer.
A Point defines a location in LIBMESH_DIM dimensional Real space.
const Point & point(const unsigned int i) const
bool has_children() const
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
void transfer_boundary_ids_from_children(const Elem *const parent)
Update parent's boundary id list so that this information is consistent with its children.
void uniformly_refine(unsigned int n=1)
Uniformly refines the mesh n times.
const RemoteElem * remote_elem