5#ifndef DUNE_ISTL_FASTAMGSMOOTHER_HH
6#define DUNE_ISTL_FASTAMGSMOOTHER_HH
15 template<std::
size_t level>
18 template<
typename M,
typename X,
typename Y>
19 static void apply(
const M& A, X& x, Y& d,
22 typedef typename M::ConstRowIterator RowIterator;
23 typedef typename M::ConstColIterator ColIterator;
25 typename Y::iterator dIter=d.begin();
26 typename Y::const_iterator bIter=b.begin();
27 typename X::iterator xIter=x.begin();
29 for(RowIterator row=A.begin(), end=A.end(); row != end;
30 ++row, ++dIter, ++xIter, ++bIter)
32 ColIterator
col=(*row).begin();
35 for (;
col.index()<row.index(); ++
col)
36 (*col).mmv(x[
col.index()],*dIter);
37 assert(row.index()==
col.index());
41 diag->solve(*xIter,*dIter);
45 for(
col=(*row).begin();
col.index()<row.index(); ++
col)
46 col->mmv(*xIter, d[
col.index()]);
51 template<std::
size_t level>
54 template<
typename M,
typename X,
typename Y>
55 static void apply(
const M& A, X& x, Y& d,
58 typedef typename M::ConstRowIterator RowIterator;
59 typedef typename M::ConstColIterator ColIterator;
60 typedef typename Y::block_type YBlock;
62 typename Y::iterator dIter=d.beforeEnd();
63 typename X::iterator xIter=x.beforeEnd();
64 typename Y::const_iterator bIter=b.beforeEnd();
66 for(RowIterator row=A.beforeEnd(), end=A.beforeBegin(); row != end;
67 --row, --dIter, --xIter, --bIter)
69 ColIterator endCol=(*row).beforeBegin();
70 ColIterator
col=(*row).beforeEnd();
73 for (;
col.index()>row.index(); --
col)
74 (*col).mmv(x[
col.index()],*dIter);
75 assert(row.index()==
col.index());
80 (*col).mmv(x[
col.index()],v);
83 diag->solve(*xIter,v);
Col col
Definition: matrixmatrix.hh:351
Definition: allocator.hh:11
Definition: fastamgsmoother.hh:16
static void apply(const M &A, X &x, Y &d, const Y &b)
Definition: fastamgsmoother.hh:19
Definition: fastamgsmoother.hh:52
static void apply(const M &A, X &x, Y &d, const Y &b)
Definition: fastamgsmoother.hh:55