]> https://gitweb.dealii.org/ - dealii.git/commitdiff
cleaning MG_DEBUG
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 30 Jan 2004 15:57:36 +0000 (15:57 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 30 Jan 2004 15:57:36 +0000 (15:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@8372 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/multigrid.h
deal.II/deal.II/include/multigrid/multigrid.templates.h

index b3b0329ec0ceab56c56aba88e87a6709024151fa..0f5baed13adf3dcb5e892fc0b6d8ba5cc82d4389 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
  * require several helper classes handed over as template parameters.
  * These classes have to meet the following requirements:
  *
- * @p{MATRIX} is a matrix as specified for LAC-solvers, that is, it
+ * <tt>MATRIX</tt> is a matrix as specified for LAC-solvers, that is, it
  * has a function
- * \begin{verbatim}
+ * @code
  *   void MATRIX::vmult(VECTOR& x, const VECTOR& b)
- * \end{verbatim}
- * performing the matrix vector product @p{x=Ab}.
+ * @endcode
+ * performing the matrix vector product <i>x=Ab</i>.
  *
- * @p{SMOOTH} is a class with a function
- * \begin{verbatim}
+ * <tt>SMOOTH</tt> is a class with a function
+ * @code
  *   void SMOOTH::smooth (unsigned int level, VECTOR& x, const VECTOR& b)
- * \end{verbatim}
- * modifying the vector @p{x} such that the residual @{b-Ax}
- * on level @p{l} is smoothened. Refer to @ref{MGSmootherRelaxation}
+ * @endcode
+ * modifying the vector <i>x</i> such that the residual <i>b-Ax</i>
+ * on level <i>l</i> is smoothened. Refer to MGSmootherRelaxation
  * for an example.
  *
- * @p{COARSE} has an
- * \begin{verbatim}
+ * <tt>COARSE</tt> has an
+ * @code
  *   void COARSE::operator() (VECTOR& x, const VECTOR& b)
- * \end{verbatim}
+ * @endcode
  * returning the solution to the system @p{Ax=b} on the coarsest level
- * in @p{x}.
+ * in <i>x</i>.
  * 
- * @author Guido Kanschat, 1999, 2001, 2002, Ralf Hartmann 2002, 2003.
+ * @author Guido Kanschat, 1999 - 2004
  */
 template <class VECTOR>
 class Multigrid : public Subscriptor
@@ -142,12 +142,6 @@ class Multigrid : public Subscriptor
     void set_edge_matrices (const MGMatrixBase<VECTOR>& edge_down,
                            const MGMatrixBase<VECTOR>& edge_up);
 
-#ifdef MG_DEBUG
-    void print_vector (const unsigned int level,
-                      const VECTOR &v,
-                      const char *name) const;
-#endif
-    
   private:
     
                                     /**
@@ -232,16 +226,6 @@ class Multigrid : public Subscriptor
                                      */
     SmartPointer<const MGMatrixBase<VECTOR> > edge_up;
 
-                                    /**
-                                     * Pointer to the MGDoFHandler
-                                     * given to the constructor. Only
-                                     * needed for @p{MG_DEBUG}
-                                     * defined.
-                                     */
-//TODO[GK]: This won't fly: deal_II_dimension can't be used in header files
-#ifdef MG_DEBUG
-    SmartPointer<const MGDoFHandler<deal_II_dimension> > mg_dof_handler;
-#endif
                                     /**
                                      * Exception.
                                      */
@@ -371,9 +355,6 @@ Multigrid<VECTOR>::Multigrid (const MGDoFHandler<dim>& mg_dof_handler,
                post_smooth(&post_smooth),
                edge_down(0),
                edge_up(0)
-#ifdef MG_DEBUG  
-                , mg_dof_handler(&mg_dof_handler)
-#endif
 {}
 
 
index 81a7de7290b595cbbf69feaa5d58a5b2047acfd5..53fd6f42d5849582f80e2a41a05c0a724708be4c 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #define __deal2__multigrid_templates_h
 #include <multigrid/multigrid.h>
 
-#ifdef MG_DEBUG
-#  include <fe/fe.h>
-#  include <dofs/dof_accessor.h>
-#  include <numerics/data_out.h>
-#  include <multigrid/mg_dof_accessor.h>
-#  include <multigrid/mg_dof_handler.h>
-
-#  include <fstream>
-#endif
-
-
-
 
 template <class VECTOR>
 void
@@ -43,21 +31,11 @@ template <class VECTOR>
 void
 Multigrid<VECTOR>::level_mgstep(const unsigned int level)
 {
-#ifdef MG_DEBUG
-  char *name = new char[100];
-  sprintf(name, "MG%d-defect",level);
-  print_vector(level, defect[level], name);
-#endif
-
   solution[level] = 0.;
   
   if (level == minlevel)
     {
       (*coarse)(level, solution[level], defect[level]);
-#ifdef MG_DEBUG
-      sprintf(name, "MG%d-solution",level);
-      print_vector(level, solution[level], name);
-#endif
       return;
     }
 
@@ -65,11 +43,6 @@ Multigrid<VECTOR>::level_mgstep(const unsigned int level)
                                   // modifying s
   pre_smooth->smooth(level, solution[level], defect[level]);
 
-#ifdef MG_DEBUG
-  sprintf(name, "MG%d-pre",level);
-  print_vector(level, solution[level], name);
-#endif
-  
                                   // t = A*solution[level]
   matrix->vmult(level, t[level], solution[level]);
   
@@ -101,12 +74,7 @@ Multigrid<VECTOR>::level_mgstep(const unsigned int level)
                                   // do coarse grid correction
 
   transfer->prolongate(level, t[level], solution[level-1]);
-
-#ifdef MG_DEBUG
-  sprintf(name, "MG%d-cgc",level);
-  print_vector(level, t[level], name);
-#endif
-
+  
   solution[level] += t[level];
 
   if (edge_up != 0)
@@ -117,13 +85,6 @@ Multigrid<VECTOR>::level_mgstep(const unsigned int level)
   
                                   // post-smoothing
   post_smooth->smooth(level, solution[level], defect[level]);
-
-#ifdef MG_DEBUG
-  sprintf(name, "MG%d-post",level);
-  print_vector(level, solution[level], name);
-
-  delete[] name;
-#endif
 }
 
 

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.