https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ConstantDT.C
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#include "ConstantDT.h"
11
13
16{
18 params.addRequiredParam<Real>("dt", "Size of the time step");
19
20 // The addRangeCheckedParam and addClassDescription are used in MOOSE documentation, if you
21 // change the order or insert something you will mess it up.
22 params.addRangeCheckedParam<Real>(
23 "growth_factor",
24 2,
25 "growth_factor>=1",
26 "Maximum ratio of new to previous timestep sizes following a step that required the time"
27 " step to be cut due to a failed solve.");
28 params.addClassDescription("Timestepper that takes a constant time step size");
29
30 return params;
31}
32
34 : TimeStepper(parameters),
35 _constant_dt(getParam<Real>("dt")),
36 _growth_factor(getParam<Real>("growth_factor"))
37{
38}
39
40Real
45
46Real
registerMooseObject("MooseApp", ConstantDT)
virtual Real computeDT() override
Computes time step size after the initial time step.
Definition ConstantDT.C:47
const Real _constant_dt
Definition ConstantDT.h:26
ConstantDT(const InputParameters &parameters)
Definition ConstantDT.C:33
static InputParameters validParams()
Definition ConstantDT.C:15
const Real _growth_factor
Definition ConstantDT.h:27
virtual Real computeInitialDT() override
Computes time step size for the initial time step.
Definition ConstantDT.C:41
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
Base class for time stepping.
Definition TimeStepper.h:23
static InputParameters validParams()
Definition TimeStepper.C:16
Real getCurrentDT()
Get the current_dt.
Definition TimeStepper.h:85