19#include "libmesh/elem.h"
20#include "libmesh/non_manifold_coupling.h"
21#include "libmesh/simple_range.h"
29 _stem(MeshTools::SidesToElemMap::build(
mesh))
37std::unique_ptr<GhostingFunctor>
40 return std::make_unique<NonManifoldGhostingFunctor>(*
this);
73 for (
const auto & elem :
as_range(range_begin, range_end))
84 if (elem->processor_id() != p)
85 coupled_elements.emplace(elem, nullcm);
90 for (
auto s : elem->side_index_range())
92 if (neigh->processor_id() != p)
93 coupled_elements.emplace(neigh, nullcm);
This class defines a coupling matrix.
This abstract base class defines the interface by which library code and user code can report associa...
std::map< const Elem *, const CouplingMatrix *, CompareDofObjectsByPIDAndThenID > map_type
What elements do we care about and what variables do we care about on each element?
This is the MeshBase class.
MeshTools::SidesToElemMap _stem
Quickly-searchable map from (elem, side) pair to list of connected Elems.
virtual void redistribute() override
When the Mesh is redistributed, we may need to update the information in the SidesToElemMap by removi...
virtual void delete_remote_elements() override
When remote elements are deleted, we should remove them from the information in the SidesToElemMap.
virtual void operator()(const MeshBase::const_element_iterator &range_begin, const MeshBase::const_element_iterator &range_end, processor_id_type p, map_type &coupled_elements) override
For the specified range of active elements, query the SidesToElemMap and add all side neighbors to th...
virtual std::unique_ptr< GhostingFunctor > clone() const override
clone() just calls the copy ctor.
NonManifoldGhostingFunctor(const MeshBase &mesh)
Constructor.
virtual void mesh_reinit() override
If the Mesh changes, we'll need to clear the SidesToElemMap and recreate it, since all the neighbor i...
The libMesh namespace provides an interface to certain functionality in the library.
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
Helper function that allows us to treat a homogenous pair as a range.
uint8_t processor_id_type
The definition of the const_element_iterator struct.