template <typename number2>
void Tvmult (Vector<number2>&, const Vector<number2>&) const;
+ /**
+ * Execute backward block SOR
+ * preconditioning.
+ *
+ * Warning: this function
+ * performs normal @p{vmult}
+ * without adding. The reason for
+ * its existence is that
+ * @ref{BlockMatrixArray}
+ * requires the adding version by
+ * default. On the other hand,
+ * adding requires an additional
+ * auxiliary vector, which is not
+ * desirable.
+ *
+ * @see{vmult}.
+ */
+ template <typename number2>
+ void Tvmult_add (Vector<number2>&, const Vector<number2>&) const;
+
private:
/**
* Actual implementation of the
const Vector<number2>&,
const bool adding) const;
+ /**
+ * Actual implementation of the
+ * preconditioning algorithm.
+ *
+ * The parameter @p{adding} does
+ * not have any function, yet.
+ */
+ template <typename number2>
+ void do_Tvmult (Vector<number2>&,
+ const Vector<number2>&,
+ const bool adding) const;
+
};
template <class MATRIX, typename inverse_type>
template <typename number2>
-void PreconditionBlockSOR<MATRIX,inverse_type>::Tvmult (Vector<number2> &dst,
- const Vector<number2> &src) const
+void PreconditionBlockSOR<MATRIX,inverse_type>::do_Tvmult (
+ Vector<number2> &dst,
+ const Vector<number2> &src,
+ const bool) const
{
// introduce the following typedef
// since in the use of exceptions,
}
+template <class MATRIX, typename inverse_type>
+template <typename number2>
+void PreconditionBlockSOR<MATRIX,inverse_type>
+::Tvmult (Vector<number2> &dst,
+ const Vector<number2> &src) const
+{
+ do_Tvmult(dst, src, false);
+}
+
+
+template <class MATRIX, typename inverse_type>
+template <typename number2>
+void PreconditionBlockSOR<MATRIX,inverse_type>
+::Tvmult_add (Vector<number2> &dst,
+ const Vector<number2> &src) const
+{
+ do_Tvmult(dst, src, true);
+}
+
+
//----------------------------------------------------------------------//