Opm::CPRPreconditioner< M, X, Y, P > Class Template Reference

CPR preconditioner. More...

#include <CPRPreconditioner.hpp>

List of all members.

Public Types

enum  { category = std::is_same<P, overlapping }
typedef P ParallelInformation
 The type describing the parallel information.
typedef std::remove_const< M >
::type 
matrix_type
 The matrix type the preconditioner is for.
typedef X domain_type
 The domain type of the preconditioner.
typedef Y range_type
 The range type of the preconditioner.
typedef X::field_type field_type
 The field type of the preconditioner.
typedef
ISTLUtility::CPRSelector< M, X,
X, P > 
CPRSelectorType
typedef CPRSelectorType::Operator Operator
 Elliptic Operator.
typedef Dune::Preconditioner
< X, X > 
WholeSystemPreconditioner
 preconditioner for the whole system (here either ILU(0) or ILU(n)
typedef
CPRSelectorType::EllipticPreconditionerPointer 
EllipticPreconditionerPointer
 type of the unique pointer to the ilu-0 preconditioner used the for the elliptic system
typedef CPRSelectorType::AMG AMG
 amg preconditioner for the elliptic system

Public Member Functions

 CPRPreconditioner (const CPRParameter &param, const M &A, const M &Ae, const ParallelInformation &comm=ParallelInformation(), const ParallelInformation &commAe=ParallelInformation())
 Constructor.
virtual void pre (X &, Y &)
 Prepare the preconditioner.
virtual void apply (X &v, const Y &d)
 Apply the preconditoner.
virtual void post (X &)
 Clean up.

Protected Member Functions

void solveElliptic (Y &x, Y &de)
void createEllipticPreconditioner (const bool amg, const P &comm)

Protected Attributes

const CPRParameterparam_
 Parameter collection for CPR.
const matrix_typeA_
 The matrix for the full linear problem.
const matrix_typeAe_
 The elliptic part of the matrix.
de_
 temporary variables for elliptic solve
ve_
dmodified_
std::unique_ptr< OperatoropAe_
 elliptic operator
EllipticPreconditionerPointer precond_
 ILU0 preconditioner for the elliptic system.
std::unique_ptr< AMGamg_
 AMG preconditioner with ILU0 smoother.
std::shared_ptr
< WholeSystemPreconditioner
pre_
 The preconditioner for the whole system.
vilu_
 temporary variables for ILU solve
const P & comm_
 The information about the parallelization of the whole system.
const P & commAe_
 The information about the parallelization of the elliptic part of the system.

Detailed Description

template<class M, class X, class Y, class P = Dune::Amg::SequentialInformation>
class Opm::CPRPreconditioner< M, X, Y, P >

CPR preconditioner.

This is a two-stage preconditioner, combining an elliptic-type partial solution with ILU0 for the whole system.

Template Parameters:
M The matrix type to operate on
X Type of the update
Y Type of the defect
P Type of the parallel information. If not provided this will be Dune::Amg::SequentialInformation. The preconditioner is parallel if this is Dune::OwnerOverlapCopyCommunication<int,int>

Member Enumeration Documentation

template<class M , class X , class Y , class P = Dune::Amg::SequentialInformation>
anonymous enum
Enumerator:
category 

The category the preconditioner is part of.


Constructor & Destructor Documentation

template<class M , class X , class Y , class P = Dune::Amg::SequentialInformation>
Opm::CPRPreconditioner< M, X, Y, P >::CPRPreconditioner ( const CPRParameter param,
const M A,
const M Ae,
const ParallelInformation comm = ParallelInformation(),
const ParallelInformation commAe = ParallelInformation() 
) [inline]

Constructor.

Constructor gets all parameters to operate the prec.

Parameters:
A The matrix to operate on.
Ae The top-left elliptic part of A.
relax The ILU0 relaxation factor.
useAMG if true, AMG is used as a preconditioner for the elliptic sub-system, otherwise ilu-0 (default)
useBiCG if true, BiCG solver is used (default), otherwise CG solver
paralleInformation The information about the parallelization, if this is a parallel run

Member Function Documentation

template<class M , class X , class Y , class P = Dune::Amg::SequentialInformation>
virtual void Opm::CPRPreconditioner< M, X, Y, P >::apply ( X &  v,
const Y &  d 
) [inline, virtual]

Apply the preconditoner.

template<class M , class X , class Y , class P = Dune::Amg::SequentialInformation>
virtual void Opm::CPRPreconditioner< M, X, Y, P >::post ( X &   )  [inline, virtual]

Clean up.

template<class M , class X , class Y , class P = Dune::Amg::SequentialInformation>
virtual void Opm::CPRPreconditioner< M, X, Y, P >::pre ( X &  ,
Y &   
) [inline, virtual]

Prepare the preconditioner.


Member Data Documentation

template<class M , class X , class Y , class P = Dune::Amg::SequentialInformation>
std::shared_ptr< WholeSystemPreconditioner > Opm::CPRPreconditioner< M, X, Y, P >::pre_ [protected]

The preconditioner for the whole system.

We have to use a shared_ptr instead of a unique_ptr as we need to use a custom allocator based on dynamic information. But for unique_ptr the type of this deleter has to be available at coompile time.


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

Generated on 26 Mar 2018 by  doxygen 1.6.1