Opm::PIDAndIterationCountTimeStepControl Class Reference

#include <TimeStepControl.hpp>

Inheritance diagram for Opm::PIDAndIterationCountTimeStepControl:
Inheritance graph

Public Member Functions

 PIDAndIterationCountTimeStepControl (const int target_iterations=20, const double tol=1e-3, const boost::any &=boost::any(), const bool verbose=false)
 constructor More...
 
double computeTimeStepSize (const double dt, const int iterations, const SimulatorState &state) const
 
void initialize (const SimulatorState &state)
 

Protected Member Functions

template<class Iterator >
double euclidianNormSquared (Iterator it, const Iterator end, int num_components=1) const
 

Protected Attributes

const int target_iterations_
 
std::vector< double > p0_
 
std::vector< double > sat0_
 
const double tol_
 
std::vector< double > errors_
 
const bool verbose_
 

Detailed Description

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

Constructor & Destructor Documentation

Opm::PIDAndIterationCountTimeStepControl::PIDAndIterationCountTimeStepControl ( const int  target_iterations = 20,
const double  tol = 1e-3,
const boost::any &  = boost::any(),
const bool  verbose = false 
)

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) pinfo The information about the parallel information. Needed to compute parallel scalarproducts.
verboseif true get some output (default = false)

Member Function Documentation

double Opm::PIDAndIterationCountTimeStepControl::computeTimeStepSize ( const double  dt,
const int  iterations,
const SimulatorState state 
) const
virtual

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)
statenew solution state
Returns
suggested time step size for the next step

Reimplemented from Opm::PIDTimeStepControl.

template<class Iterator >
double Opm::PIDTimeStepControl::euclidianNormSquared ( Iterator  it,
const Iterator  end,
int  num_components = 1 
) const
inlineprotectedinherited
void Opm::PIDTimeStepControl::initialize ( const SimulatorState state)
virtualinherited

Parameters
statesimulation state before computing update in the solver (default is empty)

Reimplemented from Opm::TimeStepControlInterface.

Member Data Documentation

std::vector< double > Opm::PIDTimeStepControl::errors_
mutableprotectedinherited
std::vector<double> Opm::PIDTimeStepControl::p0_
mutableprotectedinherited
std::vector<double> Opm::PIDTimeStepControl::sat0_
mutableprotectedinherited
const int Opm::PIDAndIterationCountTimeStepControl::target_iterations_
protected
const double Opm::PIDTimeStepControl::tol_
protectedinherited
const bool Opm::PIDTimeStepControl::verbose_
protectedinherited

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