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

General 3rd order controller. More...

#include <TimeStepControl.hpp>

Inheritance diagram for Opm::General3rdOrderController:
Opm::TimeStepControlInterface

Public Member Functions

 General3rdOrderController (const double tolerance=1e-3, const double safetyFactor=0.8, const bool verbose=false)
 
double computeTimeStepSize (const double dt, const int, const RelativeChangeInterface &relativeChange, const AdaptiveSimulatorTimer &substepTimer) const override
 compute new time step size suggestions based on the PID controller
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const General3rdOrderController &) const
 
- Public Member Functions inherited from Opm::TimeStepControlInterface
virtual ~TimeStepControlInterface ()
 virtual destructor (empty)
 

Static Public Member Functions

static General3rdOrderController serializationTestObject ()
 

Static Public Attributes

static constexpr TimeStepControlType Type = TimeStepControlType::General3rdOrder
 

Protected Attributes

const double tolerance_ = 1e-3
 
const double safetyFactor_ = 0.8
 
std::vector< doubleerrors_ {}
 
std::vector< doubletimeSteps_ {}
 
int counterSinceFailure_ = 0
 
const bool verbose_ = false
 

Detailed Description

General 3rd order controller.

Member Function Documentation

◆ computeTimeStepSize()

double Opm::General3rdOrderController::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: