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 
14 #define usingTransientInterfaceMembers \
15  using TransientInterface::_t; \
16  using TransientInterface::_t_step; \
17  using TransientInterface::_dt; \
18  using TransientInterface::_dt_old
19 
20 // Forward declarations
21 class FEProblemBase;
22 class InputParameters;
23 class MooseObject;
24 class TransientInterface;
25 
26 template <typename T>
28 
29 template <>
31 
36 {
37 public:
38  TransientInterface(const MooseObject * moose_object);
39  virtual ~TransientInterface();
40 
41  bool isImplicit() { return _is_implicit; }
42 
43 protected:
45 
47 
55 
57  Real & _t;
58 
60  int & _t_step;
61 
63  Real & _dt;
64 
66  Real & _dt_old;
67 
68  // NOTE: dunno if it is set properly in time of instantiation (might be a source of bugs)
70 
71 private:
72  const std::string _ti_name;
73 };
74 
FEProblemBase & _ti_feproblem
Real & _dt_old
Size of the old time step.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Real & _dt
Time step size.
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:42
const InputParameters & _ti_params
InputParameters validParams()
This is the templated validParams() function that every MooseObject-derived class is required to spec...
const std::string _ti_name
bool _is_implicit
If the object is using implicit or explicit form.
InputParameters validParams< TransientInterface >()