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)
57std::unique_ptr<libMesh::GhostingFunctor>
66 std::ostringstream oss;
67 std::string layers =
_layers == 1 ?
"layer" :
"layers";
69 oss <<
"ElementSideNeighborLayers (" <<
_layers <<
" " << layers <<
')';
89template <
typename Functor>
100 mooseAssert(periodic_boundaries_ptr,
"Periodic Boundaries Pointer is nullptr");
102 functor.set_periodic_boundaries(periodic_boundaries_ptr);
112 auto functor = std::make_unique<libMesh::PointNeighborCoupling>();
118 auto functor = std::make_unique<libMesh::DefaultCoupling>();
130 cast_ptr<libMesh::PointNeighborCoupling *>(
_functor.get())
133 cast_ptr<libMesh::DefaultCoupling *>(
_functor.get())
registerMooseObject("MooseApp", ElementSideNeighborLayers)
ElementSideNeighborLayers is used to increase the halo or stencil depth of each processor's partition...
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.
ElementSideNeighborLayers(const InputParameters ¶meters)
const bool _use_point_neighbors
static InputParameters validParams()
virtual std::unique_ptr< GhostingFunctor > clone() const override
According to the base class docs, "We call mesh_reinit() whenever the relevant Mesh has changed,...
virtual void internalInitWithMesh(const MeshBase &) override
Called before this RM is attached.
void dofmap_reinit() override
void initFunctor(Functor &functor)
Helper for initing.
unsigned short _layers
Size of the halo or stencil of elements available in each local processors partition.
virtual std::string getInfo() const override
Method for returning relationship manager information (suitable for console output).
std::unique_ptr< T > copyConstruct(const T &object)
Copy constructs the object object.
Intermediate base class for RelationshipManagers that are simply built using ghosting functors.
static InputParameters validParams()
std::unique_ptr< GhostingFunctor > _functor
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
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.
const libMesh::DofMap * _dof_map
Pointer to DofMap (may be null if this is geometric only).
PeriodicBoundaries * get_periodic_boundaries()
CouplingMatrix * _dof_coupling