Opm::cuistl::CuJac< M, X, Y, l > Class Template Reference

Jacobi preconditioner on the GPU. More...

#include <CuJac.hpp>

Inheritance diagram for Opm::cuistl::CuJac< M, X, Y, l >:
Inheritance graph

Public Types

using matrix_type = typename std::remove_const< M >::type
 The matrix type the preconditioner is for. More...
 
using domain_type = X
 The domain type of the preconditioner. More...
 
using range_type = Y
 The range type of the preconditioner. More...
 
using field_type = typename X::field_type
 The field type of the preconditioner. More...
 

Public Member Functions

 CuJac (const M &A, field_type w)
 Constructor. More...
 
virtual void pre (X &x, Y &b) override
 Prepare the preconditioner. More...
 
virtual void apply (X &v, const Y &d) override
 Apply the preconditoner. More...
 
virtual void post (X &x) override
 Post processing. More...
 
virtual Dune::SolverCategory::Category category () const override
 Category of the preconditioner (see SolverCategory::Category) More...
 
virtual void update () override
 Updates the matrix data. More...
 

Static Public Member Functions

static constexpr bool shouldCallPre ()
 
static constexpr bool shouldCallPost ()
 

Detailed Description

template<class M, class X, class Y, int l = 1>
class Opm::cuistl::CuJac< M, X, Y, l >

Jacobi preconditioner on the GPU.

Note
This is a fast but weak preconditioner
Template Parameters
MThe matrix type to operate on
XType of the update
YType of the defect
lIgnored. Just there to have the same number of template arguments as other preconditioners.
Note
We assume X and Y are both CuVector<real_type>, but we leave them as template arguments in case of future additions.

Member Typedef Documentation

◆ domain_type

template<class M , class X , class Y , int l = 1>
using Opm::cuistl::CuJac< M, X, Y, l >::domain_type = X

The domain type of the preconditioner.

◆ field_type

template<class M , class X , class Y , int l = 1>
using Opm::cuistl::CuJac< M, X, Y, l >::field_type = typename X::field_type

The field type of the preconditioner.

◆ matrix_type

template<class M , class X , class Y , int l = 1>
using Opm::cuistl::CuJac< M, X, Y, l >::matrix_type = typename std::remove_const<M>::type

The matrix type the preconditioner is for.

◆ range_type

template<class M , class X , class Y , int l = 1>
using Opm::cuistl::CuJac< M, X, Y, l >::range_type = Y

The range type of the preconditioner.

Constructor & Destructor Documentation

◆ CuJac()

template<class M , class X , class Y , int l = 1>
Opm::cuistl::CuJac< M, X, Y, l >::CuJac ( const M &  A,
field_type  w 
)

Constructor.

Constructor gets all parameters to operate the prec.

Parameters
AThe matrix to operate on.
wThe relaxation factor.

Member Function Documentation

◆ apply()

template<class M , class X , class Y , int l = 1>
virtual void Opm::cuistl::CuJac< M, X, Y, l >::apply ( X &  v,
const Y &  d 
)
overridevirtual

Apply the preconditoner.

◆ category()

template<class M , class X , class Y , int l = 1>
virtual Dune::SolverCategory::Category Opm::cuistl::CuJac< M, X, Y, l >::category ( ) const
overridevirtual

Category of the preconditioner (see SolverCategory::Category)

◆ post()

template<class M , class X , class Y , int l = 1>
virtual void Opm::cuistl::CuJac< M, X, Y, l >::post ( X &  x)
overridevirtual

Post processing.

Note
Does nothing at the moment

◆ pre()

template<class M , class X , class Y , int l = 1>
virtual void Opm::cuistl::CuJac< M, X, Y, l >::pre ( X &  x,
Y &  b 
)
overridevirtual

Prepare the preconditioner.

Note
Does nothing at the time being.

◆ shouldCallPost()

template<class M , class X , class Y , int l = 1>
static constexpr bool Opm::cuistl::CuJac< M, X, Y, l >::shouldCallPost ( )
inlinestaticconstexpr
Returns
false

◆ shouldCallPre()

template<class M , class X , class Y , int l = 1>
static constexpr bool Opm::cuistl::CuJac< M, X, Y, l >::shouldCallPre ( )
inlinestaticconstexpr
Returns
false

◆ update()

template<class M , class X , class Y , int l = 1>
virtual void Opm::cuistl::CuJac< M, X, Y, l >::update ( )
overridevirtual

Updates the matrix data.

Implements Dune::PreconditionerWithUpdate< X, Y >.


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