17#include "libmesh/elem.h"
18#include "libmesh/mesh_base.h"
19#include "libmesh/boundary_info.h"
27 params.
set<
bool>(
"attach_geometric_early") =
false;
38 std::ostringstream oss;
39 oss <<
"GhostLowerDElems";
45 const MeshBase::const_element_iterator & range_end,
46 const processor_id_type p,
50 "The MOOSE mesh must be non-null in order for this relationship manager to work.");
54 static const CouplingMatrix *
const null_mat =
nullptr;
56 for (
const Elem *
const elem : as_range(range_begin, range_end))
57 for (
const auto s : elem->side_index_range())
59 const Elem *
const neighbor = elem->neighbor_ptr(s);
60 const bool elem_owns_lowerd = !neighbor || elem->id() < neighbor->id();
62 const Elem *
const lower_d_elem =
67 if (lower_d_elem && lower_d_elem->processor_id() != p)
68 coupled_elements.emplace(lower_d_elem, null_mat);
78std::unique_ptr<libMesh::GhostingFunctor>
registerMooseObject("MooseApp", GhostLowerDElems)
std::unique_ptr< T > copyConstruct(const T &object)
Copy constructs the object object.
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
virtual bool operator>=(const RelationshipManager &other) const override
Whether this relationship manager provides more or the same amount and type of ghosting as the rhs.
std::unique_ptr< GhostingFunctor > clone() const override
std::string getInfo() const override
Method for returning relationship manager information (suitable for console output).
static InputParameters validParams()
GhostLowerDElems(const InputParameters &)
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
const Elem * getLowerDElem(const Elem *, unsigned short int) const
Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensi...
MooseApp & _app
The MOOSE application this is associated with.
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
static InputParameters validParams()
MooseMesh * _moose_mesh
Pointer to the MooseMesh object.
std::map< const Elem *, const CouplingMatrix *, CompareDofObjectsByPIDAndThenID > map_type