18 #include "libmesh/elem.h" 19 #include "libmesh/mesh_base.h" 20 #include "libmesh/boundary_info.h" 30 params.
set<
bool>(
"attach_geometric_early") =
false;
48 std::ostringstream oss;
49 oss <<
"GhostHigherDLowerDPointNeighbors";
55 const MeshBase::const_element_iterator & range_end,
60 "The MOOSE mesh must be non-null in order for this relationship manager to work.");
65 std::unordered_set<dof_id_type> visited_nodes;
67 for (
const Elem *
const elem :
as_range(range_begin, range_end))
69 if (elem->dim() != mesh_dim)
73 for (
const auto & node : elem->node_ref_range())
78 const auto node_pid = node.processor_id();
79 if (node_pid == p || node_pid == DofObject::invalid_processor_id)
81 const auto [_, inserted] = visited_nodes.insert(node.id());
86 const auto & elem_node_neighbors = libmesh_map_find(node_to_elem_map, node.id());
87 for (
const auto elem_id : elem_node_neighbors)
90 if (elem_node_neighbor->
dim() != mesh_dim && elem_node_neighbor->
processor_id() != p)
91 coupled_elements.emplace(elem_node_neighbor, null_mat);
102 dynamic_cast<const GhostLowerDElems *>(&other);
105 std::unique_ptr<GhostingFunctor>
static InputParameters validParams()
MooseMesh * _moose_mesh
Pointer to the MooseMesh object.
std::map< const Elem *, const CouplingMatrix *, CompareDofObjectsByPIDAndThenID > map_type
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
GhostHigherDLowerDPointNeighbors(const InputParameters &)
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...
uint8_t processor_id_type
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
std::string getInfo() const override
Method for returning relationship manager information (suitable for console output).
MooseApp & _app
The MOOSE application this is associated with.
Ghosts lower-D point neighbors of higher-D elements.
std::unique_ptr< GhostingFunctor > clone() const override
virtual const Elem * elem_ptr(const dof_id_type i) const=0
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
virtual unsigned short dim() const=0
static InputParameters validParams()
registerMooseObject("MooseApp", GhostHigherDLowerDPointNeighbors)
unsigned int mesh_dimension() const
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
processor_id_type processor_id() const
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap()
If not already created, creates a map from every node to all elements to which they are connected...