Go to the documentation of this file.
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_(stackobject_to_shared_ptr(A)), communication(com)
113 : _A_(A), communication(com)
117 virtual void apply (
const X& x, Y& y)
const
121 communication.project(y);
128 _A_->usmv(alpha,x,y);
129 communication.project(y);
146 const std::shared_ptr<const matrix_type>_A_;
169 template<
class M,
class X,
class Y,
class C>
193 : _A_(A), _n(n), _w(w), communication(c)
201 virtual void pre (X& x, Y& b)
203 communication.copyOwnerToAll(x,x);
211 virtual void apply (X& v,
const Y& d)
213 for (
int i=0; i<_n; i++) {
217 communication.copyOwnerToAll(v,v);
246 template<
class T>
class ConstructionTraits;
272 template<
class X,
class Y,
class C,
class P=Preconditioner<X,Y> >
302 : _preconditioner(stackobject_to_shared_ptr(p)), _communication(c)
313 : _preconditioner(p), _communication(c)
321 virtual void pre (X& x, Y& b)
323 _communication.copyOwnerToAll(x,x);
324 _preconditioner->pre(x,b);
332 virtual void apply (X& v,
const Y& d)
334 _preconditioner->apply(v,d);
335 _communication.copyOwnerToAll(v,v);
338 template<
bool forward>
341 _preconditioner->template apply<forward>(v,d);
342 _communication.copyOwnerToAll(v,v);
352 _preconditioner->post(x);
363 std::shared_ptr<P> _preconditioner;
X::field_type field_type
The field type of the range.
Definition: schwarz.hh:94
Simple iterative methods like Jacobi, Gauss-Seidel, SOR, SSOR, etc. in a generic way.
virtual void apply(X &v, const Y &d)
Apply the precondtioner.
Definition: schwarz.hh:211
X::field_type field_type
The field type of the preconditioner.
Definition: schwarz.hh:287
Define base class for scalar product and norm.
C communication_type
The type of the communication object.
Definition: schwarz.hh:181
virtual SolverCategory::Category category() const
Category of the preconditioner (see SolverCategory::Category)
Definition: schwarz.hh:228
void bsorb(const M &A, X &x, const Y &b, const K &w)
SSOR step.
Definition: gsetc.hh:640
Traits class for generically constructing non default constructable types.
Definition: novlpschwarz.hh:251
OverlappingSchwarzOperator(const std::shared_ptr< matrix_type > A, const communication_type &com)
Definition: schwarz.hh:112
C communication_type
The type of the communication object..
Definition: schwarz.hh:292
A parallel SSOR preconditioner.
Definition: schwarz.hh:170
@ overlapping
Category for overlapping solvers.
Definition: solvercategory.hh:27
X domain_type
The domain type of the preconditioner.
Definition: schwarz.hh:280
C communication_type
The type of the communication object.
Definition: schwarz.hh:99
virtual void apply(const X &x, Y &y) const
apply operator to x:
Definition: schwarz.hh:117
M matrix_type
The type of the matrix we operate on.
Definition: schwarz.hh:82
OverlappingSchwarzOperator(const matrix_type &A, const communication_type &com)
constructor: just store a reference to a matrix.
Definition: schwarz.hh:108
virtual void post(X &x)
Clean up.
Definition: schwarz.hh:225
Implementation of the BCRSMatrix class.
Some generic functions for pretty printing vectors and matrices.
Y range_type
The type of the range.
Definition: schwarz.hh:92
ParSSOR(const matrix_type &A, int n, field_type w, const communication_type &c)
Constructor.
Definition: schwarz.hh:192
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition: schwarz.hh:201
Implementations of the inverse operator interface.
X domain_type
The type of the domain.
Definition: schwarz.hh:87
X domain_type
The domain type of the preconditioner.
Definition: schwarz.hh:175
Definition: allocator.hh:7
virtual SolverCategory::Category category() const
Category of the linear operator (see SolverCategory::Category)
Definition: schwarz.hh:140
virtual void pre(X &x, Y &b)
Prepare the preconditioner.
Definition: schwarz.hh:321
Block parallel preconditioner.
Definition: schwarz.hh:273
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioner.hh:37
BlockPreconditioner(P &p, const communication_type &c)
Constructor.
Definition: schwarz.hh:301
virtual const matrix_type & getmat() const
get the sequential assembled linear operator.
Definition: schwarz.hh:134
X::field_type field_type
The field type of the preconditioner.
Definition: schwarz.hh:179
Y range_type
The range type of the preconditioner.
Definition: schwarz.hh:177
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:30
virtual void applyscaleadd(field_type alpha, const X &x, Y &y) const
apply operator to x, scale and add:
Definition: schwarz.hh:126
M matrix_type
The matrix type the preconditioner is for.
Definition: schwarz.hh:173
virtual void post(X &x)
Clean up.
Definition: schwarz.hh:350
Classes providing communication interfaces for overlapping Schwarz methods.
virtual SolverCategory::Category category() const
Category of the preconditioner (see SolverCategory::Category)
Definition: schwarz.hh:356
BlockPreconditioner(const std::shared_ptr< P > &p, const communication_type &c)
Constructor.
Definition: schwarz.hh:312
Define general preconditioner interface.
void apply(X &v, const Y &d)
Apply one step of the preconditioner to the system A(v)=d.
Definition: schwarz.hh:339
Category
Definition: solvercategory.hh:21
virtual void apply(X &v, const Y &d)
Apply the preconditioner.
Definition: schwarz.hh:332
Y range_type
The range type of the preconditioner.
Definition: schwarz.hh:285
void bsorf(const M &A, X &x, const Y &b, const K &w)
SOR step.
Definition: gsetc.hh:628
This file implements a vector space as a tensor product of a given vector space. The number of compon...
Define general, extensible interface for operators. The available implementation wraps a matrix.