www.mooseframework.org
TimeSequenceStepperBase.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 TIMESEQUENCESTEPPERBASE_H
16 #define TIMESEQUENCESTEPPERBASE_H
17 
18 #include "TimeStepper.h"
19 
21 
22 template <>
24 
30 {
31 public:
33 
34  void setupSequence(const std::vector<Real> & times);
35 
36  virtual void init() override {}
37  virtual void step() override;
38 
39 protected:
40  virtual Real computeInitialDT() override;
41  virtual Real computeDT() override;
42  virtual Real computeFailedDT() override;
43 
45  unsigned int & _current_step;
46 
48  std::vector<Real> & _time_sequence;
49 };
50 
51 #endif // TIMESEQUENCESTEPPERBASE_H
virtual void init() override
Initialize the time stepper.
virtual Real computeFailedDT() override
Called to compute _current_dt after a solve has failed.
unsigned int & _current_step
the step that the time stepper is currently at
Base class for time stepping.
Definition: TimeStepper.h:31
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
TimeSequenceStepperBase(const InputParameters &parameters)
void setupSequence(const std::vector< Real > &times)
InputParameters validParams< TimeSequenceStepperBase >()
std::vector< Real > & _time_sequence
stores the sequence of time points
virtual Real computeDT() override
Called to compute _current_dt for a normal step.
virtual Real computeInitialDT() override
Called to compute _current_dt for the first timestep.
Solves the PDEs at a sequence of given time points.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual void step() override
Take a time step.