37void GhostPointNeighbors::operator()
45#ifdef LIBMESH_ENABLE_PERIODIC
46 const bool check_periodic_bcs =
47 (_periodic_bcs && !_periodic_bcs->empty());
49 auto * db = _mesh->get_disjoint_neighbor_boundary_pairs();
50 const bool check_disjoint_bcs = (db && !db->empty());
52 std::unique_ptr<PointLocatorBase> point_locator;
53 if (check_periodic_bcs || check_disjoint_bcs)
54 point_locator = _mesh->sub_point_locator();
56 std::set<const Elem *> periodic_elems_examined;
58 std::vector<boundary_id_type> appn_bcids;
59 std::vector<const Elem *> active_periodic_neighbors;
76 std::unordered_set<const Elem *> interior_parents;
92 for (
const auto & elem :
as_range(range_begin, range_end))
96 if (elem->processor_id() != p)
97 coupled_elements.emplace(elem, nullcm);
99 std::set<const Elem *> elem_point_neighbors;
100 elem->find_point_neighbors(elem_point_neighbors);
102 for (
const auto & neigh : elem_point_neighbors)
103 if (neigh->processor_id() != p)
104 coupled_elements.emplace(neigh, nullcm);
115 _mesh->query_elem_ptr(ip->
id()) == ip)
116 coupled_elements.emplace(ip, nullcm);
118#ifdef LIBMESH_ENABLE_PERIODIC
119 if (check_periodic_bcs)
121 for (
const auto s : elem->side_index_range())
123 if (elem->neighbor_ptr(s))
127 (s, *_mesh, *point_locator, _periodic_bcs);
129 if (!equal_level_periodic_neigh || equal_level_periodic_neigh ==
remote_elem)
132#ifdef LIBMESH_ENABLE_AMR
134 active_periodic_neighbors,
141 active_periodic_neighbors = { equal_level_periodic_neigh };
144 for (
const Elem *
const active_periodic_neigh : active_periodic_neighbors)
146 std::set <const Elem *> active_periodic_point_neighbors;
153 for (
const Elem *
const appn : active_periodic_point_neighbors)
158 periodic_elems_examined.count(appn))
162 bool on_periodic_boundary =
false;
163 for (
const auto appn_s : appn->side_index_range())
166 for (
const auto appn_bcid : appn_bcids)
167 if (_periodic_bcs->find(appn_bcid) != _periodic_bcs->end())
169 on_periodic_boundary =
true;
174 if (on_periodic_boundary)
175 coupled_elements.emplace(appn, nullcm);
177 periodic_elems_examined.insert(appn);
183 if (check_disjoint_bcs)
186 for (
auto s : elem->side_index_range())
188 for (
const auto & [
id, boundary_ptr] : *db)
190 if (!_mesh->get_boundary_info().has_boundary_id(elem, s,
id))
195 db->neighbor(
id, *point_locator, elem, s, &neigh_side);
201 coupled_elements.emplace(neigh, nullcm);
void active_family_tree_by_topological_neighbor(std::vector< const Elem * > &family, const Elem *neighbor, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb, bool reset=true) const
Same as the active_family_tree_by_neighbor() member, but the neighbor here may be a topological (e....