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

Sequential ILU0 preconditioner on the GPU through the CuSparse library. More...

`#include <GpuSeqILU0.hpp>`

Inheritance diagram for Opm::gpuistl::GpuSeqILU0< M, X, Y, l >:

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

## Public Member Functions

template<typename T = M, typename std::enable_if_t< is_gpu_matrix_v< T >, int > = 0>
| GpuSeqILU0 (const M &A, field_type w)
| Constructor.
template<typename T = M, typename std::enable_if_t<!is_gpu_matrix_v< T >, int > = 0>
| GpuSeqILU0 (const M &A, field_type w)
| Constructor.
virtual void | pre (X &x, Y &b) override
| Prepare the preconditioner.
virtual void | apply (X &v, const Y &d) override
| Apply the preconditoner.
virtual void | post (X &x) override
| Post processing.
virtual Dune::SolverCategory::Category | category () const override
| Category of the preconditioner (see SolverCategory::Category).
virtual void | update () override
| Updates the matrix data.
virtual bool | hasPerfectUpdate () const override

## 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::GpuSeqILU0< M, X, Y, l >

Sequential ILU0 preconditioner on the GPU through the CuSparse library.

This implementation calls the CuSparse functions, which in turn essentially does a level decomposition to get some parallelism.

Note
  This is not expected to be a fast preconditioner.

Template Parameters

  M | The matrix type to operate on
  X | Type of the update
  Y | Type of the defect
  l | Ignored. 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

## GpuSeqILU0() [1/2]

template<class M, class X, class Y, int l>
template<typename T, typename std::enable_if_t< is_gpu_matrix_v< T >, int >>

Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::GpuSeqILU0 | ( | const M & | A,
|  | field_type | w )

Constructor.

Constructor gets all parameters to operate the prec.

Parameters

  A | The matrix to operate on.
  w | The relaxation factor.

## GpuSeqILU0() [2/2]

template<class M, class X, class Y, int l = 1>
template<typename T = M, typename std::enable_if_t<!is_gpu_matrix_v< T >, int > = 0>

Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::GpuSeqILU0 | ( | const M & | A,
|  | field_type | w )

Constructor.

Constructor gets all parameters to operate the prec.

Parameters

  A | The matrix to operate on.
  w | The relaxation factor.

## Member Function Documentation

## hasPerfectUpdate()

template<class M, class X, class Y, int l = 1>

virtual bool Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::hasPerfectUpdate | ( |  | ) | const

inline override virtual

Implements Dune::PreconditionerWithUpdate< X, Y >.

## post()

template<class M, class X, class Y, int l>

void Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::post | ( | X & | x | ) |

override virtual

Post processing.

Note
  Does nothing at the moment

## pre()

template<class M, class X, class Y, int l>

void Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::pre | ( | X & | x,
|  | Y & | b )

override virtual

Prepare the preconditioner.

Note
  Does nothing at the time being.

## shouldCallPost()

template<class M, class X, class Y, int l = 1>

constexpr bool Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::shouldCallPost | ( |  | ) |

inline static constexpr

Returns
  false

## shouldCallPre()

template<class M, class X, class Y, int l = 1>

constexpr bool Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::shouldCallPre | ( |  | ) |

inline static constexpr

Returns
  false

## update()

template<class M, class X, class Y, int l>

void Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::update | ( |  | ) |

override virtual

Updates the matrix data.

Implements Dune::PreconditionerWithUpdate< X, Y >.

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

- opm/simulators/linalg/gpuistl/GpuSeqILU0.hpp
- opm/simulators/linalg/gpuistl/GpuSeqILU0.cpp