Loading...
Searching...
No Matches
Opm::NonlinearSolver< TypeTag, PhysicalModel > Class Template Reference

A nonlinear solver class suitable for general fully-implicit models, as well as pressure, transport and sequential models. More...

`#include <NonlinearSolver.hpp>`

## Public Types

using | SolverParameters = NonlinearSolverParameters<Scalar>

## Public Member Functions

| NonlinearSolver (const SolverParameters &param, std::unique_ptr< PhysicalModel > model)
| Construct solver for a given model.
SimulatorReportSingle | step (const SimulatorTimerInterface &timer, const TimeStepControlInterface *timeStepControl)
const SimulatorReportSingle & | failureReport () const
| return the statistics if the step() method failed
int | linearizations () const
| Number of linearizations used in all calls to step().
int | nonlinearIterations () const
| Number of full nonlinear solver iterations used in all calls to step().
int | linearIterations () const
| Number of linear solver iterations used in all calls to step().
int | wellIterations () const
| Number of well iterations used in all calls to step().
int | nonlinearIterationsLastStep () const
| Number of nonlinear solver iterations used in the last call to step().
int | linearIterationsLastStep () const
| Number of linear solver iterations used in the last call to step().
int | wellIterationsLastStep () const
| Number of well iterations used in all calls to step().
std::vector< std::vector< Scalar > > | computeFluidInPlace (const std::vector< int > &fipnum) const
const PhysicalModel & | model () const
| Reference to physical model.
PhysicalModel & | model ()
| Mutable reference to physical model.
void | detectOscillations (const std::vector< std::vector< Scalar > > &residualHistory, const int it, bool &oscillate, bool &stagnate) const
| Detect oscillation or stagnation in a given residual history.
template<class BVector>
void | stabilizeNonlinearUpdate (BVector &dx, BVector &dxOld, const Scalar omega) const
| Apply a stabilization to dx, depending on dxOld and relaxation parameters.
Scalar | relaxMax () const
| The greatest relaxation factor (i.e. smallest factor) allowed.
Scalar | relaxIncrement () const
| The step-change size for the relaxation factor.
NonlinearRelaxType | relaxType () const
| The relaxation type (Dampen or SOR).
Scalar | relaxRelTol () const
| The relaxation relative tolerance.
void | setParameters (const SolverParameters &param)
| Set parameters to override those given at construction time.

## Detailed Description

template<class TypeTag, class PhysicalModel>
class Opm::NonlinearSolver< TypeTag, PhysicalModel >

A nonlinear solver class suitable for general fully-implicit models, as well as pressure, transport and sequential models.

## Constructor & Destructor Documentation

## NonlinearSolver()

template<class TypeTag, class PhysicalModel>

Opm::NonlinearSolver< TypeTag, PhysicalModel >::NonlinearSolver | ( | const SolverParameters & | param,
|  | std::unique_ptr< PhysicalModel > | model )

inline

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 NonlinearSolver object exists.

Parameters

  [in] | param | parameters controlling nonlinear process
  [in,out] | model | physical simulation model.

## Member Function Documentation

## stabilizeNonlinearUpdate()

template<class TypeTag, class PhysicalModel>
template<class BVector>

void Opm::NonlinearSolver< TypeTag, PhysicalModel >::stabilizeNonlinearUpdate | ( | BVector & | dx,
|  | BVector & | dxOld,
|  | const Scalar | omega ) const

inline

Apply a stabilization to dx, depending on dxOld and relaxation parameters.

Implemention for Dune block vectors.

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

- opm/simulators/flow/NonlinearSolver.hpp