~SparseVanka();
/**
- * Do the preconditioning. This
- * function contains a dispatch
- * mechanism to use the
- * multiplicative version by
- * default and the additive version
- * if requested by #set_additive#.
- */
- template<typename number2>
- void operator() (Vector<number2> &dst,
- const Vector<number2> &src) const;
-
- /**
- * Application of the Vanka operator.
+ * Do the preconditioning.
* This function takes the residual
* in #src# and returns the resulting
* update vector in #dst#.
*/
template<typename number2>
- void forward (Vector<number2> &dst,
- const Vector<number2> &src) const;
-
- /**
- * Application of the transpose
- * Vanka operator.
- * This function takes the residual
- * in #src# and returns the resulting
- * update vector in #dst#.
- */
- template<typename number2>
- void backward (Vector<number2> &dst,
- const Vector<number2> &src) const;
-
+ void operator() (Vector<number2> &dst,
+ const Vector<number2> &src) const;
+
/**
* Minimize memory consumption.
* Activating this option reduces
-/* ---------------------------- Inline functions -----------------------*/
-
-template<typename number>
-template<typename number2>
-inline
-void
-SparseVanka<number>::operator() (Vector<number2>& dst,
- const Vector<number2>& src) const
-{
- dst = 0.;
- forward(dst, src);
-}
-
template<typename number>
template<typename number2>
void
-SparseVanka<number>::forward(Vector<number2>& dst,
- const Vector<number2>& src) const
+SparseVanka<number>::operator ()(Vector<number2> &dst,
+ const Vector<number2> &src) const
{
+ // first set output vector to zero
+ dst.clear ();
// first define an alias to the sparsity
// pattern of the matrix, since this
// will be used quite often
template class SparseVanka<float>;
template class SparseVanka<double>;
-template void SparseVanka<double>::forward (Vector<float> &dst,
- const Vector<float> &src) const;
-template void SparseVanka<double>::forward (Vector<double> &dst,
- const Vector<double> &src) const;
-template void SparseVanka<float>::forward (Vector<float> &dst,
- const Vector<float> &src) const;
-template void SparseVanka<float>::forward (Vector<double> &dst,
- const Vector<double> &src) const;
+template void SparseVanka<double>::operator () (Vector<float> &dst,
+ const Vector<float> &src) const;
+template void SparseVanka<double>::operator () (Vector<double> &dst,
+ const Vector<double> &src) const;