From dcc28b2795690ed603c391d2b1e9dd7cabd3956e Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Wed, 28 Oct 2009 16:41:42 +0000
Subject: [PATCH] headercheck fixes

[[Imported from SVN: r3050]]
---
 dune-solvers/common/canignore.hh                          | 2 +-
 dune-solvers/genericvectortools.hh                        | 1 +
 dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh | 1 +
 dune-solvers/norms/blocknorm.hh                           | 5 +++--
 dune-solvers/norms/diagnorm.hh                            | 3 +++
 dune-solvers/norms/fullnorm.hh                            | 3 +++
 dune-solvers/norms/h1seminorm.hh                          | 3 +++
 dune-solvers/norms/pnorm.hh                               | 5 ++++-
 dune-solvers/norms/sumnorm.hh                             | 6 ++++--
 dune-solvers/solvers/tcgsolver.cc                         | 2 ++
 10 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/dune-solvers/common/canignore.hh b/dune-solvers/common/canignore.hh
index 28b62203..f1cc4ca3 100644
--- a/dune-solvers/common/canignore.hh
+++ b/dune-solvers/common/canignore.hh
@@ -8,7 +8,7 @@ public:
 
     /** \brief Default constructor */
     CanIgnore()
-        : ignoreNodes_(NULL)
+        : ignoreNodes_(0)
     {}
 
     /** \brief Virtual destructor.  Does NOT delete the bitfield! */
diff --git a/dune-solvers/genericvectortools.hh b/dune-solvers/genericvectortools.hh
index ac76030b..a77b2b62 100644
--- a/dune-solvers/genericvectortools.hh
+++ b/dune-solvers/genericvectortools.hh
@@ -6,6 +6,7 @@
 */
 
 #include<iostream>
+#include<bitset>
 
 #include "dune/common/fvector.hh"
 #include <dune/istl/bcrsmatrix.hh>
diff --git a/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh b/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh
index 408a6a80..0143200a 100644
--- a/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh
+++ b/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh
@@ -2,6 +2,7 @@
 #define TRUNCATED_SADDLE_POINT_GAUSS_SEIDEL_STEP_HH
 
 #include <dune/common/bitsetvector.hh>
+#include <dune/common/fmatrix.hh>
 #include <dune/istl/matrix.hh>
 
 #include <dune-solvers/iterationsteps/lineariterationstep.hh>
diff --git a/dune-solvers/norms/blocknorm.hh b/dune-solvers/norms/blocknorm.hh
index b6f88cc1..fbb5a046 100644
--- a/dune-solvers/norms/blocknorm.hh
+++ b/dune-solvers/norms/blocknorm.hh
@@ -2,6 +2,7 @@
 #define BLOCK_NORM_HH
 
 #include <vector>
+#include <cmath>
 
 #include "norm.hh"
 
@@ -25,7 +26,7 @@ class BlockNorm: public Norm<VectorType>
                 double ri = (*norms_[i])(v[i]);
                 r += ri*ri;
             }
-            return sqrt(r);
+            return std::sqrt(r);
         }
 
         //! Compute the norm of the difference of two vectors
@@ -37,7 +38,7 @@ class BlockNorm: public Norm<VectorType>
                 double ri = (*norms_[i]).diff(v1[i], v2[i]);
                 r += ri*ri;
             }
-            return sqrt(r);
+            return std::sqrt(r);
         }
 
     private:
diff --git a/dune-solvers/norms/diagnorm.hh b/dune-solvers/norms/diagnorm.hh
index 1b4f5b8c..98bb21f4 100644
--- a/dune-solvers/norms/diagnorm.hh
+++ b/dune-solvers/norms/diagnorm.hh
@@ -1,6 +1,9 @@
 #ifndef __DIAGNORM__HH__
 #define __DIAGNORM__HH__
 
+#include <dune/common/fvector.hh>
+#include <dune/istl/bvector.hh>
+
 #include "norm.hh"
 
 typedef Dune::BlockVector<Dune::FieldVector <double,1> > VectorType;
diff --git a/dune-solvers/norms/fullnorm.hh b/dune-solvers/norms/fullnorm.hh
index a3559372..d8b8fb86 100644
--- a/dune-solvers/norms/fullnorm.hh
+++ b/dune-solvers/norms/fullnorm.hh
@@ -1,6 +1,9 @@
 #ifndef __FULLNORM__HH__
 #define __FULLNORM__HH__
 
+#include <dune/common/fvector.hh>
+#include <dune/istl/bvector.hh>
+
 #include "norm.hh"
 
 typedef Dune::BlockVector<Dune::FieldVector<double,1> > Vector;
diff --git a/dune-solvers/norms/h1seminorm.hh b/dune-solvers/norms/h1seminorm.hh
index 12e37562..e8ceaa45 100644
--- a/dune-solvers/norms/h1seminorm.hh
+++ b/dune-solvers/norms/h1seminorm.hh
@@ -1,6 +1,9 @@
 #ifndef DUNE_H1_SEMINORM_HH
 #define DUNE_H1_SEMINORM_HH
 
+#include <dune/common/fmatrix.hh>
+#include <dune/istl/bcrsmatrix.hh>
+
 #include "norm.hh"
 
 template<class VectorType>
diff --git a/dune-solvers/norms/pnorm.hh b/dune-solvers/norms/pnorm.hh
index e728b8f0..c12584a4 100644
--- a/dune-solvers/norms/pnorm.hh
+++ b/dune-solvers/norms/pnorm.hh
@@ -1,9 +1,12 @@
 #ifndef __PNORM__HH__
 #define __PNORM__HH__
 
+#include <dune/common/fvector.hh>
+#include <dune/istl/bvector.hh>
+
 #include "norm.hh"
 
-typedef BlockVector<FieldVector <double,1> > Vector;
+typedef Dune::BlockVector<Dune::FieldVector <double,1> > Vector;
 
 class PNorm: public Norm<Vector>
 {
diff --git a/dune-solvers/norms/sumnorm.hh b/dune-solvers/norms/sumnorm.hh
index 95e4fb0e..7b5555c1 100644
--- a/dune-solvers/norms/sumnorm.hh
+++ b/dune-solvers/norms/sumnorm.hh
@@ -1,6 +1,8 @@
 #ifndef __SUMNORM__HH__
 #define __SUMNORM__HH__
 
+#include <cmath>
+
 #include "norm.hh"
 
 template <class VectorType>
@@ -20,7 +22,7 @@ class SumNorm: public Norm<VectorType>
 			double r1 = norm1(v);
 			double r2 = norm2(v);
 			
-			return sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
+			return std::sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
 		}
 
     //! Compute the norm of the difference of two vectors
@@ -29,7 +31,7 @@ class SumNorm: public Norm<VectorType>
 			double r1 = norm1.diff(v1,v2);
 			double r2 = norm2.diff(v1,v2);
 			
-			return sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
+			return std::sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
 		}
 
 	private:
diff --git a/dune-solvers/solvers/tcgsolver.cc b/dune-solvers/solvers/tcgsolver.cc
index 2d96de94..28133861 100644
--- a/dune-solvers/solvers/tcgsolver.cc
+++ b/dune-solvers/solvers/tcgsolver.cc
@@ -2,6 +2,8 @@
 #include <limits>
 #include <iomanip>
 
+#include <dune-solvers/norms/energynorm.hh>
+
 template <class MatrixType, class VectorType>
 void TruncatedCGSolver<MatrixType, VectorType>::check() const
 {
-- 
GitLab