Loading...
Searching...
No Matches
Opm::SimpleIterationCountTimeStepControl Class Reference

A simple iteration count based adaptive time step control. More...

`#include <TimeStepControl.hpp>`

Inheritance diagram for Opm::SimpleIterationCountTimeStepControl:

## Public Member Functions

| SimpleIterationCountTimeStepControl (const int target_iterations, const double decayrate, const double growthrate, const bool verbose)
| constructor
double | computeTimeStepSize (const double dt, const int iterations, const RelativeChangeInterface &, const AdaptiveSimulatorTimer &) const override
| compute new time step size suggestions based on the PID controller
bool | timeStepAccepted (const double, const double) const override
| 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.
template<class Serializer>
void | serializeOp (Serializer &serializer)
bool | operator== (const SimpleIterationCountTimeStepControl &) const
Public Member Functions inherited from Opm::TimeStepControlInterface
virtual | ~TimeStepControlInterface ()
| virtual destructor (empty)

## 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()

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

constructor

Parameters

  target_iterations | number of desired iterations (e.g. Newton iterations) per time step in one time step
  decayrate | decayrate of time step when target iterations are not met (should be <= 1)
  growthrate | growthrate of time step when target iterations are not met (should be >= 1)
  verbose | if true, get some output

## Member Function Documentation

## computeTimeStepSize()

double Opm::SimpleIterationCountTimeStepControl::computeTimeStepSize | ( | const double | dt,
|  | const int | iterations,
|  | const RelativeChangeInterface & | ,
|  | const AdaptiveSimulatorTimer & | ) const

override virtual

compute new time step size suggestions based on the PID controller

Parameters

  dt | time step size used in the current step
  iterations | number of iterations used (linear/nonlinear)
  relativeChange | Relative change handler
  substepTimer | Sub step timer

Returns
  suggested time step size for the next step

Implements Opm::TimeStepControlInterface.

## timeStepAccepted()

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

inline override virtual

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.

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

- opm/simulators/timestepping/TimeStepControl.hpp
- opm/simulators/timestepping/TimeStepControl.cpp