Opm::NewtonSolver< PhysicalModel > Class Template Reference

A Newton solver class suitable for general fully-implicit models. More...

#include <NewtonSolver.hpp>

Classes

struct  SolverParameters
 

Public Types

enum  RelaxType { DAMPEN, SOR }
 
typedef AutoDiffBlock< double > ADB
 
typedef ADB::V V
 
typedef ADB::M M
 
typedef
PhysicalModel::ReservoirState 
ReservoirState
 
typedef PhysicalModel::WellState WellState
 

Public Member Functions

 NewtonSolver (const SolverParameters &param, std::unique_ptr< PhysicalModel > model)
 
int step (const double dt, ReservoirState &reservoir_state, WellState &well_state)
 
unsigned int newtonIterations () const
 Number of Newton iterations used in all calls to step(). More...
 
unsigned int linearIterations () const
 Number of linear solver iterations used in all calls to step(). More...
 
unsigned int newtonIterationsLastStep () const
 Number of linear solver iterations used in the last call to step(). More...
 
unsigned int linearIterationsLastStep () const
 Number of linear solver iterations used in the last call to step(). More...
 

Detailed Description

template<class PhysicalModel>
class Opm::NewtonSolver< PhysicalModel >

A Newton solver class suitable for general fully-implicit models.

Member Typedef Documentation

template<class PhysicalModel >
typedef AutoDiffBlock<double> Opm::NewtonSolver< PhysicalModel >::ADB
template<class PhysicalModel >
typedef ADB::M Opm::NewtonSolver< PhysicalModel >::M
template<class PhysicalModel >
typedef PhysicalModel::ReservoirState Opm::NewtonSolver< PhysicalModel >::ReservoirState
template<class PhysicalModel >
typedef ADB::V Opm::NewtonSolver< PhysicalModel >::V
template<class PhysicalModel >
typedef PhysicalModel::WellState Opm::NewtonSolver< PhysicalModel >::WellState

Member Enumeration Documentation

template<class PhysicalModel >
enum Opm::NewtonSolver::RelaxType
Enumerator
DAMPEN 
SOR 

Constructor & Destructor Documentation

template<class PhysicalModel >
Opm::NewtonSolver< PhysicalModel >::NewtonSolver ( const SolverParameters param,
std::unique_ptr< PhysicalModel >  model 
)
explicit

Construct solver for a given model.

The model is a std::unique_ptr because the object to which model points to is not allowed to be deleted as long as the NewtonSolver object exists.

Parameters
[in]paramparameters controlling nonlinear Newton process
[in,out]modelphysical simulation model.

Member Function Documentation

template<class PhysicalModel >
unsigned int Opm::NewtonSolver< PhysicalModel >::linearIterations ( ) const

Number of linear solver iterations used in all calls to step().

template<class PhysicalModel >
unsigned int Opm::NewtonSolver< PhysicalModel >::linearIterationsLastStep ( ) const

Number of linear solver iterations used in the last call to step().

template<class PhysicalModel >
unsigned int Opm::NewtonSolver< PhysicalModel >::newtonIterations ( ) const

Number of Newton iterations used in all calls to step().

template<class PhysicalModel >
unsigned int Opm::NewtonSolver< PhysicalModel >::newtonIterationsLastStep ( ) const

Number of linear solver iterations used in the last call to step().

template<class PhysicalModel >
int Opm::NewtonSolver< PhysicalModel >::step ( const double  dt,
ReservoirState reservoir_state,
WellState well_state 
)

Take a single forward step, after which the states will be modified according to the physical model.

Parameters
[in]dttime step size
[in]reservoir_statereservoir state variables
[in]well_statewell state variables
Returns
number of linear iterations used

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