From: Guido Kanschat Date: Wed, 1 Mar 2000 02:06:17 +0000 (+0000) Subject: checking mg X-Git-Tag: v8.0.0~20830 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe5cb408139ec155edb246134f8ff2fd278ae668;p=dealii.git checking mg git-svn-id: https://svn.dealii.org/trunk@2534 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/multigrid/mg_base.cc b/deal.II/deal.II/source/multigrid/mg_base.cc index 74d47cdd3b..9b9e927d3b 100644 --- a/deal.II/deal.II/source/multigrid/mg_base.cc +++ b/deal.II/deal.II/source/multigrid/mg_base.cc @@ -21,20 +21,22 @@ //TODO: this function is only for debugging purposes and should be removed sometimes template static -void print_vector(ostream& s, const VECTOR& v) +void print_vector(ostream& s, const VECTOR& v, const char* text) { const unsigned int n = (unsigned int)(sqrt(v.size())+.3); unsigned int k=0; + s << endl << "splot '-' title '" << text << "'" << endl; + // write the vector entries in a // kind of square for (unsigned int i=0;irestrict_and_add (level, defect[level-1], t); +// print_vector(cout,defect[level-1],"Dl-1"); // do recursion level_mgstep(level-1, pre_smooth, post_smooth, coarse_grid_solver); @@ -104,7 +111,9 @@ MGBase::level_mgstep(const unsigned int level, t.reinit(solution[level].size()); // do coarse grid correction +// print_vector(cout,solution[level-1],"Sl-1"); transfer->prolongate(level, t, solution[level-1]); +// print_vector(cout,t,"T"); solution[level] += t; // smoothing (modify solution again)