From 1741ca28171988b621d9a5e040381eea1fa5f9ed Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <Ansgar.Burchardt@tu-dresden.de>
Date: Tue, 15 Aug 2017 16:55:17 +0200
Subject: [PATCH] move a few more classes into the Dune::Solvers namespace

---
 dune/solvers/common/numproc.hh         |  8 ++++++++
 dune/solvers/iterationsteps/amgstep.hh |  9 +++++++++
 dune/solvers/norms/energynorm.hh       |  9 +++++++++
 dune/solvers/norms/norm.hh             | 13 +++++++++++--
 dune/solvers/solvers/solver.hh         | 11 +++++++++++
 5 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/dune/solvers/common/numproc.hh b/dune/solvers/common/numproc.hh
index 8b894db1..890edf68 100644
--- a/dune/solvers/common/numproc.hh
+++ b/dune/solvers/common/numproc.hh
@@ -5,6 +5,9 @@
 
 #include <dune/common/exceptions.hh>
 
+namespace Dune {
+namespace Solvers {
+
 /** \brief Exception thrown by solvers */
 class SolverError : public Dune::Exception {};
 
@@ -48,6 +51,11 @@ class SolverError : public Dune::Exception {};
         return lhs;
     }
 
+} /* namespace Solvers */
+} /* namespace Dune */
 
+// For backward compatibility: will be removed eventually
+using Dune::Solvers::SolverError;
+using Dune::Solvers::NumProc;
 
 #endif
diff --git a/dune/solvers/iterationsteps/amgstep.hh b/dune/solvers/iterationsteps/amgstep.hh
index 0ef950c1..58f948d5 100644
--- a/dune/solvers/iterationsteps/amgstep.hh
+++ b/dune/solvers/iterationsteps/amgstep.hh
@@ -12,6 +12,9 @@
 #include <dune/solvers/iterationsteps/lineariterationstep.hh>
 #include <dune/istl/paamg/amg.hh>
 
+namespace Dune {
+namespace Solvers {
+
 /** \brief A wrapper class for the ISTL AMG implementation
  */
 template <class MatrixType, class VectorType>
@@ -106,4 +109,10 @@ void AMGStep<MatrixType,VectorType>::iterate()
     amg_->apply(*this->x_, residual_);
 }
 
+} /* namespace Solvers */
+} /* namespace Dune */
+
+// For backward compatibility: will be removed eventually
+using Dune::Solvers::AMGStep;
+
 #endif
diff --git a/dune/solvers/norms/energynorm.hh b/dune/solvers/norms/energynorm.hh
index f58a74ad..75bf4c57 100644
--- a/dune/solvers/norms/energynorm.hh
+++ b/dune/solvers/norms/energynorm.hh
@@ -10,6 +10,9 @@
 #include <dune/solvers/norms/norm.hh>
 #include <dune/solvers/iterationsteps/lineariterationstep.hh>
 
+namespace Dune {
+namespace Solvers {
+
     /** \brief Vector norm induced by linear operator
      *
      *  \f$\Vert u \Vert_A = (u, Au)^{1/2}\f$
@@ -119,4 +122,10 @@
 
     };
 
+} /* namespace Solvers */
+} /* namespace Dune */
+
+// For backward compatibility: will be removed eventually
+using Dune::Solvers::EnergyNorm;
+
 #endif
diff --git a/dune/solvers/norms/norm.hh b/dune/solvers/norms/norm.hh
index 5a30b09f..a695a657 100644
--- a/dune/solvers/norms/norm.hh
+++ b/dune/solvers/norms/norm.hh
@@ -1,7 +1,10 @@
 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 // vi: set et ts=8 sw=4 sts=4:
-#ifndef NORM_HH
-#define NORM_HH
+#ifndef DUNE_SOLVERS_NORMS_NORM_HH
+#define DUNE_SOLVERS_NORMS_NORM_HH
+
+namespace Dune {
+namespace Solvers {
 
 //! Abstract base for classes computing norms of discrete functions
 template <class V>
@@ -30,4 +33,10 @@ class Norm {
 
 };
 
+} /* namespace Solvers */
+} /* namespace Dune */
+
+// For backward compatibility: will be removed eventually
+using Dune::Solvers::Norm;
+
 #endif
diff --git a/dune/solvers/solvers/solver.hh b/dune/solvers/solvers/solver.hh
index 255c97f4..5b3984a4 100644
--- a/dune/solvers/solvers/solver.hh
+++ b/dune/solvers/solvers/solver.hh
@@ -5,6 +5,9 @@
 
 #include <dune/solvers/common/numproc.hh>
 
+namespace Dune {
+namespace Solvers {
+
 /**  \brief struct to store result related information such as for example number of iterations etc.
   *
   *  \warning The interface and implementation is so far highly experimental and will change without further notice!
@@ -67,4 +70,12 @@ class Solver : public NumProc
     private:
         SolverResult result;
 };
+
+} /* namespace Solvers */
+} /* namespace Dune */
+
+// For backward compatibility: will be removed eventually
+using Dune::Solvers::Solver;
+using Dune::Solvers::SolverResult;
+
 #endif
-- 
GitLab