www.mooseframework.org
Transfer.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 // Moose
13 #include "MooseObject.h"
14 #include "MooseTypes.h"
15 #include "SetupInterface.h"
16 #include "Restartable.h"
17 #include "PerfGraphInterface.h"
18 
19 class SubProblem;
20 class FEProblemBase;
21 class FEProblem;
22 class SystemBase;
23 
24 namespace libMesh
25 {
26 class System;
27 class EquationSystems;
28 }
29 
36 class Transfer : public MooseObject,
37  public SetupInterface,
38  public Restartable,
39  public PerfGraphInterface
40 {
41 public:
43  virtual ~Transfer() = default;
44 
46 
50  virtual void execute() = 0;
51 
56  virtual void initialSetup() {}
57 
66  static System * find_sys(EquationSystems & es, const std::string & var_name);
67 
68  enum DIRECTION
69  {
73  };
74 
76  static std::string possibleDirections() { return "to_multiapp from_multiapp between_multiapp"; }
77 
79  const MultiMooseEnum & directions() { return _directions; }
80 
87 
90  {
93  }
94 
95 protected:
99 
101 
108 
111 
112 public:
113  const static Number OutOfMeshValue;
114 };
A class for creating restricted objects.
Definition: Restartable.h:28
MooseEnum _current_direction
Definition: Transfer.h:106
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:20
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static std::string possibleDirections()
Used to construct InputParameters.
Definition: Transfer.h:76
FEProblemBase & _fe_problem
Definition: Transfer.h:97
void setCurrentDirection(const int direction)
Set this Transfer to be executed in a given direction.
Definition: Transfer.h:89
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual void execute()=0
Execute the transfer.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
SystemBase & _sys
Definition: Transfer.h:98
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:33
virtual ~Transfer()=default
static InputParameters validParams()
Definition: Transfer.C:25
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
virtual void initialSetup()
Method called at the beginning of the simulation for checking integrity or doing one-time setup...
Definition: Transfer.h:56
Transfer(const InputParameters &parameters)
Definition: Transfer.C:56
const MultiMooseEnum & directions()
The directions this Transfer should be executed on.
Definition: Transfer.h:79
static const Number OutOfMeshValue
Definition: Transfer.h:113
MooseEnum currentDirection()
Definition: Transfer.h:85
Interface for objects interacting with the PerfGraph.
THREAD_ID _tid
Definition: Transfer.h:100
SubProblem & _subproblem
Definition: Transfer.h:96
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
MultiMooseEnum _directions
The directions this Transfer is to be executed on.
Definition: Transfer.h:110
MooseEnum direction()
Definition: Transfer.h:84
const InputParameters & parameters() const
Get the parameters of the object.
MooseEnum _direction
Definition: Transfer.h:105
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
static System * find_sys(EquationSystems &es, const std::string &var_name)
Small helper function for finding the system containing the variable.
Definition: Transfer.C:89
Real Number
unsigned int THREAD_ID
Definition: MooseTypes.h:198
Base class for all Transfer objects.
Definition: Transfer.h:36