www.mooseframework.org
FunctionDT.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef FUNCTIONDT_H
16 #define FUNCTIONDT_H
17 
18 #include "TimeStepper.h"
19 #include "LinearInterpolation.h"
20 
21 class FunctionDT;
22 
23 template <>
25 
26 class FunctionDT : public TimeStepper
27 {
28 public:
30 
31  virtual void init() override;
32 
33  virtual void preExecute() override;
34 
35  virtual void postStep() override;
36  virtual void rejectStep() override;
37 
38 protected:
39  virtual Real computeInitialDT() override;
40  virtual Real computeDT() override;
41 
42  void removeOldKnots();
43 
44  const std::vector<Real> & _time_t;
45  const std::vector<Real> & _time_dt;
46 
48  std::unique_ptr<LinearInterpolation> _time_ipol;
49 
53  Real _min_dt;
54 
57 
58  std::vector<Real> _time_knots;
59 };
60 
61 #endif /* FUNCTIONDT_H */
std::unique_ptr< LinearInterpolation > _time_ipol
Piecewise linear definition of time stepping.
Definition: FunctionDT.h:48
std::vector< Real > _time_knots
Definition: FunctionDT.h:58
virtual void preExecute() override
Definition: FunctionDT.C:77
InputParameters validParams< FunctionDT >()
Definition: FunctionDT.C:22
Base class for time stepping.
Definition: TimeStepper.h:31
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::vector< Real > & _time_t
Definition: FunctionDT.h:44
bool _interpolate
Whether or not to interpolate DT between times.
Definition: FunctionDT.h:56
virtual void postStep() override
Definition: FunctionDT.C:132
void removeOldKnots()
Definition: FunctionDT.C:69
virtual void init() override
Initialize the time stepper.
Definition: FunctionDT.C:64
virtual Real computeDT() override
Called to compute _current_dt for a normal step.
Definition: FunctionDT.C:90
bool _cutback_occurred
True if cut back of the time step occurred.
Definition: FunctionDT.h:52
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual Real computeInitialDT() override
Called to compute _current_dt for the first timestep.
Definition: FunctionDT.C:84
virtual void rejectStep() override
This gets called when time step is rejected.
Definition: FunctionDT.C:138
Real _min_dt
Definition: FunctionDT.h:53
Real _growth_factor
Definition: FunctionDT.h:50
FunctionDT(const InputParameters &parameters)
Definition: FunctionDT.C:42
const std::vector< Real > & _time_dt
Definition: FunctionDT.h:45