www.mooseframework.org
TransientInterface.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 #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);
36  virtual ~TransientInterface();
37 
38  bool isImplicit() { return _is_implicit; }
39 
40 protected:
47 
49 
51 
59 
61  Real & _t;
62 
64  int & _t_step;
65 
67  Real & _dt;
68 
71 
72  // NOTE: dunno if it is set properly in time of instantiation (might be a source of bugs)
74 
75 private:
76  const std::string _ti_name;
77 };
78 
79 inline Moose::StateArg
81 {
83 }
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.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:33
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.