3#ifndef DUNE_ISTL_FASTAMGSMOOTHER_HH 
    4#define DUNE_ISTL_FASTAMGSMOOTHER_HH 
   13    template<std::
size_t level>
 
   14    struct GaussSeidelPresmoothDefect {
 
   16      template<
typename M, 
typename X, 
typename Y>
 
   17      static void apply(
const M& A, X& x, Y& d,
 
   20        typedef typename M::ConstRowIterator RowIterator;
 
   21        typedef typename M::ConstColIterator ColIterator;
 
   23        typename Y::iterator dIter=d.begin();
 
   24        typename Y::const_iterator bIter=b.begin();
 
   25        typename X::iterator xIter=x.begin();
 
   27        for(RowIterator row=A.begin(), end=A.end(); row != end;
 
   28            ++row, ++dIter, ++xIter, ++bIter)
 
   30          ColIterator col=(*row).begin();
 
   33          for (; col.index()<row.index(); ++col)
 
   34            (*col).mmv(x[col.index()],*dIter);     
 
   35          assert(row.index()==col.index());
 
   39          diag->solve(*xIter,*dIter);
 
   43          for(col=(*row).begin(); col.index()<row.index(); ++col)
 
   44            col->mmv(*xIter, d[col.index()]);     
 
   49    template<std::
size_t level>
 
   50    struct GaussSeidelPostsmoothDefect {
 
   52      template<
typename M, 
typename X, 
typename Y>
 
   53      static void apply(
const M& A, X& x, Y& d,
 
   56        typedef typename M::ConstRowIterator RowIterator;
 
   57        typedef typename M::ConstColIterator ColIterator;
 
   58        typedef typename Y::block_type YBlock;
 
   60        typename Y::iterator dIter=d.beforeEnd();
 
   61        typename X::iterator xIter=x.beforeEnd();
 
   62        typename Y::const_iterator bIter=b.beforeEnd();
 
   64        for(RowIterator row=A.beforeEnd(), end=A.beforeBegin(); row != end;
 
   65            --row, --dIter, --xIter, --bIter)
 
   67          ColIterator endCol=(*row).beforeBegin();
 
   68          ColIterator col=(*row).beforeEnd();
 
   71          for (; col.index()>row.index(); --col)
 
   72            (*col).mmv(x[col.index()],*dIter);     
 
   73          assert(row.index()==col.index());
 
   77          for (--col; col!=endCol; --col)
 
   78            (*col).mmv(x[col.index()],v);     
 
   81          diag->solve(*xIter,v);
 
Dune namespace.
Definition: alignment.hh:10