www.mooseframework.org
GhostingUserObject.h
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 
10 #pragma once
11 
12 #include "GeneralUserObject.h"
13 
14 #include "libmesh/ghosting_functor.h"
15 
16 #include <unordered_map>
17 
18 // Forward Declarations
19 class GhostingUserObject;
20 class MooseMesh;
22 
23 template <>
25 
32 {
33 public:
35 
37 
38  virtual void initialSetup() override;
39 
40  virtual void initialize() override {}
41  virtual void execute() override {}
42  virtual void finalize() override {}
43 
44  virtual void meshChanged() override;
45 
46  Real getElementalValue(const Elem * elem,
48  processor_id_type pid) const;
49 
50 private:
52  std::vector<processor_id_type> _pids;
53 
58  std::vector<std::unordered_map<processor_id_type, libMesh::GhostingFunctor::map_type>> _maps;
59 
62 };
63 
GeneralUserObject.h
GhostingUserObject::_pids
std::vector< processor_id_type > _pids
The PID to show the ghosting for.
Definition: GhostingUserObject.h:52
MooseObject::parameters
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:76
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
GhostingUserObject::GhostingUserObject
GhostingUserObject(const InputParameters &parameters)
Definition: GhostingUserObject.C:38
GhostingUserObject::getElementalValue
Real getElementalValue(const Elem *elem, Moose::RelationshipManagerType rm_type, processor_id_type pid) const
Definition: GhostingUserObject.C:96
GhostingUserObject::initialSetup
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
Definition: GhostingUserObject.C:56
GhostingUserObject
This object loops over all of the underlying ghosting functors added by libMesh or MOOSE through Rela...
Definition: GhostingUserObject.h:31
Moose::RelationshipManagerType
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:852
GhostingUserObject::_mesh
MooseMesh & _mesh
Definition: GhostingUserObject.h:60
GhostingUserObject::meshChanged
virtual void meshChanged() override
Called on this object when the mesh changes.
Definition: GhostingUserObject.C:62
validParams< GhostingUserObject >
InputParameters validParams< GhostingUserObject >()
GhostingUserObject::finalize
virtual void finalize() override
Finalize.
Definition: GhostingUserObject.h:42
GhostingUserObject::initialize
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: GhostingUserObject.h:40
GhostingUserObject::_nl
NonlinearSystemBase & _nl
Definition: GhostingUserObject.h:61
GhostingUserObject::_maps
std::vector< std::unordered_map< processor_id_type, libMesh::GhostingFunctor::map_type > > _maps
Ghost Functor maps Dimension one: Map type (Geometric, Algebraic) Dimension two: Proc ID -> Map Dimen...
Definition: GhostingUserObject.h:58
GeneralUserObject
Definition: GeneralUserObject.h:29
MooseMesh
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
GhostingUserObject::execute
virtual void execute() override
Execute method.
Definition: GhostingUserObject.h:41
NonlinearSystemBase
Nonlinear system to be solved.
Definition: NonlinearSystemBase.h:61
GhostingUserObject::validParams
static InputParameters validParams()
Definition: GhostingUserObject.C:25