3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | List of all members
Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel > Class Template Reference

A simple ilu0 block diagonal preconditioner. More...

#include <dumux/linear/seqsolverbackend.hh>

Inheritance diagram for Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >:
Inheritance graph

Description

template<class M, class X, class Y, int blockLevel = 2>
class Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >

A simple ilu0 block diagonal preconditioner.

Public Types

using matrix_type = typename std::decay_t< M >
 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

template<class LOP , class Criterion , class SmootherArgs >
 BlockDiagAMGPreconditioner (const LOP &lop, const Criterion &c, const SmootherArgs &sa)
 Constructor. More...
 
void pre (X &v, Y &d) final
 Prepare the preconditioner. More...
 
void apply (X &v, const Y &d) final
 Apply one step of the preconditioner to the system A(v)=d. More...
 
void post (X &v) final
 Clean up. More...
 
Dune::SolverCategory::Category category () const final
 Category of the preconditioner (see SolverCategory::Category) More...
 

Member Typedef Documentation

◆ domain_type

template<class M , class X , class Y , int blockLevel = 2>
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::domain_type = X

The domain type of the preconditioner.

◆ field_type

template<class M , class X , class Y , int blockLevel = 2>
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::field_type = typename X::field_type

The field type of the preconditioner.

◆ matrix_type

template<class M , class X , class Y , int blockLevel = 2>
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::matrix_type = typename std::decay_t<M>

The matrix type the preconditioner is for.

◆ range_type

template<class M , class X , class Y , int blockLevel = 2>
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::range_type = Y

The range type of the preconditioner.

Constructor & Destructor Documentation

◆ BlockDiagAMGPreconditioner()

template<class M , class X , class Y , int blockLevel = 2>
template<class LOP , class Criterion , class SmootherArgs >
Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::BlockDiagAMGPreconditioner ( const LOP &  lop,
const Criterion &  c,
const SmootherArgs &  sa 
)
inline

Constructor.

Constructor gets all parameters to operate the prec.

Parameters
lopThe linear operator
cThe criterion
saThe smoother arguments

Member Function Documentation

◆ apply()

template<class M , class X , class Y , int blockLevel = 2>
void Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::apply ( X &  v,
const Y &  d 
)
inlinefinal

Apply one step of the preconditioner to the system A(v)=d.

On entry v=0 and d=b-A(x) (although this might not be computed in that way. On exit v contains the update, i.e one step computes \( v = M^{-1} d \) where \( M \) is the approximate inverse of the operator \( A \) characterizing the preconditioner.

Parameters
vThe update to be computed
dThe current defect.

◆ category()

template<class M , class X , class Y , int blockLevel = 2>
Dune::SolverCategory::Category Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::category ( ) const
inlinefinal

Category of the preconditioner (see SolverCategory::Category)

◆ post()

template<class M , class X , class Y , int blockLevel = 2>
void Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::post ( X &  v)
inlinefinal

Clean up.

This method is called after the last apply call for the linear system to be solved. Memory may be deallocated safely here. v is the solution of the linear equation.

Parameters
vThe right hand side of the equation.

◆ pre()

template<class M , class X , class Y , int blockLevel = 2>
void Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::pre ( X &  v,
Y &  d 
)
inlinefinal

Prepare the preconditioner.

A solver solves a linear operator equation A(v)=d by applying one or several steps of the preconditioner. The method pre() is called before the first apply operation. d and v are right hand side and solution vector of the linear system respectively. It may. e.g., scale the system, allocate memory or compute a (I)LU decomposition. Note: The ILU decomposition could also be computed in the constructor or with a separate method of the derived method if several linear systems with the same matrix are to be solved.

Parameters
vThe left hand side of the equation.
dThe right hand side of the equation.

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