|
dune-istl
2.11
|
Sequential DILU preconditioner. More...
#include <dune/istl/preconditioners.hh>

Public Types | |
| using | matrix_type = M |
| The matrix type the preconditioner is for. More... | |
| using | block_type = typename matrix_type::block_type |
| block type of matrix 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... | |
| using | scalar_field_type = Simd::Scalar< field_type > |
| scalar type underlying the field_type More... | |
| using | real_field_type = typename FieldTraits< scalar_field_type >::real_type |
| real scalar type underlying the field_type More... | |
Public Member Functions | |
| SeqDILU (const M &A, real_field_type w) | |
| Constructor. More... | |
| SeqDILU (const std::shared_ptr< const AssembledLinearOperator< M, X, Y >> &A, const ParameterTree &configuration) | |
| Constructor. More... | |
| SeqDILU (const M &A, const ParameterTree &config) | |
| Constructor. More... | |
| void | pre ([[maybe_unused]] X &x, [[maybe_unused]] Y &b) override |
| Prepare the preconditioner. More... | |
| void | apply (X &v, const Y &d) override |
| Apply the preconditioner. More... | |
| void | post ([[maybe_unused]] X &x) override |
| Clean up. More... | |
| SolverCategory::Category | category () const override |
| Category of the preconditioner (see SolverCategory::Category) More... | |
| virtual void | pre (X &x, Y &b)=0 |
| Prepare the preconditioner. More... | |
| virtual void | post (X &x)=0 |
| Clean up. More... | |
Protected Attributes | |
| std::vector< block_type > | Dinv_ |
| const M & | _A_ |
| The matrix we operate on. More... | |
| const real_field_type | _w |
| The relaxation factor to use. More... | |
| const bool | wNotIdentity_ |
| true if w != 1.0 More... | |
Sequential DILU preconditioner.
Wraps the naked ISTL generic DILU preconditioner into the solver framework.
The Diagonal Incomplete LU factorization (DILU) is a simplified variant of the ILU(0) factorization, where only the diagonal elements are factorised. This preconditioner can be written as
M = (D + L_A) D^{-1} (D + U_A),
where L_A and U_A are the strictly lower and upper parts of A and D is the diagonal matrix containing the generated pivot values. The matrix M has the property
diag(A) = diag(M) = diag((D + L_A) D^{-1} (D + U_A)) = diag(D + L_A D^{-1} U_A)
such that the diagonal matrix D can be constructed:
D_11 = A_11 D_22 = A22 - L_A_{21} D_{11}^{-1} U_A_{12} and etc.
Note that when applying the preconditioner, M is never explicitly created but instead a lower and upper triangualr solve is performed using the values of A and D^-1. When applying the preconditioner, we are working with the residual d = b - Ax and update v = x_{n+1} - x_n, such that:
v = M^{-1} d = (D + U_A)^{-1} D (D + L_A)^{-1} d
define y = (D + L_A)^{-1} d
lower triangular solve: (D + L_A) y = d upper triangular solve: (D + U_A) v = D y
This means that the preconditioner only requires an additional storage of the diagonal matrix D^{-1}
For more details, see: R. Barrett et al., "Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods", 1994. Available from: https://www.netlib.org/templates/templates.pdf
| 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. |
| using Dune::SeqDILU< M, X, Y, l >::block_type = typename matrix_type::block_type |
block type of matrix
| using Dune::SeqDILU< M, X, Y, l >::domain_type = X |
The domain type of the preconditioner.
| using Dune::SeqDILU< M, X, Y, l >::field_type = typename X::field_type |
The field type of the preconditioner.
| using Dune::SeqDILU< M, X, Y, l >::matrix_type = M |
The matrix type the preconditioner is for.
| using Dune::SeqDILU< M, X, Y, l >::range_type = Y |
The range type of the preconditioner.
| using Dune::SeqDILU< M, X, Y, l >::real_field_type = typename FieldTraits<scalar_field_type>::real_type |
real scalar type underlying the field_type
| using Dune::SeqDILU< M, X, Y, l >::scalar_field_type = Simd::Scalar<field_type> |
scalar type underlying the field_type
|
inline |
Constructor.
Constructor invoking DILU gets all parameters to operate the prec.
| A | The matrix to operate on. |
| w | The relaxation factor. |
|
inline |
Constructor.
| A | The assembled linear operator to use. |
| configuration | ParameterTree containing preconditioner parameters. |
| ParameterTree Key | Meaning — |
|---|---|
| relaxation | The relaxation factor. default=1.0 |
See ISTL_Factory for the ParameterTree layout and examples.
|
inline |
Constructor.
| A | The matrix to operate on. |
| config | ParameterTree containing preconditioner parameters. |
| ParameterTree Key | Meaning – |
|---|---|
| relaxation | The relaxation factor. default=1.0 |
See ISTL_Factory for the ParameterTree layout and examples.
|
inlineoverridevirtual |
Apply the preconditioner.
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
where
is the approximate inverse of the operator
characterizing the preconditioner.
| [out] | v | The update to be computed |
| d | The current defect. |
Implements Dune::Preconditioner< X, Y >.
|
inlineoverridevirtual |
Category of the preconditioner (see SolverCategory::Category)
Implements Dune::Preconditioner< X, Y >.
|
pure virtualinherited |
Clean up.
This method is called after the last apply call for the linear system to be solved. Memory may be deallocated safely here. x is the solution of the linear equation.
| x | The right hand side of the equation. |
Implemented in Dune::BlockPreconditioner< X, Y, C, P >, Dune::NonoverlappingBlockPreconditioner< C, P >, Dune::Amg::KAMG< M, X, S, PI, K, A >, Dune::Amg::AMG< M, X, S, PI, A >, Dune::Amg::AMG< Operator, X, Smoother >, and Dune::Amg::FastAMG< M, X, PI, A >.
|
inlineoverride |
Clean up.
Clean up. This method is called after the last apply call for the linear system to be solved. Memory may be deallocated safely here. x is the solution of the linear equation.
| x | The right hand side of the equation. |
|
pure virtualinherited |
Prepare the preconditioner.
A solver solves a linear operator equation A(x)=b by applying one or several steps of the preconditioner. The method pre() is called before the first apply operation. b and x 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.
| x | The left hand side of the equation. |
| b | The right hand side of the equation. |
Implemented in Dune::BlockPreconditioner< X, Y, C, P >, Dune::NonoverlappingBlockPreconditioner< C, P >, Dune::Amg::KAMG< M, X, S, PI, K, A >, Dune::Amg::AMG< M, X, S, PI, A >, Dune::Amg::AMG< Operator, X, Smoother >, and Dune::Amg::FastAMG< M, X, PI, A >.
|
inlineoverride |
Prepare the preconditioner.
Prepare the preconditioner. A solver solves a linear operator equation A(x)=b by applying one or several steps of the preconditioner. The method pre() is called before the first apply operation. b and x 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.
| x | The left hand side of the equation. |
| b | The right hand side of the equation. |
|
protected |
The matrix we operate on.
|
protected |
The relaxation factor to use.
|
protected |
|
protected |
true if w != 1.0
1.8.14