]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
checking mg
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 1 Mar 2000 02:06:17 +0000 (02:06 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 1 Mar 2000 02:06:17 +0000 (02:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@2534 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/multigrid/mg_base.cc
deal.II/doc/.cvsignore [new file with mode: 0644]
deal.II/doc/auto/kdoc/.cvsignore
tests/.cvsignore [new file with mode: 0644]

index 74d47cdd3b7a63e7cecf76c3962a87a7e3c86a91..9b9e927d3b0c33b5f182b8c01209301e7d47a22b 100644 (file)
 //TODO: this function is only for debugging purposes and should be removed sometimes
 template<class VECTOR>
 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;i<n;++i)
     {
       for (unsigned int j=0;j<n;++j)
-       s << '\t' << v(k++);
+       s << '\n' << v(k++);
       s << endl;
     }
-  s << endl;
+  s << "e\npause -1" << endl;
 }
 
 
@@ -65,6 +67,9 @@ MGBase::vcycle(const MGSmootherBase     &pre_smooth,
               const MGSmootherBase     &post_smooth,
               const MGCoarseGridSolver &coarse_grid_solver)
 {
+//  static int k=0;
+//  cout << "set title 'cycle " << ++k << "'\n";
+  
   level_mgstep(maxlevel, pre_smooth, post_smooth, coarse_grid_solver);
 };
 
@@ -88,11 +93,13 @@ MGBase::level_mgstep(const unsigned int        level,
                                   // t = d-As
   t.reinit(solution[level].size());
   level_vmult(level, t, solution[level], defect[level]);
-
+//  print_vector(cout,t,"T");
+  
                                   // make t rhs of lower level
 //TODO: this function adds the restricted t to defect[level-1].
 //TODO: why don't we have to clear it before?  
   transfer->restrict_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)
diff --git a/deal.II/doc/.cvsignore b/deal.II/doc/.cvsignore
new file mode 100644 (file)
index 0000000..f3c7a7c
--- /dev/null
@@ -0,0 +1 @@
+Makefile
index 2018d053021fb86e6688d30df75bc3e6322899a6..91b327419a148b8721c79dec3621865e1498b8eb 100644 (file)
@@ -1 +1 @@
-*.kdoc names.html
+*.kdoc names.html multigrid
diff --git a/tests/.cvsignore b/tests/.cvsignore
new file mode 100644 (file)
index 0000000..c63062c
--- /dev/null
@@ -0,0 +1 @@
+config.log config.status

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.