Skip to content
Snippets Groups Projects
Commit 54a63921 authored by Rebecca Neumann's avatar Rebecca Neumann
Browse files

fix applyscaleadd to always get a consistent vector, fix indentation

[[Imported from SVN: r1361]]
parent 4625b0cb
No related branches found
No related tags found
No related merge requests found
...@@ -107,8 +107,13 @@ namespace Dune { ...@@ -107,8 +107,13 @@ namespace Dune {
//! apply operator to x, scale and add: \f$ y = y + \alpha A(x) \f$ //! apply operator to x, scale and add: \f$ y = y + \alpha A(x) \f$
virtual void applyscaleadd (field_type alpha, const X& x, Y& y) const virtual void applyscaleadd (field_type alpha, const X& x, Y& y) const
{ {
// only apply communication to alpha*A*x to make it consistent,
// y already has to be consistent.
Y y1(y);
y = 0;
novlp_op_apply(x,y,alpha); novlp_op_apply(x,y,alpha);
communication.addOwnerCopyToAll(y,y); communication.addOwnerCopyToAll(y,y);
y += y1;
} }
//! get matrix via * //! get matrix via *
...@@ -363,6 +368,9 @@ namespace Dune { ...@@ -363,6 +368,9 @@ namespace Dune {
*/ */
virtual void apply (domain_type& v, const range_type& d) virtual void apply (domain_type& v, const range_type& d)
{ {
// block preconditioner equivalent to WrappedPreconditioner from
// pdelab/backend/ovlpistsolverbackend.hh,
// but not to BlockPreconditioner from schwarz.hh
preconditioner.apply(v,d); preconditioner.apply(v,d);
communication.addOwnerCopyToAll(v,v); communication.addOwnerCopyToAll(v,v);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment