73void DefaultCoupling::operator()
79 LOG_SCOPE(
"operator()",
"DefaultCoupling");
88#ifdef LIBMESH_ENABLE_PERIODIC
89 bool check_periodic_bcs =
90 (_periodic_bcs && !_periodic_bcs->empty());
92 std::unique_ptr<PointLocatorBase> point_locator;
93 if (check_periodic_bcs)
96 point_locator = _mesh->sub_point_locator();
100 if (!this->_n_levels)
102 for (
const auto & elem :
as_range(range_begin, range_end))
105 if (elem->processor_id() != p)
106 coupled_elements.emplace(elem, _dof_coupling);
111 typedef std::unordered_set<const Elem*> set_type;
112 set_type next_elements_to_check(range_begin, range_end);
113 set_type elements_to_check;
114 set_type elements_checked;
116 for (
unsigned int i=0; i != this->_n_levels; ++i)
118 elements_to_check.swap(next_elements_to_check);
119 next_elements_to_check.clear();
120 elements_checked.insert(elements_to_check.begin(), elements_to_check.end());
122 for (
const auto & elem : elements_to_check)
124 std::vector<const Elem *> active_neighbors;
128 if (elem->processor_id() != p)
129 coupled_elements.emplace(elem, _dof_coupling);
131 for (
auto s : elem->side_index_range())
135#ifdef LIBMESH_ENABLE_PERIODIC
137 if (!neigh && check_periodic_bcs)
142 (s, *_mesh, *point_locator, _periodic_bcs);
156#ifdef LIBMESH_ENABLE_AMR
159# ifdef LIBMESH_ENABLE_PERIODIC
162 (active_neighbors,elem,*_mesh,*point_locator,_periodic_bcs);
165 active_neighbors.clear();
166 active_neighbors.push_back(neigh);
169 for (
const auto & neighbor : active_neighbors)
171 if (!elements_checked.count(neighbor))
172 next_elements_to_check.insert(neighbor);
174 if (neighbor->processor_id() != p)
175 coupled_elements.emplace(neighbor, _dof_coupling);
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....
void active_family_tree_by_neighbor(std::vector< const Elem * > &family, const Elem *neighbor, bool reset=true) const
Same as the active_family_tree() member, but only adds elements which are next to neighbor.