My Project
Loading...
Searching...
No Matches
Opm::gpuistl::GpuDILU< M, X, Y, l > Class Template Reference

DILU preconditioner on the GPU. More...

#include <GpuDILU.hpp>

Inheritance diagram for Opm::gpuistl::GpuDILU< M, X, Y, l >:
Dune::PreconditionerWithUpdate< X, Y >

Public Types

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

Public Member Functions

 GpuDILU (const M &A, bool splitMatrix, bool tuneKernels)
 Constructor.
 
void pre (X &x, Y &b) override
 Prepare the preconditioner.
 
void apply (X &v, const Y &d) override
 Apply the preconditoner.
 
void post (X &x) override
 Post processing.
 
Dune::SolverCategory::Category category () const override
 Category of the preconditioner (see SolverCategory::Category)
 
void update () final
 Updates the matrix data.
 
void computeDiagAndMoveReorderedData (int moveThreadBlockSize, int factorizationThreadBlockSize)
 Compute the diagonal of the DILU, and update the data of the reordered matrix.
 
void tuneThreadBlockSizes ()
 function that will experimentally tune the thread block sizes of the important cuda kernels
 
virtual bool hasPerfectUpdate () const override
 
- Public Member Functions inherited from Dune::PreconditionerWithUpdate< X, Y >

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::gpuistl::GpuDILU< M, X, Y, l >

DILU preconditioner on the GPU.

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 GpuVector<real_type>, but we leave them as template arguments in case of future additions.

Constructor & Destructor Documentation

◆ GpuDILU()

template<class M , class X , class Y , int l>
Opm::gpuistl::GpuDILU< M, X, Y, l >::GpuDILU ( const M & A,
bool splitMatrix,
bool tuneKernels )
explicit

Constructor.

Constructor gets all parameters to operate the prec.

Parameters
AThe matrix to operate on.
wThe relaxation factor.

Member Function Documentation

◆ hasPerfectUpdate()

template<class M , class X , class Y , int l = 1>
virtual bool Opm::gpuistl::GpuDILU< M, X, Y, l >::hasPerfectUpdate ( ) const
inlineoverridevirtual

◆ post()

template<class M , class X , class Y , int l>
void Opm::gpuistl::GpuDILU< M, X, Y, l >::post ( X & x)
override

Post processing.

Note
Does nothing at the moment

◆ pre()

template<class M , class X , class Y , int l>
void Opm::gpuistl::GpuDILU< M, X, Y, l >::pre ( X & x,
Y & b )
override

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::gpuistl::GpuDILU< M, X, Y, l >::shouldCallPost ( )
inlinestaticconstexpr
Returns
false

◆ shouldCallPre()

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

◆ update()

template<class M , class X , class Y , int l>
void Opm::gpuistl::GpuDILU< M, X, Y, l >::update ( )
finalvirtual

Updates the matrix data.

Implements Dune::PreconditionerWithUpdate< X, Y >.


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