*/
void vmult(VECTOR& dst, const VECTOR& src) const;
+ /**
+ * @deprecated This function is
+ * purely experimental and will
+ * probably never be implemented
+ * in a way that it can be
+ * released.
+ *
+ * Perform a multigrid cycle with
+ * a vector which is already a
+ * level vector. Use of this
+ * function assumes that there is
+ * NO local refinement and that
+ * both vectors are on the finest
+ * level of this Multigrid
+ * object.
+ */
+ void vmult_add(VECTOR& dst, const VECTOR& src) const;
+
/**
* @deprecated Even worse than
* vmult(), this function is not
*/
void Tvmult(VECTOR& dst, const VECTOR& src) const;
+ /**
+ * @deprecated Even worse than
+ * vmult(), this function is not
+ * even implemented, but just
+ * declared such that certain
+ * objects relying on it can be
+ * constructed.
+ */
+ void Tvmult_add(VECTOR& dst, const VECTOR& src) const;
+
/**
* Set additional matrices to
* correct residual computation
level_v_step (maxlevel);
}
+
template <class VECTOR>
void
Multigrid<VECTOR>::vmult(VECTOR& dst, const VECTOR& src) const
+{
+ Multigrid<VECTOR>& mg = const_cast<Multigrid<VECTOR>&>(*this);
+ mg.defect[maxlevel] = src;
+ mg.cycle();
+ dst = mg.solution[maxlevel];
+}
+
+
+template <class VECTOR>
+void
+Multigrid<VECTOR>::vmult_add(VECTOR& dst, const VECTOR& src) const
+{
+ Multigrid<VECTOR>& mg = const_cast<Multigrid<VECTOR>&>(*this);
+ mg.defect[maxlevel] = src;
+ mg.cycle();
+ dst += mg.solution[maxlevel];
+}
+
+
+template <class VECTOR>
+void
+Multigrid<VECTOR>::Tvmult(VECTOR&, const VECTOR&) const
{
Assert(false, ExcNotImplemented());
}
template <class VECTOR>
void
-Multigrid<VECTOR>::Tvmult(VECTOR& dst, const VECTOR& src) const
+Multigrid<VECTOR>::Tvmult_add(VECTOR&, const VECTOR&) const
{
Assert(false, ExcNotImplemented());
}