www.mooseframework.org
TimeSequenceStepperBase.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 "TimeStepper.h"
13 
19 {
20 public:
22 
24 
25  void setupSequence(const std::vector<Real> & times);
26 
27  // Increase the current step count by one
29 
30  // Get the time of the current step from input time sequence
32 
33  virtual void init() override {}
34  virtual void step() override;
35 
36 protected:
37  virtual Real computeInitialDT() override;
38  virtual Real computeDT() override;
39  virtual Real computeFailedDT() override;
40 
43 
45  unsigned int & _current_step;
46 
48  std::vector<Real> & _time_sequence;
49 };
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:22
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)
std::vector< Real > & _time_sequence
stores the sequence of time points
virtual Real computeDT() override
Called to compute _current_dt for a normal step.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeInitialDT() override
Called to compute _current_dt for the first timestep.
Solves the PDEs at a sequence of given time points.
static InputParameters validParams()
const bool _use_last_dt_after_last_t
Whether to use the final dt past the last t in sequence.
virtual void step() override
Take a time step.
const InputParameters & parameters() const
Get the parameters of the object.