A simple ilu0 block diagonal preconditioner. More...
#include <dumux/linear/seqsolverbackend.hh>
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... | |
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::domain_type = X |
The domain type of the preconditioner.
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::field_type = typename X::field_type |
The field type of the preconditioner.
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::matrix_type = typename std::decay_t<M> |
The matrix type the preconditioner is for.
using Dumux::BlockDiagAMGPreconditioner< M, X, Y, blockLevel >::range_type = Y |
The range type of the preconditioner.
|
inline |
Constructor.
Constructor gets all parameters to operate the prec.
lop | The linear operator |
c | The criterion |
sa | The smoother arguments |
|
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.
v | The update to be computed |
d | The current defect. |
|
inlinefinal |
Category of the preconditioner (see SolverCategory::Category)
|
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.
v | The right hand side of the equation. |
|
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.
v | The left hand side of the equation. |
d | The right hand side of the equation. |