40 for (
const auto & elem : *
this)
41 for (
auto neighbor : elem->neighbor_ptr_range())
42 if (neighbor !=
nullptr)
44 #ifdef LIBMESH_ENABLE_AMR 45 if (!neighbor->active())
48 std::vector<const Elem *> active_neighbor_children;
50 neighbor->active_family_tree_by_neighbor
51 (active_neighbor_children, elem);
53 for (
const auto & child : active_neighbor_children)
54 new_neighbors.insert(child);
57 #endif // #ifdef LIBMESH_ENABLE_AMR 58 new_neighbors.insert (neighbor);
66 std::set<const Elem *> new_neighbors;
70 this->insert(new_neighbors.begin(), new_neighbors.end());
77 std::set<const Elem *> new_neighbors;
82 for (
const auto & neighbor : new_neighbors)
84 this->insert (neighbor);
91 std::set<const Elem *> new_neighbors;
95 for (
const auto & neighbor : new_neighbors)
97 this->insert (neighbor);
105 for (
const auto & elem : *
this)
107 std::set<const Elem *> elem_point_neighbors;
109 elem->find_point_neighbors(elem_point_neighbors);
111 new_neighbors.insert(elem_point_neighbors.begin(),
112 elem_point_neighbors.end());
120 std::set<const Elem *> new_neighbors;
124 this->insert(new_neighbors.begin(), new_neighbors.end());
131 std::set<const Elem *> new_neighbors;
136 for (
const auto & neighbor : new_neighbors)
138 this->insert (neighbor);
145 std::set<const Elem *> new_neighbors;
149 for (
const auto & neighbor : new_neighbors)
151 this->insert (neighbor);
157 const unsigned int target_patch_size,
163 libmesh_assert (e0->
active());
176 while (this->size() < target_patch_size)
183 const std::size_t old_patch_size = this->size();
186 (this->*patchtype)();
189 if (this->size() == old_patch_size)
192 "WARNING: stagnant patch of " << this->size() <<
" elements." 194 "Does the target patch size exceed the number of local elements?" 205 for (
const auto & elem : *
this)
207 libmesh_assert (elem->active());
210 libmesh_assert_equal_to (elem->processor_id(),
_my_procid);
void add_local_point_neighbors()
The base class for all geometric element types.
void build_around_element(const Elem *elem, const unsigned int target_patch_size=10, PMF patchtype=&Patch::add_local_face_neighbors)
void find_face_neighbors(std::set< const Elem *> &neighbor_set)
void add_point_neighbors()
void add_semilocal_point_neighbors()
OStreamProxy err(std::cerr)
void add_local_face_neighbors()
void find_point_neighbors(std::set< const Elem *> &neighbor_set)
void add_face_neighbors()
void add_semilocal_face_neighbors()
const processor_id_type _my_procid
processor_id_type processor_id() const