https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FunctorRelationshipManager.h
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
10#pragma once
11
12#include "RelationshipManager.h"
13
14#include "libmesh/ghosting_functor.h"
15
16class MooseMesh;
17
24{
25public:
27
29
31
32 virtual void operator()(const MeshBase::const_element_iterator & range_begin,
33 const MeshBase::const_element_iterator & range_end,
34 processor_id_type p,
35 map_type & coupled_elements) override;
36
37 virtual void mesh_reinit() override;
38
39 virtual void dofmap_reinit() override;
40
41 virtual void redistribute() override;
42
43 virtual void delete_remote_elements() override;
44
49 virtual void set_mesh(const MeshBase * mesh) override
50 {
51 if (_functor)
52 {
53 _functor->set_mesh(mesh);
54 _mesh = mesh;
55 }
56 else
57 mooseError("functor does not exist");
58 }
59
60protected:
61 std::unique_ptr<GhostingFunctor> _functor;
62};
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
virtual void dofmap_reinit() override
virtual void set_mesh(const MeshBase *mesh) override
It is often called after cloning a ghosting functor/RM.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
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
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
std::map< const Elem *, const CouplingMatrix *, CompareDofObjectsByPIDAndThenID > map_type
const MeshBase * _mesh
MeshBase & mesh