3#ifndef DUNE_ISTL_PRECONDITIONERS_HH
4#define DUNE_ISTL_PRECONDITIONERS_HH
12#include <dune/common/unused.hh>
66 template<
class O,
int c>
68 public Preconditioner<typename O::domain_type, typename O::range_type>
100 inverse_operator_.apply(v, copy,
res);
126 template<
class M,
class X,
class Y,
int l=1>
152 : _A_(A), _n(n), _w(
w)
176 for (
int i=0; i<_n; i++) {
214 template<
class M,
class X,
class Y,
int l=1>
240 : _A_(A), _n(n), _w(
w)
274 template<
bool forward>
278 for (
int i=0; i<_n; i++) {
282 for (
int i=0; i<_n; i++) {
317 template<
class M,
class X,
class Y,
int l=1>
343 : _A_(A), _n(n), _w(
w)
366 for (
int i=0; i<_n; i++) {
401 template<
class M,
class X,
class Y,
int l=1>
427 : _A_(A), _n(n), _w(
w)
450 for (
int i=0; i<_n; i++) {
487 template<
class M,
class X,
class Y,
int l=1>
571 template<
class M,
class X,
class Y,
int l=1>
597 : ILU(A.N(),A.M(),M::row_wise)
655 template<
class X,
class Y>
Simple iterative methods like Jacobi, Gauss-Seidel, SOR, SSOR, etc. in a generic way.
Some handy generic functions for ISTL matrices.
Define general, extensible interface for inverse operators.
void bsorb(const M &A, X &x, const Y &b, const K &w)
SSOR step.
Definition gsetc.hh:591
void dbjac(const M &A, X &x, const Y &b, const K &w)
Jacobi step.
Definition gsetc.hh:603
void dbgs(const M &A, X &x, const Y &b, const K &w)
GS step.
Definition gsetc.hh:567
void bilu_backsolve(const M &A, X &v, const Y &d)
LU backsolve with stored inverse.
Definition ilu.hh:96
void bilu_decomposition(const M &A, int n, M &ILU)
Definition ilu.hh:156
void bilu0_decomposition(M &A)
compute ILU decomposition of A. A is overwritten by its decomposition
Definition ilu.hh:35
void bsorf(const M &A, X &x, const Y &b, const K &w)
SOR step.
Definition gsetc.hh:579
Definition basearray.hh:19
Statistics about compression achieved in implicit mode.
Definition bcrsmatrix.hh:81
static void check(const Matrix &mat)
Check whether the a matrix has diagonal values on blocklevel recursion levels.
Definition matrixutils.hh:88
Base class for matrix free definition of preconditioners.
Definition preconditioner.hh:26
Turns an InverseOperator into a Preconditioner.
Definition preconditioners.hh:69
O::range_type range_type
The range type of the preconditioner.
Definition preconditioners.hh:74
void apply(domain_type &v, const range_type &d)
Apply one step of the preconditioner to the system A(v)=d.
Definition preconditioners.hh:96
O::domain_type domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:72
range_type::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:76
InverseOperator2Preconditioner(InverseOperator &inverse_operator)
Construct the preconditioner from the solver.
Definition preconditioners.hh:89
O InverseOperator
Definition preconditioners.hh:77
void pre(domain_type &, range_type &)
Prepare the preconditioner.
Definition preconditioners.hh:93
@ category
The category the preconditioner is part of.
Definition preconditioners.hh:82
void post(domain_type &)
Clean up.
Definition preconditioners.hh:103
Sequential SSOR preconditioner.
Definition preconditioners.hh:127
virtual void post(X &x)
Clean up.
Definition preconditioners.hh:187
SeqSSOR(const M &A, int n, field_type w)
Constructor.
Definition preconditioners.hh:151
X::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:136
X domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:132
@ category
The category the preconditioner is part of.
Definition preconditioners.hh:141
M matrix_type
The matrix type the preconditioner is for.
Definition preconditioners.hh:130
virtual void apply(X &v, const Y &d)
Apply the preconditioner.
Definition preconditioners.hh:174
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition preconditioners.hh:162
Y range_type
The range type of the preconditioner.
Definition preconditioners.hh:134
Sequential SOR preconditioner.
Definition preconditioners.hh:215
M matrix_type
The matrix type the preconditioner is for.
Definition preconditioners.hh:218
void apply(X &v, const Y &d)
Apply the preconditioner in a special direction.
Definition preconditioners.hh:275
SeqSOR(const M &A, int n, field_type w)
Constructor.
Definition preconditioners.hh:239
X domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:220
virtual void post(X &x)
Clean up.
Definition preconditioners.hh:292
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition preconditioners.hh:250
@ category
The category the preconditioner is part of.
Definition preconditioners.hh:229
virtual void apply(X &v, const Y &d)
Apply the preconditioner.
Definition preconditioners.hh:261
Y range_type
The range type of the preconditioner.
Definition preconditioners.hh:222
X::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:224
Sequential Gauss Seidel preconditioner.
Definition preconditioners.hh:318
virtual void post(X &x)
Clean up.
Definition preconditioners.hh:376
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition preconditioners.hh:353
SeqGS(const M &A, int n, field_type w)
Constructor.
Definition preconditioners.hh:342
Y range_type
The range type of the preconditioner.
Definition preconditioners.hh:325
X::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:327
virtual void apply(X &v, const Y &d)
Apply the preconditioner.
Definition preconditioners.hh:364
M matrix_type
The matrix type the preconditioner is for.
Definition preconditioners.hh:321
X domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:323
The sequential jacobian preconditioner.
Definition preconditioners.hh:402
virtual void post(X &x)
Clean up.
Definition preconditioners.hh:460
virtual void apply(X &v, const Y &d)
Apply the preconditioner.
Definition preconditioners.hh:448
M matrix_type
The matrix type the preconditioner is for.
Definition preconditioners.hh:405
X::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:411
SeqJac(const M &A, int n, field_type w)
Constructor.
Definition preconditioners.hh:426
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition preconditioners.hh:437
X domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:407
Y range_type
The range type of the preconditioner.
Definition preconditioners.hh:409
Sequential ILU0 preconditioner.
Definition preconditioners.hh:488
virtual void post(X &x)
Clean up.
Definition preconditioners.hh:545
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition preconditioners.hh:523
virtual void apply(X &v, const Y &d)
Apply the preconditoner.
Definition preconditioners.hh:534
SeqILU0(const M &A, field_type w)
Constructor.
Definition preconditioners.hh:511
Y range_type
The range type of the preconditioner.
Definition preconditioners.hh:495
X domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:493
X::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:497
std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition preconditioners.hh:491
Sequential ILU(n) preconditioner.
Definition preconditioners.hh:572
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition preconditioners.hh:609
std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition preconditioners.hh:575
virtual void post(X &x)
Clean up.
Definition preconditioners.hh:631
SeqILUn(const M &A, int n, field_type w)
Constructor.
Definition preconditioners.hh:596
X domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:577
Y range_type
The range type of the preconditioner.
Definition preconditioners.hh:579
virtual void apply(X &v, const Y &d)
Apply the precondioner.
Definition preconditioners.hh:620
X::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:581
Richardson preconditioner.
Definition preconditioners.hh:656
X::field_type field_type
The field type of the preconditioner.
Definition preconditioners.hh:663
Y range_type
The range type of the preconditioner.
Definition preconditioners.hh:661
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition preconditioners.hh:686
Richardson(field_type w=1.0)
Constructor.
Definition preconditioners.hh:676
virtual void post(X &x)
Clean up.
Definition preconditioners.hh:708
X domain_type
The domain type of the preconditioner.
Definition preconditioners.hh:659
virtual void apply(X &v, const Y &d)
Apply the precondioner.
Definition preconditioners.hh:697
Statistics about the application of an inverse operator.
Definition solver.hh:32
Abstract base class for all solvers.
Definition solver.hh:79
@ sequential
Category for sequential solvers.
Definition solvercategory.hh:21