www.mooseframework.org
FunctorRelationshipManager.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 "MooseApp.h"
12 
13 template <>
16 {
18  return params;
19 }
20 
22  : RelationshipManager(parameters), _functor(nullptr)
23 {
24 }
25 
26 void
27 FunctorRelationshipManager::operator()(const MeshBase::const_element_iterator & range_begin,
28  const MeshBase::const_element_iterator & range_end,
29  processor_id_type p,
30  map_type & coupled_elements)
31 {
32  if (!_functor)
33  mooseError("Functor was not initialized!");
34 
35  (*_functor)(range_begin, range_end, p, coupled_elements);
36 }
37 
38 void
40 {
41  if (!_functor)
42  mooseError("Functor was not initialized!");
43 
44  _functor->mesh_reinit();
45 }
46 
47 void
49 {
50  if (!_functor)
51  mooseError("Functor was not initialized!");
52 
53  _functor->dofmap_reinit();
54 }
55 
56 void
58 {
59  if (!_functor)
60  mooseError("Functor was not initialized!");
61 
62  _functor->redistribute();
63 }
64 
65 void
67 {
68  if (!_functor)
69  mooseError("Functor was not initialized!");
70 
71  _functor->delete_remote_elements();
72 }
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
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
Definition: MooseObject.h:147
InputParameters validParams< RelationshipManager >()
std::unique_ptr< GhostingFunctor > _functor
virtual void delete_remote_elements() override
InputParameters validParams< FunctorRelationshipManager >()
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
FunctorRelationshipManager(const InputParameters &parameters)
virtual void redistribute() override
virtual void mesh_reinit() override