17#include "libmesh/elem.h"
18#include "libmesh/mesh_base.h"
19#include "libmesh/boundary_info.h"
28 "The name of the primary boundary sideset.");
30 "to communicate ghost elements on a boundary.");
52 std::ostringstream oss;
53 oss <<
"GhostBoundary";
59 const MeshBase::const_element_iterator & ,
60 const processor_id_type p,
70 for (
const Elem *
const elem :
_mesh->active_element_ptr_range())
76 if (elem->on_boundary())
77 coupled_elements.insert(std::make_pair(elem,
_null_mat));
84 for (
auto side : elem->side_index_range())
85 for (
auto boundary_id : boundary_ids)
86 if ((elem->processor_id() != p) && (binfo.has_boundary_id(elem, side, boundary_id)))
88 coupled_elements.insert(std::make_pair(elem,
_null_mat));
102 std::set<BoundaryName> their_set(asoi->_boundary_name.begin(), asoi->_boundary_name.end());
103 std::set<BoundaryName> difference;
104 std::set_difference(their_set.begin(),
108 std::inserter(difference, difference.end()));
109 if (difference.empty())
115std::unique_ptr<GhostingFunctor>
registerMooseObject("MooseApp", GhostBoundary)
std::unique_ptr< T > copyConstruct(const T &object)
Copy constructs the object object.
GhostBoundary is used to ghost elements on a boundary.
const std::vector< BoundaryName > & _boundary_name
The boundary for which we will ghost elements.
GhostBoundary(const InputParameters &)
std::string getInfo() const override
Method for returning relationship manager information (suitable for console output).
static InputParameters validParams()
const CouplingMatrix *const _null_mat
null matrix for generating full variable coupling
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.
virtual void internalInitWithMesh(const MeshBase &) override
Called before this RM is attached.
virtual std::unique_ptr< GhostingFunctor > clone() const override
virtual void operator()(const MeshBase::const_element_iterator &, const MeshBase::const_element_iterator &, processor_id_type p, map_type &coupled_elements) override
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
const MeshBase * getMeshPtr() const
std::vector< BoundaryID > getBoundaryIDs(const Elem *const elem, const unsigned short int side) const
Returns a vector of boundary IDs for the requested element on the requested side.
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...
virtual bool baseGreaterEqual(const RelationshipManager &rhs) const
Whether the base class provides more or the same amount and type of ghosting as the rhs.
static InputParameters validParams()
MooseMesh * _moose_mesh
Pointer to the MooseMesh object.
std::map< const Elem *, const CouplingMatrix *, CompareDofObjectsByPIDAndThenID > map_type
const BoundaryInfo & get_boundary_info() const
const BoundaryID INVALID_BOUNDARY_ID