13 #include "libmesh/system.h" 14 #include "libmesh/elem.h" 15 #include "libmesh/dof_map.h" 27 "The libMesh system to mirror the ghosting from");
44 const MeshBase::const_element_iterator & ,
50 auto other_elements_begin = other_mesh.active_local_elements_begin();
51 auto other_elements_end = other_mesh.active_local_elements_end();
59 const auto gf_end = other_mesh.ghosting_functors_end();
61 for (; gf_it != gf_end; ++gf_it)
62 if (!dynamic_cast<ProxyRelationshipManager *>(*gf_it))
63 (*(*gf_it))(other_elements_begin, other_elements_end, p, other_coupled_elements);
72 for (; gf_it != gf_end; ++gf_it)
73 if (!dynamic_cast<ProxyRelationshipManager *>(*gf_it))
74 (*(*gf_it))(other_elements_begin, other_elements_end, p, other_coupled_elements);
78 std::map<dof_id_type, const Elem *> unique_id_to_elem_map;
83 unique_id_to_elem_map[(*elem_it)->unique_id()] = *elem_it;
86 for (
auto other_coupled_it = other_coupled_elements.begin();
87 other_coupled_it != other_coupled_elements.end();
90 auto other_system_elem = other_coupled_it->first;
92 auto unique_id_to_elem_map_it = unique_id_to_elem_map.find(other_system_elem->unique_id());
93 mooseAssert(unique_id_to_elem_map_it != unique_id_to_elem_map.end(),
"no matching unique id");
95 coupled_elements.emplace(unique_id_to_elem_map_it->second, other_coupled_it->second);
117 std::unique_ptr<GhostingFunctor>
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...
const MeshBase & get_mesh() const
registerMooseObject("MooseApp", ProxyRelationshipManager)
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
virtual void operator()(const MeshBase::const_element_iterator &, const MeshBase::const_element_iterator &, processor_id_type p, map_type &coupled_elements) override
uint8_t processor_id_type
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
virtual bool operator>=(const RelationshipManager &) const override
Whether this relationship manager provides more or the same amount and type of ghosting as the rhs...
ProxyRelationshipManager(const InputParameters ¶meters)
virtual std::unique_ptr< GhostingFunctor > clone() const override
A clone() is needed because GhostingFunctor can not be shared between different meshes.
bool isType(const Moose::RelationshipManagerType &type) const
Check to see if an RM is of a given type.
MooseApp & _app
The MOOSE application this is associated with.
virtual std::string getInfo() const override
Method for returning relationship manager information (suitable for console output).
std::set< GhostingFunctor *>::const_iterator algebraic_ghosting_functors_end() const
std::set< GhostingFunctor *>::const_iterator ghosting_functors_begin() const
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
static InputParameters validParams()
static InputParameters validParams()
libMesh::System * _other_system
bool useDisplacedMesh() const
Whether this should be placed on the undisplaced or displaced systems.
const std::string & name() const
std::set< GhostingFunctor *>::const_iterator algebraic_ghosting_functors_begin() const
const DofMap & get_dof_map() const
Intermediate base class for RelationshipManagers that are simply built using ghosting functors...