https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FunctionDT.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#include "FunctionInterface.h"
14#include "LinearInterpolation.h"
15
16class Function;
17
19{
20public:
22
24
25 virtual void init() override;
26
27 virtual void postStep() override;
28
29protected:
30 virtual Real computeInitialDT() override;
31 virtual Real computeDT() override;
32
33 void removeOldKnots();
34
35 const std::vector<Real> & _time_t;
36 const std::vector<Real> & _time_dt;
37
43
45 std::unique_ptr<LinearInterpolation> _time_ipol;
46
48 Real _min_dt;
49
52
53 std::vector<Real> _time_knots;
54};
std::unique_ptr< LinearInterpolation > _time_ipol
Piecewise linear definition of time stepping.
Definition FunctionDT.h:45
const Function * _function
The time-dependent function specifying the time step size (turn this into a reference then time_t and...
Definition FunctionDT.h:42
bool _use_function
true, if we are using _function, false if we are using _time_ipol
Definition FunctionDT.h:39
const std::vector< Real > & _time_t
Definition FunctionDT.h:35
virtual Real computeDT() override
Computes time step size after the initial time step.
Definition FunctionDT.C:123
const std::vector< Real > & _time_dt
Definition FunctionDT.h:36
virtual Real computeInitialDT() override
Computes time step size for the initial time step.
Definition FunctionDT.C:117
virtual void postStep() override
Definition FunctionDT.C:169
bool _interpolate
Whether or not to interpolate DT between times.
Definition FunctionDT.h:51
Real _growth_factor
Definition FunctionDT.h:47
static InputParameters validParams()
Definition FunctionDT.C:18
virtual void init() override
Initialize the time stepper.
Definition FunctionDT.C:103
std::vector< Real > _time_knots
Definition FunctionDT.h:53
Real _min_dt
Definition FunctionDT.h:48
void removeOldKnots()
Definition FunctionDT.C:109
Interface for objects that need to use functions.
Base class for function objects.
Definition Function.h:30
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Base class for time stepping.
Definition TimeStepper.h:23