www.mooseframework.org
SolutionTimeAdaptiveDT.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 SOLUTIONTIMEADAPTIVEDT_H
16 #define SOLUTIONTIMEADAPTIVEDT_H
17 
18 #include "TimeStepper.h"
19 
20 #include <fstream>
21 
23 
24 template <>
26 
31 {
32 public:
34  virtual ~SolutionTimeAdaptiveDT();
35 
36  virtual void step() override;
37 
38  virtual void rejectStep() override;
39 
40 protected:
41  virtual Real computeInitialDT() override;
42  virtual Real computeDT() override;
43 
48  short _direction;
49 
52 
55 
57  bool _adapt_log;
58 
60  std::ofstream _adaptive_log;
61 };
62 
63 #endif /* SOLUTIONTIMEADAPTIVEDT_H */
Real _percent_change
Percentage to change the timestep by either way.
Real _older_sol_time_vs_dt
Ratios to control whether to increase or decrease the current timestep.
bool _adapt_log
Boolean to control whether a separate adapt log is written to a file.
Base class for time stepping.
Definition: TimeStepper.h:31
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::ofstream _adaptive_log
The filehandle to hold the log.
virtual Real computeDT() override
Called to compute _current_dt for a normal step.
short _direction
Multiplier specifying the direction the timestep is currently going.
SolutionTimeAdaptiveDT(const InputParameters &parameters)
virtual Real computeInitialDT() override
Called to compute _current_dt for the first timestep.
virtual void rejectStep() override
This gets called when time step is rejected.
InputParameters validParams< SolutionTimeAdaptiveDT >()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual void step() override
Take a time step.