https://mooseframework.inl.gov
TransientInterface.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 "Moose.h"
13 #include "MooseFunctorArguments.h"
14 
15 #define usingTransientInterfaceMembers \
16  using TransientInterface::_t; \
17  using TransientInterface::_t_step; \
18  using TransientInterface::_dt; \
19  using TransientInterface::_dt_old
20 
21 // Forward declarations
22 class FEProblemBase;
23 class InputParameters;
24 class MooseObject;
25 template <typename T>
27 
32 {
33 public:
34  TransientInterface(const MooseObject * moose_object);
35 
36 #ifdef MOOSE_KOKKOS_ENABLED
37 
41 #endif
42 
43  virtual ~TransientInterface();
44 
46 
47  bool isImplicit() { return _is_implicit; }
48 
55 
56 protected:
58 
60 
68 
70  Real & _t;
71 
73  const Real & _t_old;
74 
76  int & _t_step;
77 
79  Real & _dt;
80 
83 
84  // NOTE: dunno if it is set properly in time of instantiation (might be a source of bugs)
86 
87 private:
88  const std::string _ti_name;
89 };
90 
91 inline Moose::StateArg
93 {
95 }
FEProblemBase & _ti_feproblem
StateArg oldState()
Real & _dt_old
Size of the old time step.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Real & _dt
Time step size.
static InputParameters validParams()
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Interface for objects that needs transient capabilities.
TransientInterface(const MooseObject *moose_object)
int & _t_step
The number of the time step.
const Real & _t_old
Old time.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:27
const InputParameters & _ti_params
InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
State argument for evaluating functors.
const std::string _ti_name
StateArg currentState()
bool _is_implicit
If the object is using implicit or explicit form.