https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FunctorRelationshipManager.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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 "MooseApp.h"
12
19
21 : RelationshipManager(parameters), _functor(nullptr)
22{
23}
24
26 : RelationshipManager(other), _functor(other._functor ? other._functor->clone() : nullptr)
27{
28}
29
30void
31FunctorRelationshipManager::operator()(const MeshBase::const_element_iterator & range_begin,
32 const MeshBase::const_element_iterator & range_end,
33 processor_id_type p,
34 map_type & coupled_elements)
35{
36 if (!_functor)
37 mooseError("Functor was not initialized!");
38
39 (*_functor)(range_begin, range_end, p, coupled_elements);
40}
41
42void
44{
45 if (!_functor)
46 mooseError("Functor was not initialized!");
47
48 _functor->mesh_reinit();
49}
50
51void
53{
54 if (!_functor)
55 mooseError("Functor was not initialized!");
56
57 _functor->dofmap_reinit();
58}
59
60void
62{
63 if (!_functor)
64 mooseError("Functor was not initialized!");
65
66 _functor->redistribute();
67}
68
69void
71{
72 if (!_functor)
73 mooseError("Functor was not initialized!");
74
75 _functor->delete_remote_elements();
76}
Intermediate base class for RelationshipManagers that are simply built using ghosting functors.
virtual void operator()(const MeshBase::const_element_iterator &range_begin, const MeshBase::const_element_iterator &range_end, processor_id_type p, map_type &coupled_elements) override
static InputParameters validParams()
std::unique_ptr< GhostingFunctor > _functor
virtual void delete_remote_elements() override
FunctorRelationshipManager(const InputParameters &parameters)
virtual void dofmap_reinit() override
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition MooseBase.h:271
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
static InputParameters validParams()
std::map< const Elem *, const CouplingMatrix *, CompareDofObjectsByPIDAndThenID > map_type