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>
75 class OverlappingSchwarzOperator :
public AssembledLinearOperator<M,X,Y>
109 : _A_(A), communication(com)
113 virtual void apply (
const X& x, Y& y)
const 117 communication.project(y);
125 communication.project(y);
130 virtual const matrix_type&
getmat ()
const 142 const matrix_type& _A_;
143 const communication_type& communication;
165 template<
class M,
class X,
class Y,
class C>
188 ParSSOR (
const matrix_type& A,
int n, field_type w,
const communication_type& c)
189 : _A_(A), _n(n), _w(w), communication(c)
197 virtual void pre (X& x, Y& b)
199 communication.copyOwnerToAll(x,x);
207 virtual void apply (X& v,
const Y& d)
209 for (
int i=0; i<_n; i++) {
213 communication.copyOwnerToAll(v,v);
231 const matrix_type& _A_;
237 const communication_type& communication;
242 template<
class T>
class ConstructionTraits;
268 template<
class X,
class Y,
class C,
class T=Preconditioner<X,Y> >
298 : preconditioner(p), communication(c)
306 virtual void pre (X& x, Y& b)
308 communication.copyOwnerToAll(x,x);
309 preconditioner.pre(x,b);
317 virtual void apply (X& v,
const Y& d)
319 preconditioner.apply(v,d);
320 communication.copyOwnerToAll(v,v);
323 template<
bool forward>
326 preconditioner.template apply<forward>(v,d);
327 communication.copyOwnerToAll(v,v);
337 preconditioner.post(x);
351 const communication_type& communication;
void bsorb(const M &A, X &x, const Y &b, const K &w)
SSOR step.
Definition: gsetc.hh:591
virtual void apply(X &v, const Y &d)
Apply the precondtioner.
Definition: schwarz.hh:207
Definition: allocator.hh:7
C communication_type
The type of the communication object.
Definition: schwarz.hh:177
Traits class for generically constructing non default constructable types.
Definition: novlpschwarz.hh:247
Category for overlapping solvers.
Definition: solvercategory.hh:27
Some generic functions for pretty printing vectors and matrices.
Simple iterative methods like Jacobi, Gauss-Seidel, SOR, SSOR, etc. in a generic way.
C communication_type
The type of the communication object.
Definition: schwarz.hh:99
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition: schwarz.hh:306
This file implements a vector space as a tensor product of a given vector space. The number of compon...
X::field_type field_type
The field type of the range.
Definition: schwarz.hh:94
Define base class for scalar product and norm.
virtual SolverCategory::Category category() const
Category of the preconditioner (see SolverCategory::Category)
Definition: schwarz.hh:341
virtual void post(X &x)
Clean up.
Definition: schwarz.hh:335
X domain_type
The type of the domain.
Definition: schwarz.hh:87
Implementations of the inverse operator interface.
M matrix_type
The matrix type the preconditioner is for.
Definition: schwarz.hh:169
X domain_type
The domain type of the preconditioner.
Definition: schwarz.hh:276
Define general preconditioner interface.
Implementation of the BCRSMatrix class.
Block parallel preconditioner.
Definition: schwarz.hh:269
X domain_type
The domain type of the preconditioner.
Definition: schwarz.hh:171
virtual void apply(const X &x, Y &y) const
apply operator to x:
Definition: schwarz.hh:113
Define general, extensible interface for operators. The available implementation wraps a matrix...
Y range_type
The type of the range.
Definition: schwarz.hh:92
M matrix_type
The type of the matrix we operate on.
Definition: schwarz.hh:82
virtual void post(X &x)
Clean up.
Definition: schwarz.hh:221
Y range_type
The range type of the preconditioner.
Definition: schwarz.hh:281
X::field_type field_type
The field type of the preconditioner.
Definition: schwarz.hh:175
Category
Definition: solvercategory.hh:21
virtual SolverCategory::Category category() const
Category of the linear operator (see SolverCategory::Category)
Definition: schwarz.hh:136
virtual SolverCategory::Category category() const
Category of the preconditioner (see SolverCategory::Category)
Definition: schwarz.hh:224
X::field_type field_type
The field type of the preconditioner.
Definition: schwarz.hh:283
virtual void applyscaleadd(field_type alpha, const X &x, Y &y) const
apply operator to x, scale and add:
Definition: schwarz.hh:122
OverlappingSchwarzOperator(const matrix_type &A, const communication_type &com)
constructor: just store a reference to a matrix.
Definition: schwarz.hh:108
BlockPreconditioner(T &p, const communication_type &c)
Constructor.
Definition: schwarz.hh:297
A parallel SSOR preconditioner.
Definition: schwarz.hh:166
Y range_type
The range type of the preconditioner.
Definition: schwarz.hh:173
Classes providing communication interfaces for overlapping Schwarz methods.
void bsorf(const M &A, X &x, const Y &b, const K &w)
SOR step.
Definition: gsetc.hh:579
C communication_type
The type of the communication object..
Definition: schwarz.hh:288
void apply(X &v, const Y &d)
Apply one step of the preconditioner to the system A(v)=d.
Definition: schwarz.hh:324
ParSSOR(const matrix_type &A, int n, field_type w, const communication_type &c)
Constructor.
Definition: schwarz.hh:188
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition: schwarz.hh:197
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:30
virtual const matrix_type & getmat() const
get the sequential assembled linear operator.
Definition: schwarz.hh:130
virtual void apply(X &v, const Y &d)
Apply the preconditioner.
Definition: schwarz.hh:317