All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex > Class Template Reference

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>

Inheritance diagram for Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >:
Opm::NewtonIterationBlackoilInterface

Public Types

typedef
Dune::AssembledLinearOperator
< Matrix, Vector, Vector > 
AssembledLinearOperatorType
 
typedef
NewtonIterationBlackoilInterface::SolutionVector 
SolutionVector
 
typedef
ParallelOverlappingILU0
< Dune::BCRSMatrix
< Dune::MatrixBlock< typename
Matrix::field_type,
Matrix::block_type::rows,
Matrix::block_type::cols >
>, Vector, Vector > 
SeqPreconditioner
 
- Public Types inherited from Opm::NewtonIterationBlackoilInterface
typedef
LinearisedBlackoilResidual::ADB::V 
SolutionVector
 Return type for linearSolve(). A simple, non-ad vector type.
 

Public Member Functions

 ISTLSolver (const NewtonIterationBlackoilInterleavedParameters &param, const boost::any &parallelInformation_arg=boost::any())
 Construct a system solver. More...
 
 ISTLSolver (const ParameterGroup &param, const boost::any &parallelInformation_arg=boost::any())
 Construct a system solver. More...
 
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. More...
 
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. More...
 
const boost::any & parallelInformation () const
 Get the information about the parallelization of the grid. More...
 
template<int category = Dune::SolverCategory::sequential, class LinearOperator , class POrComm >
void constructPreconditionerAndSolve (LinearOperator &linearOperator, Vector &x, Vector &istlb, const POrComm &parallelInformation_arg, Dune::InverseOperatorResult &result) const
 construct the CPR preconditioner and the solver. More...
 
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. More...
 
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. More...
 
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. More...
 
void checkConvergence (const Dune::InverseOperatorResult &result) const
 

Protected Attributes

int iterations_
 
boost::any parallelInformation_
 
bool isIORank_
 
NewtonIterationBlackoilInterleavedParameters parameters_
 

Detailed Description

template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
class Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >

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 .

Template Parameters
MatrixBlockTypeThe type of the matrix block used.
VectorBlockTypeThe type of the vector block used.
pressureIndexThe index of the pressure component in the vector vector block. It is used to guide the AMG coarsening. Default is zero.

Constructor & Destructor Documentation

template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::ISTLSolver ( const NewtonIterationBlackoilInterleavedParameters param,
const boost::any &  parallelInformation_arg = boost::any() 
)
inline

Construct a system solver.

Parameters
[in]paramparameters controlling the behaviour of the linear solvers
[in]parallelInformationIn the case of a parallel run with dune-istl the information about the parallelization.
template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::ISTLSolver ( const ParameterGroup &  param,
const boost::any &  parallelInformation_arg = boost::any() 
)
inline

Construct a system solver.

Parameters
[in]paramParameterGroup controlling the behaviour of the linear solvers
[in]parallelInformationIn the case of a parallel run with dune-istl the information about the parallelization.

Member Function Documentation

template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
SolutionVector Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::computeNewtonIncrement ( const LinearisedBlackoilResidual residual) const
inlinevirtual

Solve the linear system Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself.

Parameters
[in]residualresidual object containing A and b.
Returns
the solution x

Implements Opm::NewtonIterationBlackoilInterface.

template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
template<int category = Dune::SolverCategory::sequential, class LinearOperator , class POrComm >
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.

Template Parameters
PThe type of the parallel information.
Parameters
parallelInformationthe information about the parallelization.
template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
int Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::iterations ( ) const
inlinevirtual

Solve the system of linear equations Ax = b, with A being the combined derivative matrix of the residual and b being the residual itself.

Parameters
[in]residualresidual object containing A and b.
Returns
the solution x
number of linear iterations used during last call of computeNewtonIncrement

Implements Opm::NewtonIterationBlackoilInterface.

template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
const boost::any& Opm::ISTLSolver< MatrixBlockType, VectorBlockType, pressureIndex >::parallelInformation ( ) const
inlinevirtual

Get the information about the parallelization of the grid.

Implements Opm::NewtonIterationBlackoilInterface.

template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
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.

Parameters
[in]Amatrix A
[in,out]xsolution to be computed x
[in]bright hand side b
template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
template<class Operator , class Comm >
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.

Parameters
[in]Amatrix A
[in,out]xsolution to be computed x
[in]bright hand side b
template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
template<class Operator >
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.

Parameters
[in]Amatrix A
[in,out]xsolution to be computed x
[in]bright hand side b

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