3#ifndef DUNE_ISTL_SCHWARZ_HH
4#define DUNE_ISTL_SCHWARZ_HH
13#include <dune/common/timer.hh>
74 template<
class M,
class X,
class Y,
class C>
114 : _A_(A), communication(
com)
122 communication.project(
y);
130 communication.project(
y);
162 template<
class X,
class C>
207 return communication.norm(x);
214 template<
class X,
class C>
252 template<
class M,
class X,
class Y,
class C>
282 : _A_(A), _n(n), _w(
w), communication(c)
292 communication.copyOwnerToAll(x,x);
302 for (
int i=0; i<_n; i++) {
306 communication.copyOwnerToAll(v,v);
329 template<
class T>
class ConstructionTraits;
355 template<
class X,
class Y,
class C,
class T=Preconditioner<X,Y> >
391 : preconditioner(p), communication(c)
401 communication.copyOwnerToAll(x,x);
402 preconditioner.pre(x,b);
412 preconditioner.apply(v,
d);
413 communication.copyOwnerToAll(v,v);
416 template<
bool forward>
420 communication.copyOwnerToAll(v,v);
430 preconditioner.post(x);
Implementation of the BCRSMatrix class.
This file implements a vector space as a tensor product of a given vector space. The number of compon...
Simple iterative methods like Jacobi, Gauss-Seidel, SOR, SSOR, etc. in a generic way.
Some generic functions for pretty printing vectors and matrices.
Define general, extensible interface for operators. The available implementation wraps a matrix.
Classes providing communication interfaces for overlapping Schwarz methods.
Define general preconditioner interface.
Define base class for scalar product and norm.
Implementations of the inverse operator interface.
void bsorb(const M &A, X &x, const Y &b, const K &w)
SSOR step.
Definition gsetc.hh:591
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
Traits class for generically constructing non default constructable types.
Definition construction.hh:38
A linear operator exporting itself in matrix form.
Definition operators.hh:94
An overlapping schwarz operator.
Definition schwarz.hh:76
virtual const matrix_type & getmat() const
get the sequential assembled linear operator.
Definition schwarz.hh:135
virtual void applyscaleadd(field_type alpha, const X &x, Y &y) const
apply operator to x, scale and add:
Definition schwarz.hh:127
virtual void apply(const X &x, Y &y) const
apply operator to x:
Definition schwarz.hh:118
@ category
The solver category.
Definition schwarz.hh:103
C communication_type
The type of the communication object.
Definition schwarz.hh:99
X domain_type
The type of the domain.
Definition schwarz.hh:87
M matrix_type
The type of the matrix we operate on.
Definition schwarz.hh:82
Y range_type
The type of the range.
Definition schwarz.hh:92
X::field_type field_type
The field type of the range.
Definition schwarz.hh:94
OverlappingSchwarzOperator(const matrix_type &A, const communication_type &com)
constructor: just store a reference to a matrix.
Definition schwarz.hh:113
Base class for matrix free definition of preconditioners.
Definition preconditioner.hh:26
Base class for scalar product and norm computation.
Definition scalarproducts.hh:44
Choose the approriate scalar product for a solver category.
Definition scalarproducts.hh:77
@ solverCategory
The solver category.
Definition scalarproducts.hh:83
Scalar product for overlapping schwarz methods.
Definition schwarz.hh:164
@ category
Definition schwarz.hh:181
FieldTraits< field_type >::real_type real_type
Definition schwarz.hh:173
C communication_type
The type of the communication object.
Definition schwarz.hh:178
virtual real_type norm(const X &x)
Norm of a right-hand side vector. The vector must be consistent on the interior+border partition.
Definition schwarz.hh:205
virtual field_type dot(const X &x, const X &y)
Dot product of two vectors. It is assumed that the vectors are consistent on the interior+border part...
Definition schwarz.hh:195
X domain_type
The type of the vector to compute the scalar product on.
Definition schwarz.hh:170
X::field_type field_type
The field type used by the vector type domain_type.
Definition schwarz.hh:172
OverlappingSchwarzScalarProduct(const communication_type &com)
Constructor needs to know the grid.
Definition schwarz.hh:187
C communication_type
The type of the communication object to use.
Definition schwarz.hh:220
OverlappingSchwarzScalarProduct< X, C > ScalarProduct
The type of the scalar product for the overlapping case.
Definition schwarz.hh:218
static ScalarProduct * construct(const communication_type &comm)
Definition schwarz.hh:227
A parallel SSOR preconditioner.
Definition schwarz.hh:253
X::field_type field_type
The field type of the preconditioner.
Definition schwarz.hh:262
C communication_type
The type of the communication object.
Definition schwarz.hh:264
ParSSOR(const matrix_type &A, int n, field_type w, const communication_type &c)
Constructor.
Definition schwarz.hh:281
virtual void post(X &x)
Clean up.
Definition schwarz.hh:314
X domain_type
The domain type of the preconditioner.
Definition schwarz.hh:258
Y range_type
The range type of the preconditioner.
Definition schwarz.hh:260
M matrix_type
The matrix type the preconditioner is for.
Definition schwarz.hh:256
@ category
The category the precondtioner is part of.
Definition schwarz.hh:269
virtual void apply(X &v, const Y &d)
Apply the precondtioner.
Definition schwarz.hh:300
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition schwarz.hh:290
Block parallel preconditioner.
Definition schwarz.hh:356
X domain_type
The domain type of the preconditioner.
Definition schwarz.hh:363
Y range_type
The range type of the preconditioner.
Definition schwarz.hh:368
BlockPreconditioner(T &p, const communication_type &c)
Constructor.
Definition schwarz.hh:390
C communication_type
The type of the communication object..
Definition schwarz.hh:375
virtual void post(X &x)
Clean up.
Definition schwarz.hh:428
void apply(X &v, const Y &d)
Apply one step of the preconditioner to the system A(v)=d.
Definition schwarz.hh:417
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition schwarz.hh:399
@ category
The category the precondtioner is part of.
Definition schwarz.hh:380
X::field_type field_type
The field type of the preconditioner.
Definition schwarz.hh:370
virtual void apply(X &v, const Y &d)
Apply the preconditioner.
Definition schwarz.hh:410
Categories for the solvers.
Definition solvercategory.hh:18
@ overlapping
Category for overlapping solvers.
Definition solvercategory.hh:25