From: Daniel Arndt Date: Sun, 29 Mar 2020 13:37:39 +0000 (-0400) Subject: Remove Multigrid::set_debug X-Git-Tag: v9.2.0-rc1~324^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e5a2f6431a44d78ac9a9964cea1c573e7861858;p=dealii.git Remove Multigrid::set_debug --- diff --git a/include/deal.II/multigrid/multigrid.h b/include/deal.II/multigrid/multigrid.h index 32f54b6a7f..dec545aa68 100644 --- a/include/deal.II/multigrid/multigrid.h +++ b/include/deal.II/multigrid/multigrid.h @@ -272,16 +272,6 @@ public: */ void set_cycle(Cycle); - /** - * @deprecated Debug output will go away. Use signals instead. - * - * Set the debug level. Higher values will create more debugging output - * during the multigrid cycles. - */ - DEAL_II_DEPRECATED - void - set_debug(const unsigned int); - /** * Connect a function to mg::Signals::coarse_solve. */ @@ -439,11 +429,6 @@ private: */ SmartPointer, Multigrid> edge_up; - /** - * Level for debug output. Defaults to zero and can be set by set_debug(). - */ - unsigned int debug; - template friend class PreconditionMG; }; @@ -626,7 +611,6 @@ Multigrid::Multigrid(const MGMatrixBase & matrix, , edge_in(nullptr, typeid(*this).name()) , edge_down(nullptr, typeid(*this).name()) , edge_up(nullptr, typeid(*this).name()) - , debug(0) { if (max_level == numbers::invalid_unsigned_int) maxlevel = matrix.get_maxlevel(); diff --git a/include/deal.II/multigrid/multigrid.templates.h b/include/deal.II/multigrid/multigrid.templates.h index 108f3ab654..c21e1f5ff5 100644 --- a/include/deal.II/multigrid/multigrid.templates.h +++ b/include/deal.II/multigrid/multigrid.templates.h @@ -74,15 +74,6 @@ Multigrid::set_cycle(typename Multigrid::Cycle c) -template -void -Multigrid::set_debug(const unsigned int d) -{ - debug = d; -} - - - template void Multigrid::set_edge_matrices(const MGMatrixBase &down, @@ -110,50 +101,27 @@ template void Multigrid::level_v_step(const unsigned int level) { - if (debug > 0) - deallog << "V-cycle entering level " << level << std::endl; - if (debug > 2) - deallog << "V-cycle Defect norm " << defect[level].l2_norm() - << std::endl; - if (level == minlevel) { this->signals.coarse_solve(true, level); - if (debug > 0) - deallog << "Coarse level " << level << std::endl; (*coarse)(level, solution[level], defect[level]); this->signals.coarse_solve(false, level); return; } // smoothing of the residual - if (debug > 1) - deallog << "Smoothing on level " << level << std::endl; - this->signals.pre_smoother_step(true, level); pre_smooth->apply(level, solution[level], defect[level]); this->signals.pre_smoother_step(false, level); - if (debug > 2) - deallog << "Solution norm " << solution[level].l2_norm() - << std::endl; - // compute residual on level, which includes the (CG) edge matrix - if (debug > 1) - deallog << "Residual on level " << level << std::endl; matrix->vmult(level, t[level], solution[level]); if (edge_out != nullptr) { edge_out->vmult_add(level, t[level], solution[level]); - if (debug > 2) - deallog << "Norm t[" << level << "] " << t[level].l2_norm() - << std::endl; } t[level].sadd(-1.0, 1.0, defect[level]); - if (debug > 2) - deallog << "Residual norm " << t[level].l2_norm() << std::endl; - // Get the defect on the next coarser level as part of the (DG) edge matrix // and then the main part by the restriction of the transfer if (edge_down != nullptr) @@ -174,8 +142,6 @@ Multigrid::level_v_step(const unsigned int level) transfer->prolongate(level, t[level], solution[level - 1]); this->signals.prolongation(false, level); - if (debug > 2) - deallog << "Prolongate norm " << t[level].l2_norm() << std::endl; solution[level] += t[level]; // get in contribution from edge matrices to the defect @@ -190,23 +156,10 @@ Multigrid::level_v_step(const unsigned int level) defect[level] -= t[level]; } - if (debug > 2) - deallog << "V-cycle Defect norm " << defect[level].l2_norm() - << std::endl; - // post-smoothing - if (debug > 1) - deallog << "Smoothing on level " << level << std::endl; this->signals.post_smoother_step(true, level); post_smooth->smooth(level, solution[level], defect[level]); this->signals.post_smoother_step(false, level); - - if (debug > 2) - deallog << "Solution norm " << solution[level].l2_norm() - << std::endl; - - if (debug > 1) - deallog << "V-cycle leaving level " << level << std::endl; } @@ -231,48 +184,26 @@ Multigrid::level_step(const unsigned int level, Cycle cycle) Assert(false, ExcNotImplemented()); } - if (debug > 0) - deallog << cychar << "-cycle entering level " << level << std::endl; - // Combine the defect from the initial copy_to_mg with the one that has come // from the finer level by the transfer defect2[level] += defect[level]; defect[level] = typename VectorType::value_type(0.); - if (debug > 2) - deallog << cychar << "-cycle defect norm " << defect2[level].l2_norm() - << std::endl; - if (level == minlevel) { - if (debug > 0) - deallog << cychar << "-cycle coarse level " << level << std::endl; - (*coarse)(level, solution[level], defect2[level]); return; } // smoothing of the residual - if (debug > 1) - deallog << cychar << "-cycle smoothing level " << level << std::endl; pre_smooth->apply(level, solution[level], defect2[level]); - if (debug > 2) - deallog << cychar << "-cycle solution norm " << solution[level].l2_norm() - << std::endl; - // compute residual on level, which includes the (CG) edge matrix - if (debug > 1) - deallog << cychar << "-cycle residual level " << level << std::endl; matrix->vmult(level, t[level], solution[level]); if (edge_out != nullptr) edge_out->vmult_add(level, t[level], solution[level]); t[level].sadd(-1.0, 1.0, defect2[level]); - if (debug > 2) - deallog << cychar << "-cycle residual norm " << t[level].l2_norm() - << std::endl; - // Get the defect on the next coarser level as part of the (DG) edge matrix // and then the main part by the restriction of the transfer if (edge_down != nullptr) @@ -315,21 +246,8 @@ Multigrid::level_step(const unsigned int level, Cycle cycle) defect2[level] -= t[level]; } - if (debug > 2) - deallog << cychar << "-cycle Defect norm " << defect2[level].l2_norm() - << std::endl; - // post-smoothing - if (debug > 1) - deallog << cychar << "-cycle smoothing level " << level << std::endl; post_smooth->smooth(level, solution[level], defect2[level]); - - if (debug > 2) - deallog << cychar << "-cycle solution norm " << solution[level].l2_norm() - << std::endl; - - if (debug > 1) - deallog << cychar << "-cycle leaving level " << level << std::endl; }