26 #include <unordered_set> 32 void GhostPointNeighbors::operator()
42 std::unordered_set<const Node *> connected_nodes;
46 std::unordered_set<const Elem *> interior_parents;
62 for (
const auto & elem :
as_range(range_begin, range_end))
64 if (elem->processor_id() != p)
65 coupled_elements.insert (std::make_pair(elem,nullcm));
67 for (
auto neigh : elem->neighbor_ptr_range())
71 #ifdef LIBMESH_ENABLE_AMR 74 std::vector<const Elem*> family;
75 neigh->active_family_tree_by_neighbor(family, elem);
77 for (
const Elem * f : family)
78 if (f->processor_id() != p)
79 coupled_elements.insert
80 (std::make_pair(f, nullcm));
84 if (neigh->processor_id() != p)
85 coupled_elements.insert
86 (std::make_pair(neigh, nullcm));
98 if (elem->dim() < LIBMESH_DIM &&
99 elem->interior_parent() &&
100 elem->interior_parent()->processor_id() != p)
101 interior_parents.insert (elem->interior_parent());
104 for (
auto n : elem->node_index_range())
105 connected_nodes.insert (elem->node_ptr(n));
109 for (
const auto & elem : _mesh.element_ptr_range())
111 std::unordered_set<const Elem *>::iterator ip_it =
112 interior_parents.find(elem);
114 if (ip_it != interior_parents.end())
116 coupled_elements.insert
117 (std::make_pair(elem, nullcm));
120 interior_parents.erase(ip_it);
127 for (
const auto & elem : _mesh.active_element_ptr_range())
128 if (elem->processor_id() != p)
129 for (
auto & n : elem->node_ref_range())
130 if (connected_nodes.count(&n))
131 coupled_elements.insert(std::make_pair(elem, nullcm));
The base class for all geometric element types.
uint8_t processor_id_type
SimpleRange< I > as_range(const std::pair< I, I > &p)
std::unordered_map< const Elem *, const CouplingMatrix * > map_type
Defines the coupling between variables of a System.
const RemoteElem * remote_elem