https://mooseframework.inl.gov
SolutionTimeAdaptiveDT.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
14 #include <fstream>
15 
20 {
21 public:
23 
25  virtual ~SolutionTimeAdaptiveDT();
26 
27  virtual void step() override;
28 
29  virtual void rejectStep() override;
30 
31 protected:
32  virtual Real computeInitialDT() override;
33  virtual Real computeDT() override;
34 
39  short _direction;
40 
43 
46 
48  bool _adapt_log;
49 
51  std::ofstream _adaptive_log;
52 };
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:22
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
std::ofstream _adaptive_log
The filehandle to hold the log.
virtual Real computeDT() override
Computes time step size after the initial time step.
short _direction
Multiplier specifying the direction the timestep is currently going.
SolutionTimeAdaptiveDT(const InputParameters &parameters)
virtual Real computeInitialDT() override
Computes time step size for the initial time step.
virtual void rejectStep() override
This gets called when time step is rejected.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
Get the parameters of the object.
virtual void step() override
Take a time step.