virtual void smooth (const unsigned int level,
VECTOR& u,
const VECTOR& rhs) const;
+ virtual void clear ();
};
const VECTOR&) const
{}
+template <class VECTOR>
+inline void
+MGSmootherIdentity<VECTOR>::clear ()
+{}
+
//---------------------------------------------------------------------------
template <class VECTOR>
for (unsigned int level=0;level<mg_dof_handler.get_tria().n_levels();++level)
{
typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
+
for (IT i= copy_indices[level].begin();
i != copy_indices[level].end();++i)
dst(i->first) = src[level](i->second);
BlockVector<number2>& dst,
const MGLevelObject<Vector<number> >& src) const
{
- do_copy_from_mg (mg_dof_handler, dst, src);
+ dst = 0;
+ do_copy_from_mg (mg_dof_handler,
+ dst.block(target_component[selected_component]), src);
if (constraints != 0)
constraints->condense(dst);
}
Vector<number2>& dst,
const MGLevelObject<Vector<number> >& src) const
{
+ dst = 0;
do_copy_from_mg (mg_dof_handler, dst, src);
if (constraints != 0)
{
VECTOR2& dst,
const VECTOR2& src) const
{
-#ifdef baerbel_mg_test
+#ifdef BAERBEL_MG_TEST
const unsigned int min_l = multigrid->solution.get_minlevel();
const unsigned int max_l = multigrid->solution.get_maxlevel();
deallog << "PreconditionMG in " << src.l2_norm() << std::endl;
transfer->copy_to_mg(*mg_dof_handler,
multigrid->defect,
src);
-#ifdef baerbel_mg_test
+#ifdef BAERBEL_MG_TEST
for(unsigned int l=min_l; l<max_l; ++l)
deallog << "defect [" << l << "] " << multigrid->defect[l].l2_norm() << std::endl;
#endif
multigrid->cycle();
-#ifdef baerbel_mg_test
+#ifdef BAERBEL_MG_TEST
for(unsigned int l=min_l; l<max_l; ++l)
deallog << "solution [" << l << "] " << multigrid->solution[l].l2_norm() << std::endl;
#endif
transfer->copy_from_mg(*mg_dof_handler,
dst,
multigrid->solution);
-#ifdef baerbel_mg_test
+#ifdef BAERBEL_MG_TEST
deallog << "PreconditionMG out " << dst.l2_norm() << std::endl;
-#endif
+
/*
DataOut<dim> data_out;
data_out.attach_dof_handler (*mg_dof_handler);
std::ofstream output (filename.str().c_str());
data_out.write_gnuplot (output);
*/
+#endif
}