From: Guido Kanschat Date: Fri, 30 Jan 2004 15:57:36 +0000 (+0000) Subject: cleaning MG_DEBUG X-Git-Tag: v8.0.0~15868 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d79e585182490618499ca269fe0fd77d53e3d0c;p=dealii.git cleaning MG_DEBUG git-svn-id: https://svn.dealii.org/trunk@8372 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/multigrid/multigrid.h b/deal.II/deal.II/include/multigrid/multigrid.h index b3b0329ec0..0f5baed13a 100644 --- a/deal.II/deal.II/include/multigrid/multigrid.h +++ b/deal.II/deal.II/include/multigrid/multigrid.h @@ -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 @@ -41,29 +41,29 @@ * 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 + * MATRIX 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 x=Ab. * - * @p{SMOOTH} is a class with a function - * \begin{verbatim} + * SMOOTH 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 x such that the residual b-Ax + * on level l is smoothened. Refer to MGSmootherRelaxation * for an example. * - * @p{COARSE} has an - * \begin{verbatim} + * COARSE 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 x. * - * @author Guido Kanschat, 1999, 2001, 2002, Ralf Hartmann 2002, 2003. + * @author Guido Kanschat, 1999 - 2004 */ template class Multigrid : public Subscriptor @@ -142,12 +142,6 @@ class Multigrid : public Subscriptor void set_edge_matrices (const MGMatrixBase& edge_down, const MGMatrixBase& 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 > 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 > mg_dof_handler; -#endif /** * Exception. */ @@ -371,9 +355,6 @@ Multigrid::Multigrid (const MGDoFHandler& mg_dof_handler, post_smooth(&post_smooth), edge_down(0), edge_up(0) -#ifdef MG_DEBUG - , mg_dof_handler(&mg_dof_handler) -#endif {} diff --git a/deal.II/deal.II/include/multigrid/multigrid.templates.h b/deal.II/deal.II/include/multigrid/multigrid.templates.h index 81a7de7290..53fd6f42d5 100644 --- a/deal.II/deal.II/include/multigrid/multigrid.templates.h +++ b/deal.II/deal.II/include/multigrid/multigrid.templates.h @@ -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 @@ -14,18 +14,6 @@ #define __deal2__multigrid_templates_h #include -#ifdef MG_DEBUG -# include -# include -# include -# include -# include - -# include -#endif - - - template void @@ -43,21 +31,11 @@ template void Multigrid::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::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::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::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 }