This class solves the fully implicit black-oil system by solving the reduced system (after eliminating well variables) as a block-structured matrix (one block for all cell variables) for a fixed number of cell variables np . More...
#include <ISTLSolver.hpp>
Public Types | |
typedef Dune::AssembledLinearOperator < Matrix, Vector, Vector > | AssembledLinearOperatorType |
typedef NewtonIterationBlackoilInterface::SolutionVector | SolutionVector |
Return type for linearSolve(). A simple, non-ad vector type. | |
typedef ParallelOverlappingILU0 < Dune::BCRSMatrix < Dune::MatrixBlock< typename Matrix::field_type, Matrix::block_type::rows, Matrix::block_type::cols > >, Vector, Vector > | SeqPreconditioner |
Public Member Functions | |
ISTLSolver (const NewtonIterationBlackoilInterleavedParameters ¶m, const boost::any ¶llelInformation_arg=boost::any()) | |
Construct a system solver. | |
ISTLSolver (const ParameterGroup ¶m, const boost::any ¶llelInformation_arg=boost::any()) | |
Construct a system solver. | |
SolutionVector | computeNewtonIncrement (const LinearisedBlackoilResidual &) const |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself. | |
int | iterations () const |
Solve the system of linear equations Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself. | |
const boost::any & | parallelInformation () const |
template<int category = Dune::SolverCategory::sequential, class LinearOperator , class POrComm > | |
void | constructPreconditionerAndSolve (LinearOperator &linearOperator, Vector &x, Vector &istlb, const POrComm ¶llelInformation_arg, Dune::InverseOperatorResult &result) const |
construct the CPR preconditioner and the solver. | |
template<class Operator > | |
std::unique_ptr < SeqPreconditioner > | constructPrecond (Operator &opA, const Dune::Amg::SequentialInformation &) const |
template<class LinearOperator , class MatrixOperator , class POrComm , class AMG > | |
void | constructAMGPrecond (LinearOperator &, const POrComm &comm, std::unique_ptr< AMG > &amg, std::unique_ptr< MatrixOperator > &opA, const double relax) const |
template<class MatrixOperator , class POrComm , class AMG > | |
void | constructAMGPrecond (MatrixOperator &opA, const POrComm &comm, std::unique_ptr< AMG > &amg, std::unique_ptr< MatrixOperator > &, const double relax) const |
template<class Operator , class ScalarProd , class Precond > | |
void | solve (Operator &opA, Vector &x, Vector &istlb, ScalarProd &sp, Precond &precond, Dune::InverseOperatorResult &result) const |
Solve the system using the given preconditioner and scalar product. | |
void | solve (Matrix &A, Vector &x, Vector &b) const |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself. | |
template<class Operator , class Comm > | |
void | solve (Operator &opA, Vector &x, Vector &b, Comm &comm) const |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself. | |
template<class Operator > | |
void | solve (Operator &opA, Vector &x, Vector &b) const |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself. | |
void | checkConvergence (const Dune::InverseOperatorResult &result) const |
Protected Attributes | |
int | iterations_ |
boost::any | parallelInformation_ |
bool | isIORank_ |
NewtonIterationBlackoilInterleavedParameters | parameters_ |
This class solves the fully implicit black-oil system by solving the reduced system (after eliminating well variables) as a block-structured matrix (one block for all cell variables) for a fixed number of cell variables np .
MatrixBlockType | The type of the matrix block used. | |
VectorBlockType | The type of the vector block used. | |
pressureIndex | The index of the pressure component in the vector vector block. It is used to guide the AMG coarsening. Default is zero. |
Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::ISTLSolver | ( | const NewtonIterationBlackoilInterleavedParameters & | param, | |
const boost::any & | parallelInformation_arg = boost::any() | |||
) | [inline] |
Construct a system solver.
[in] | param | parameters controlling the behaviour of the linear solvers |
[in] | parallelInformation | In the case of a parallel run with dune-istl the information about the parallelization. |
Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::ISTLSolver | ( | const ParameterGroup & | param, | |
const boost::any & | parallelInformation_arg = boost::any() | |||
) | [inline] |
Construct a system solver.
[in] | param | ParameterGroup controlling the behaviour of the linear solvers |
[in] | parallelInformation | In the case of a parallel run with dune-istl the information about the parallelization. |
SolutionVector Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::computeNewtonIncrement | ( | const LinearisedBlackoilResidual & | residual | ) | const [inline, virtual] |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself.
[in] | residual | residual object containing A and b. |
Implements Opm::NewtonIterationBlackoilInterface.
void Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::constructPreconditionerAndSolve | ( | LinearOperator & | linearOperator, | |
Vector & | x, | |||
Vector & | istlb, | |||
const POrComm & | parallelInformation_arg, | |||
Dune::InverseOperatorResult & | result | |||
) | const [inline] |
construct the CPR preconditioner and the solver.
P | The type of the parallel information. |
parallelInformation | the information about the parallelization. |
int Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::iterations | ( | ) | const [inline, virtual] |
Solve the system of linear equations Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself.
[in] | residual | residual object containing A and b. |
Implements Opm::NewtonIterationBlackoilInterface.
const boost::any& Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::parallelInformation | ( | ) | const [inline, virtual] |
Get the information about the parallelization of the grid.
Implements Opm::NewtonIterationBlackoilInterface.
void Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::solve | ( | Operator & | opA, | |
Vector & | x, | |||
Vector & | b | |||
) | const [inline] |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself.
[in] | A | matrix A |
inout] | x solution to be computed x | |
[in] | b | right hand side b |
void Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::solve | ( | Operator & | opA, | |
Vector & | x, | |||
Vector & | b, | |||
Comm & | comm | |||
) | const [inline] |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself.
[in] | A | matrix A |
inout] | x solution to be computed x | |
[in] | b | right hand side b |
void Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::solve | ( | Matrix & | A, | |
Vector & | x, | |||
Vector & | b | |||
) | const [inline] |
Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself.
[in] | A | matrix A |
inout] | x solution to be computed x | |
[in] | b | right hand side b |