#include <TimeStepControl.hpp>

Inheritance diagram for Opm::SimpleIterationCountTimeStepControl:
Inheritance graph

Public Member Functions

 SimpleIterationCountTimeStepControl ()=default
 
 SimpleIterationCountTimeStepControl (const int target_iterations, const double decayrate, const double growthrate, const bool verbose=false)
 constructor More...
 
double computeTimeStepSize (const double dt, const int iterations, const RelativeChangeInterface &, const AdaptiveSimulatorTimer &) const override
 
bool timeStepAccepted (const double, const double) const override
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const SimpleIterationCountTimeStepControl &) const
 

Static Public Member Functions

static SimpleIterationCountTimeStepControl serializationTestObject ()
 

Static Public Attributes

static constexpr TimeStepControlType Type = TimeStepControlType::SimpleIterationCount
 

Protected Attributes

const int target_iterations_ = 0
 
const double decayrate_ = 0.0
 
const double growthrate_ = 0.0
 
const bool verbose_ = false
 

Detailed Description

A simple iteration count based adaptive time step control.

Constructor & Destructor Documentation

◆ SimpleIterationCountTimeStepControl() [1/2]

Opm::SimpleIterationCountTimeStepControl::SimpleIterationCountTimeStepControl ( )
default

◆ SimpleIterationCountTimeStepControl() [2/2]

Opm::SimpleIterationCountTimeStepControl::SimpleIterationCountTimeStepControl ( const int  target_iterations,
const double  decayrate,
const double  growthrate,
const bool  verbose = false 
)

constructor

Parameters
target_iterationsnumber of desired iterations (e.g. Newton iterations) per time step in one time step
verboseif true get some output (default = false)

Member Function Documentation

◆ computeTimeStepSize()

double Opm::SimpleIterationCountTimeStepControl::computeTimeStepSize ( const double  dt,
const int  iterations,
const RelativeChangeInterface ,
const AdaptiveSimulatorTimer  
) 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.

◆ operator==()

bool Opm::SimpleIterationCountTimeStepControl::operator== ( const SimpleIterationCountTimeStepControl ) const

◆ serializationTestObject()

static SimpleIterationCountTimeStepControl Opm::SimpleIterationCountTimeStepControl::serializationTestObject ( )
static

◆ serializeOp()

template<class Serializer >
void Opm::SimpleIterationCountTimeStepControl::serializeOp ( Serializer &  serializer)
inline

◆ timeStepAccepted()

bool Opm::SimpleIterationCountTimeStepControl::timeStepAccepted ( const double  error,
const double  timeStepJustCompleted 
) const
inlineoverridevirtual

For the general 3rd order controller, the internal shifting of errors and time steps happens here, and hence this method needs to be called for (after) each time step

Implements Opm::TimeStepControlInterface.

Member Data Documentation

◆ decayrate_

const double Opm::SimpleIterationCountTimeStepControl::decayrate_ = 0.0
protected

Referenced by serializeOp().

◆ growthrate_

const double Opm::SimpleIterationCountTimeStepControl::growthrate_ = 0.0
protected

Referenced by serializeOp().

◆ target_iterations_

const int Opm::SimpleIterationCountTimeStepControl::target_iterations_ = 0
protected

Referenced by serializeOp().

◆ Type

constexpr TimeStepControlType Opm::SimpleIterationCountTimeStepControl::Type = TimeStepControlType::SimpleIterationCount
staticconstexpr

◆ verbose_

const bool Opm::SimpleIterationCountTimeStepControl::verbose_ = false
protected

Referenced by serializeOp().


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