www.mooseframework.org
MooseGhostPointNeighbors.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 #include "MooseMesh.h"
12 #include "Conversion.h"
13 #include "MooseApp.h"
14 
15 #include "libmesh/ghost_point_neighbors.h"
16 
18 
19 template <>
22 {
24  return params;
25 }
26 
28  : FunctorRelationshipManager(parameters)
29 {
31  mooseError("The MooseGhostPointNeighbors relationship manager should only be used for "
32  "geometric ghosting");
33 }
34 
35 std::string
37 {
38  std::ostringstream oss;
39 
40  oss << "GhostPointNeighbors";
41 
42  return oss.str();
43 }
44 
45 bool
47 {
48  const auto * rm = dynamic_cast<const MooseGhostPointNeighbors *>(&rhs);
49  if (!rm)
50  return false;
51  else
52  return isType(rm->_rm_type);
53 }
54 
55 void
57 {
58  auto functor = libmesh_make_unique<GhostPointNeighbors>(_mesh);
59 
60  _functor = std::move(functor);
61 }
virtual std::string getInfo() const override
Method for returning relationship manager information (suitable for console output).
MooseMesh & _mesh
Reference to the Mesh object.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void mooseError(Args &&... args) const
Definition: MooseObject.h:147
std::unique_ptr< GhostingFunctor > _functor
Moose::RelationshipManagerType _rm_type
The type of RM this object is.
registerMooseObject("MooseApp", MooseGhostPointNeighbors)
MooseGhostPointNeighbors(const InputParameters &parameters)
bool isType(const Moose::RelationshipManagerType &type) const
Check to see if an RM is of a given type.
InputParameters validParams< FunctorRelationshipManager >()
virtual bool operator==(const RelationshipManager &rhs) const override
virtual void internalInit() override
Called before this RM is attached.
InputParameters validParams< MooseGhostPointNeighbors >()
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
MooseGhostPointNeighbors is used to increase the halo or stencil depth of each processor&#39;s partition...
Intermediate base class for RelationshipManagers that are simply built using ghosting functors...