My Project
Loading...
Searching...
No Matches
Opm::PIDAndIterationCountTimeStepControl Class Reference

PID controller based adaptive time step control as above that also takes an target iteration into account. More...

#include <TimeStepControl.hpp>

Inheritance diagram for Opm::PIDAndIterationCountTimeStepControl:
Opm::PIDTimeStepControl Opm::TimeStepControlInterface

Public Member Functions

 PIDAndIterationCountTimeStepControl (const int target_iterations=20, const double decayDampingFactor=1.0, const double growthDampingFactor=1.0/1.2, const double tol=1e-3, const double minTimeStepBasedOnIterations=0., const bool verbose=false)
 constructor
 
double computeTimeStepSize (const double dt, const int iterations, const RelativeChangeInterface &relativeChange, const AdaptiveSimulatorTimer &) const override
 compute new time step size suggestions based on the PID controller
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const PIDAndIterationCountTimeStepControl &) const
 
- Public Member Functions inherited from Opm::PIDTimeStepControl
 PIDTimeStepControl (const double tol=1e-3, const bool verbose=false)
 constructor
 
double computeTimeStepSize (const double dt, const int, const RelativeChangeInterface &relativeChange, const AdaptiveSimulatorTimer &) const override
 compute new time step size suggestions based on the PID controller
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const PIDTimeStepControl &) const
 
- Public Member Functions inherited from Opm::TimeStepControlInterface
virtual ~TimeStepControlInterface ()
 virtual destructor (empty)
 

Static Public Member Functions

static PIDAndIterationCountTimeStepControl serializationTestObject ()
 
- Static Public Member Functions inherited from Opm::PIDTimeStepControl
static PIDTimeStepControl serializationTestObject ()
 

Static Public Attributes

static constexpr TimeStepControlType Type = TimeStepControlType::PIDAndIterationCount
 
- Static Public Attributes inherited from Opm::PIDTimeStepControl
static constexpr TimeStepControlType Type = TimeStepControlType::PID
 

Protected Attributes

const int target_iterations_
 
const double decayDampingFactor_
 
const double growthDampingFactor_
 
const double minTimeStepBasedOnIterations_
 
- Protected Attributes inherited from Opm::PIDTimeStepControl
const double tol_ = 1e-3
 
std::vector< doubleerrors_ {}
 
const bool verbose_ = false
 

Detailed Description

PID controller based adaptive time step control as above that also takes an target iteration into account.

Constructor & Destructor Documentation

◆ PIDAndIterationCountTimeStepControl()

Opm::PIDAndIterationCountTimeStepControl::PIDAndIterationCountTimeStepControl ( const int  target_iterations = 20,
const double  decayDampingFactor = 1.0,
const double  growthDampingFactor = 1.0/1.2,
const double  tol = 1e-3,
const double  minTimeStepBasedOnIterations = 0.,
const bool  verbose = false 
)
explicit

constructor

Parameters
target_iterationsnumber of desired iterations per time step
toltolerance for the relative changes of the numerical solution to be accepted in one time step (default is 1e-3)
verboseif true get some output (default = false)

Member Function Documentation

◆ computeTimeStepSize()

double Opm::PIDAndIterationCountTimeStepControl::computeTimeStepSize ( const double  dt,
const int  iterations,
const RelativeChangeInterface relativeChange,
const AdaptiveSimulatorTimer substepTimer 
) const
overridevirtual

compute new time step size suggestions based on the PID controller

Parameters
dttime step size used in the current step
iterationsnumber of iterations used (linear/nonlinear)
timeErrorobject to compute || u^n+1 - u^n || / || u^n+1 ||
Returns
suggested time step size for the next step

Implements Opm::TimeStepControlInterface.


The documentation for this class was generated from the following files: