18 #include "libmesh/default_coupling.h" 19 #include "libmesh/point_neighbor_coupling.h" 20 #include "libmesh/dof_map.h" 32 "element_side_neighbor_layers>=1 & element_side_neighbor_layers<=10",
33 "The number of additional geometric elements to make available when " 34 "using distributed mesh. No effect with replicated mesh.");
35 params.
addParam<
bool>(
"use_point_neighbors",
37 "Whether to use point neighbors, which introduces additional ghosting to " 38 "that used for simple face neighbors.");
45 _layers(getParam<unsigned short>(
"layers")),
46 _use_point_neighbors(getParam<bool>(
"use_point_neighbors"))
52 _layers(other._layers),
53 _use_point_neighbors(other._use_point_neighbors)
57 std::unique_ptr<GhostingFunctor>
60 return std::make_unique<ElementSideNeighborLayers>(*this);
66 std::ostringstream oss;
67 std::string layers =
_layers == 1 ?
"layer" :
"layers";
69 oss <<
"ElementSideNeighborLayers (" <<
_layers <<
" " << layers <<
')';
89 template <
typename Functor>
98 auto periodic_boundaries_ptr =
_dof_map->get_periodic_boundaries();
100 mooseAssert(periodic_boundaries_ptr,
"Periodic Boundaries Pointer is nullptr");
102 functor.set_periodic_boundaries(periodic_boundaries_ptr);
103 functor.set_dof_coupling(
_dof_map->_dof_coupling);
112 auto functor = std::make_unique<PointNeighborCoupling>();
118 auto functor = std::make_unique<DefaultCoupling>();
130 static_cast<PointNeighborCoupling *
>(
_functor.get())
131 ->set_dof_coupling(
_dof_map->_dof_coupling);
133 static_cast<DefaultCoupling *
>(
_functor.get())->set_dof_coupling(
_dof_map->_dof_coupling);
virtual std::string getInfo() const override
Method for returning relationship manager information (suitable for console output).
ElementSideNeighborLayers(const InputParameters ¶meters)
unsigned short _layers
Size of the halo or stencil of elements available in each local processors partition.
const bool _use_point_neighbors
void dofmap_reinit() override
registerMooseObject("MooseApp", ElementSideNeighborLayers)
void initFunctor(Functor &functor)
Helper for initing.
virtual void internalInitWithMesh(const MeshBase &) override
Called before this RM is attached.
std::unique_ptr< GhostingFunctor > _functor
ElementSideNeighborLayers is used to increase the halo or stencil depth of each processor's partition...
static InputParameters validParams()
FunctorEnvelope< T > Functor
const DofMap * _dof_map
Pointer to DofMap (may be null if this is geometric only).
virtual bool baseGreaterEqual(const RelationshipManager &rhs) const
Whether the base class provides more or the same amount and type of ghosting as the rhs...
virtual bool operator>=(const RelationshipManager &rhs) const override
Whether this relationship manager provides more or the same amount and type of ghosting as the rhs...
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
virtual std::unique_ptr< GhostingFunctor > clone() const override
According to the base class docs, "We call mesh_reinit() whenever the relevant Mesh has changed...
static InputParameters validParams()
Intermediate base class for RelationshipManagers that are simply built using ghosting functors...