https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PseudoTimestep.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// MOOSE includes
14
19{
20public:
23
24 virtual void execute() override;
25 virtual void initialize() override;
27 virtual Real getValue() const override;
28
32 {
33 SER,
34 RDM,
35 EXP
36 };
37
38protected:
41
43 const Real _initial_dt;
44 const Real _alpha;
45
47 unsigned int _iterations_window;
48
50 bool _bound;
51
53 Real _max_dt;
54
56 Real _dt;
57
59 std::vector<Real> & _residual_norms_sequence;
60 std::vector<Real> & _iterations_step_sequence;
61
63 Real currentResidualNorm() const;
64
66 Real timestepSER() const;
67
69 Real timestepEXP() const;
70
72 Real timestepRDM() const;
73
75 void outputPseudoTimestep(Real curr_dt) const;
76};
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
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
virtual PostprocessorValue getValue() const =0
This will get called to actually grab the final value the postprocessor has calculated.
Computes a time step size based on pseudo-timestep continuation.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const Real _initial_dt
Required parameters for the pseudotimestepper.
Real _dt
Transient pseudotimestep.
const Real _alpha
Real timestepSER() const
implementation of SER method
PseudotimeMethod
Enum class containing the different options for selecting the timestep size for pseudo-transient simu...
const PseudotimeMethod _method
The timestep selection method.
Real timestepRDM() const
implementation of RDM method
Real currentResidualNorm() const
Computes the norm of the non-time dependent residual.
bool _bound
Boolean to check if an upper bound was provided.
void outputPseudoTimestep(Real curr_dt) const
Outputs the status of the residual and timestep at the end of time step.
virtual void execute() override
Execute method.
Real _max_dt
Upper bound on timestep.
std::vector< Real > & _iterations_step_sequence
static InputParameters validParams()
unsigned int _iterations_window
Number of iterations over which the residual can be lagged.
std::vector< Real > & _residual_norms_sequence
arrays for storing residual and iterations sequence
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
Real timestepEXP() const
implementation of EXP method