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

List of all members.

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 &param, const boost::any &parallelInformation_arg=boost::any())
 Construct a system solver.
 ISTLSolver (const ParameterGroup &param, const boost::any &parallelInformation_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 &parallelInformation_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_

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:
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.

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] 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.
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] 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.

Member Function Documentation

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

Parameters:
[in] residual residual 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:
P The type of the parallel information.
Parameters:
parallelInformation the information about the parallelization.
template<class MatrixBlockType, class VectorBlockType, int pressureIndex = 0>
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.

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

Implements Opm::NewtonIterationBlackoilInterface.

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

Get the information about the parallelization of the grid.

Implements Opm::NewtonIterationBlackoilInterface.

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] A matrix A
inout] x solution to be computed x
[in] b right 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] A matrix A
inout] x solution to be computed x
[in] b right hand side b
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] A matrix A
inout] x solution to be computed x
[in] b right hand side b

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

Generated on 26 Mar 2018 by  doxygen 1.6.1