www.mooseframework.org
FunctionDT.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 #include "FunctionInterface.h"
14 #include "LinearInterpolation.h"
15 
16 class Function;
17 
19 {
20 public:
22 
24 
25  virtual void init() override;
26 
27  virtual void postStep() override;
28 
29 protected:
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 
49 
52 
53  std::vector<Real> _time_knots;
54 };
Base class for function objects.
Definition: Function.h:37
std::unique_ptr< LinearInterpolation > _time_ipol
Piecewise linear definition of time stepping.
Definition: FunctionDT.h:45
bool _use_function
true, if we are using _function, false if we are using _time_ipol
Definition: FunctionDT.h:39
std::vector< Real > _time_knots
Definition: FunctionDT.h:53
Base class for time stepping.
Definition: TimeStepper.h:22
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::vector< Real > & _time_t
Definition: FunctionDT.h:35
bool _interpolate
Whether or not to interpolate DT between times.
Definition: FunctionDT.h:51
virtual void postStep() override
Definition: FunctionDT.C:169
void removeOldKnots()
Definition: FunctionDT.C:109
virtual void init() override
Initialize the time stepper.
Definition: FunctionDT.C:103
static InputParameters validParams()
Definition: FunctionDT.C:18
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
virtual Real computeDT() override
Called to compute _current_dt for a normal step.
Definition: FunctionDT.C:123
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
Get the parameters of the object.
virtual Real computeInitialDT() override
Called to compute _current_dt for the first timestep.
Definition: FunctionDT.C:117
Real _min_dt
Definition: FunctionDT.h:48
Real _growth_factor
Definition: FunctionDT.h:47
FunctionDT(const InputParameters &parameters)
Definition: FunctionDT.C:41
Interface for objects that need to use functions.
const std::vector< Real > & _time_dt
Definition: FunctionDT.h:36