From 867bdc153f9d5ea0fb8f8b3347df966c157d0078 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 5 Oct 2017 17:41:56 -0600 Subject: [PATCH] Also avoid using deallog.push/pop in other places. --- include/deal.II/algorithms/newton.templates.h | 3 +-- include/deal.II/algorithms/theta_timestepping.templates.h | 3 +-- include/deal.II/lac/eigen.h | 8 ++------ include/deal.II/multigrid/mg_block_smoother.h | 4 +--- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/include/deal.II/algorithms/newton.templates.h b/include/deal.II/algorithms/newton.templates.h index c3bf3c08d2..6994407aaf 100644 --- a/include/deal.II/algorithms/newton.templates.h +++ b/include/deal.II/algorithms/newton.templates.h @@ -100,7 +100,7 @@ namespace Algorithms const AnyData &in) { Assert (out.size() == 1, ExcNotImplemented()); - deallog.push ("Newton"); + LogStream::Prefix prefix("Newton"); VectorType &u = *out.entry(0); @@ -197,7 +197,6 @@ namespace Algorithms resnorm = res->l2_norm(); } } - deallog.pop(); // in case of failure: throw exception if (control.last_check() != SolverControl::success) diff --git a/include/deal.II/algorithms/theta_timestepping.templates.h b/include/deal.II/algorithms/theta_timestepping.templates.h index d332393b85..ebc9eec8e3 100644 --- a/include/deal.II/algorithms/theta_timestepping.templates.h +++ b/include/deal.II/algorithms/theta_timestepping.templates.h @@ -81,7 +81,7 @@ namespace Algorithms { Assert(!adaptive, ExcNotImplemented()); - deallog.push ("Theta"); + LogStream::Prefix prefix("Theta"); VectorType &solution = *out.entry(0); GrowingVectorMemory mem; @@ -143,7 +143,6 @@ namespace Algorithms d_explicit.time = control.now(); } - deallog.pop(); } } diff --git a/include/deal.II/lac/eigen.h b/include/deal.II/lac/eigen.h index e9da6fa6c2..ae2f929277 100644 --- a/include/deal.II/lac/eigen.h +++ b/include/deal.II/lac/eigen.h @@ -237,7 +237,7 @@ EigenPower::solve (double &value, { SolverControl::State conv=SolverControl::iterate; - deallog.push("Power method"); + LogStream::Prefix prefix("Power method"); typename VectorMemory::Pointer Vy (this->memory); VectorType &y = *Vy; @@ -291,8 +291,6 @@ EigenPower::solve (double &value, conv = this->iteration_status (iter, std::fabs(1./length-1./old_length), x); } - deallog.pop(); - // in case of failure: throw exception AssertThrow(conv == SolverControl::success, SolverControl::NoConvergence (iter, std::fabs(1./length-1./old_length))); @@ -326,7 +324,7 @@ EigenInverse::solve (double &value, const MatrixType &A, VectorType &x) { - deallog.push("Wielandt"); + LogStream::Prefix prefix("Wielandt"); SolverControl::State conv=SolverControl::iterate; @@ -416,8 +414,6 @@ EigenInverse::solve (double &value, old_value = value; } - deallog.pop(); - // in case of failure: throw // exception AssertThrow (conv == SolverControl::success, diff --git a/include/deal.II/multigrid/mg_block_smoother.h b/include/deal.II/multigrid/mg_block_smoother.h index cf5988870d..5609d91a3d 100644 --- a/include/deal.II/multigrid/mg_block_smoother.h +++ b/include/deal.II/multigrid/mg_block_smoother.h @@ -231,7 +231,7 @@ MGSmootherBlock::smooth(const unsigned int BlockVector &u, const BlockVector &rhs) const { - deallog.push("Smooth"); + LogStream::Prefix prefix("Smooth"); unsigned int maxlevel = matrices.max_level(); unsigned int steps2 = this->steps; @@ -266,8 +266,6 @@ MGSmootherBlock::smooth(const unsigned int if (this->symmetric) T = !T; } - - deallog.pop(); } #endif // DOXYGEN -- 2.39.5