From f78db2b4dec9612fd9c7f935dde1bfa53145d1da Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Mon, 15 Feb 2016 19:11:43 +0100
Subject: [PATCH] Remove unused variables/typedefs

---
 .../assemblers/localassemblers/convolutionassembler.hh |  3 ---
 .../assemblers/localassemblers/gradientassembler.hh    |  1 -
 dune/fufem/functions/portablegreymap.hh                |  3 ---
 dune/fufem/functions/portablepixelmap.hh               | 10 ----------
 dune/fufem/test/coarsegridfunctionwrappertest.cc       |  1 -
 dune/fufem/test/gridfunctionadaptortest.cc             |  1 -
 dune/fufem/test/gridfunctiontest.cc                    |  2 --
 dune/fufem/test/pgmtest.cc                             |  1 -
 dune/fufem/test/ppmtest.cc                             |  1 -
 dune/fufem/test/secondorderassemblertest.cc            |  1 -
 dune/fufem/test/sumfunctiontest.cc                     |  1 -
 11 files changed, 25 deletions(-)

diff --git a/dune/fufem/assemblers/localassemblers/convolutionassembler.hh b/dune/fufem/assemblers/localassemblers/convolutionassembler.hh
index d98f60c7..ff3377d4 100644
--- a/dune/fufem/assemblers/localassemblers/convolutionassembler.hh
+++ b/dune/fufem/assemblers/localassemblers/convolutionassembler.hh
@@ -59,9 +59,6 @@ class ConvolutionAssembler
             assert(tFE.type() == tElement.type());
             assert(aFE.type() == aElement.type());
 
-            int rows = localMatrix.N();
-            int cols = localMatrix.M();
-
             // get geometries and store them
             const TrialGeometry tGeometry = tElement.geometry();
             const AnsatzGeometry aGeometry = aElement.geometry();
diff --git a/dune/fufem/assemblers/localassemblers/gradientassembler.hh b/dune/fufem/assemblers/localassemblers/gradientassembler.hh
index 252261fb..d1850714 100644
--- a/dune/fufem/assemblers/localassemblers/gradientassembler.hh
+++ b/dune/fufem/assemblers/localassemblers/gradientassembler.hh
@@ -44,7 +44,6 @@ class GradientAssembler
             typedef typename Dune::template FieldVector<double,dim> FVdim;
             typedef typename Dune::template FieldMatrix<double,dim,dim> FMdimdim;
             typedef typename AnsatzLocalFE::Traits::LocalBasisType::Traits::JacobianType JacobianType;
-            typedef typename TrialLocalFE::Traits::LocalBasisType::Traits::DomainType DomainType;
             typedef typename TrialLocalFE::Traits::LocalBasisType::Traits::RangeType RangeType;
 
             // get geometry and store it
diff --git a/dune/fufem/functions/portablegreymap.hh b/dune/fufem/functions/portablegreymap.hh
index c7041e5b..b567c513 100644
--- a/dune/fufem/functions/portablegreymap.hh
+++ b/dune/fufem/functions/portablegreymap.hh
@@ -282,9 +282,6 @@ class PortableGreyMap:
             if (xLength <= 0.0 or yLength <= 0.0 or rangeInterval <= 0.0)
                 DUNE_THROW(Dune::RangeError,"Domain has zero or negative extension or range interval has zero length or negative extension(thrown by PortableGreyMap::exportGreyMap.");
 
-            DFT dx = xLength/(width-1),
-                dy = yLength/(height-1);
-
             double tFactor = maxGreyVal/rangeInterval;
 
             typename FType::DomainType r(0.0);
diff --git a/dune/fufem/functions/portablepixelmap.hh b/dune/fufem/functions/portablepixelmap.hh
index 39af96ef..a748288a 100644
--- a/dune/fufem/functions/portablepixelmap.hh
+++ b/dune/fufem/functions/portablepixelmap.hh
@@ -151,9 +151,6 @@ class ColorMap
             }
             else if (str.find("dune-fufem colorkey")!=std::string::npos)
             {
-                KeyType  maxkey=0,
-                         datalength=0;
-
                 char char_arr[256];
 
                 /* get rid of comment and empty lines */
@@ -551,8 +548,6 @@ class PortablePixelMap:
 
         ColorMap colormap_;
 
-        unsigned short int maxval_;
-
         Basis* basis_;
         CoeffType coeffs_;
         FunctionType* pixMapFunction_;
@@ -791,11 +786,6 @@ class PortablePixelMap:
             if (xLength <= 0.0 or yLength <= 0.0 or rangeInterval <= 0.0)
                 DUNE_THROW(Dune::RangeError,"Domain has zero or negative extension or range interval has zero length or negative extension(thrown by PortablePixelMap::exportPixelMap.");
 
-            DFT dx = xLength/(width-1),
-                dy = yLength/(height-1);
-
-            double tFactor = 255/rangeInterval;
-
             typename FType::DomainType r(0.0);
             typename FType::RangeType  fval(0.0);
 
diff --git a/dune/fufem/test/coarsegridfunctionwrappertest.cc b/dune/fufem/test/coarsegridfunctionwrappertest.cc
index b7f76fd2..3d33352f 100644
--- a/dune/fufem/test/coarsegridfunctionwrappertest.cc
+++ b/dune/fufem/test/coarsegridfunctionwrappertest.cc
@@ -38,7 +38,6 @@ struct CoarseGridFunctionWrapperTestSuite
 
         const int dim = GridType::dimensionworld;
 
-        typedef typename GridType::template Codim<0>::Geometry::GlobalCoordinate DomainType;
         typedef typename Dune::BlockVector<RangeType> Vector;
 
         typedef typename GridType::LevelGridView CoarseGridView;
diff --git a/dune/fufem/test/gridfunctionadaptortest.cc b/dune/fufem/test/gridfunctionadaptortest.cc
index 06730220..9faaa2a7 100644
--- a/dune/fufem/test/gridfunctionadaptortest.cc
+++ b/dune/fufem/test/gridfunctionadaptortest.cc
@@ -40,7 +40,6 @@ struct Suite
         typedef DuneFunctionsBasis<Dune::Functions::PQ1NodalBasis<View>> NonconformingBasis;
         typedef ConformingBasis<NonconformingBasis> Basis;
 
-        typedef typename Dune::FieldVector<double, GridType::dimensionworld> DT;
         typedef Dune::BlockVector<RT> Vector;
 
         NonconformingBasis nonconformingBasis(grid.leafGridView());
diff --git a/dune/fufem/test/gridfunctiontest.cc b/dune/fufem/test/gridfunctiontest.cc
index 65b5f418..c2367fb1 100644
--- a/dune/fufem/test/gridfunctiontest.cc
+++ b/dune/fufem/test/gridfunctiontest.cc
@@ -137,7 +137,6 @@ int main(int argc, char** argv)
     // the underlying grid for GridFunction and GridViewFunction tests
     typedef Dune::YaspGrid<2> GridType;
     typedef GridType::Codim<0>::LeafIterator ElementIterator;
-    typedef GridType::Codim<0>::Geometry::GlobalCoordinate GlobalCoords;
     typedef GridType::Codim<0>::Geometry::LocalCoordinate LocalCoords;
 
     Dune::FieldVector<double,2> L(1.0);
@@ -194,7 +193,6 @@ int main(int argc, char** argv)
     {
         typedef GridType::LeafGridView LeafGridView;
         typedef GridType::LevelGridView LevelGridView;
-        typedef LeafGridView::Codim<0>::Iterator LeafElementIterator;
         typedef LevelGridView::Codim<0>::Iterator LevelElementIterator;
 
         const int LEVEL = 1;
diff --git a/dune/fufem/test/pgmtest.cc b/dune/fufem/test/pgmtest.cc
index 14865911..2409f86d 100644
--- a/dune/fufem/test/pgmtest.cc
+++ b/dune/fufem/test/pgmtest.cc
@@ -34,7 +34,6 @@ int main(int argc, char** argv)
     Dune::MPIHelper::instance(argc, argv);
 
     typedef Dune::YaspGrid<2> GridType;
-    typedef GridType::Codim<0>::Geometry::GlobalCoordinate DomainType;
     typedef Dune::FieldVector<double, 1> RangeType;
     typedef Q1NodalBasis<GridType::LeafGridView> BasisType;
     typedef BasisGridFunction<BasisType, Dune::BlockVector<RangeType> > FunctionType;
diff --git a/dune/fufem/test/ppmtest.cc b/dune/fufem/test/ppmtest.cc
index 1f88c798..0abe6ee7 100644
--- a/dune/fufem/test/ppmtest.cc
+++ b/dune/fufem/test/ppmtest.cc
@@ -38,7 +38,6 @@ int main(int argc, char** argv)
 
     std::cout << "This is PPMTest v0.02" << std::endl;
     typedef Dune::YaspGrid<2> GridType;
-    typedef GridType::Codim<0>::Geometry::GlobalCoordinate DomainType;
     typedef Dune::FieldVector<double, 1> RangeType;
     typedef Q1NodalBasis<GridType::LeafGridView> BasisType;
     typedef BasisGridFunction<BasisType, Dune::BlockVector<RangeType> > FunctionType;
diff --git a/dune/fufem/test/secondorderassemblertest.cc b/dune/fufem/test/secondorderassemblertest.cc
index ae4a04a9..99494c96 100644
--- a/dune/fufem/test/secondorderassemblertest.cc
+++ b/dune/fufem/test/secondorderassemblertest.cc
@@ -91,7 +91,6 @@ int main (int argc, char *argv[])
   typedef FieldMatrix<double,dim,dim> LocalMatrix;
   typedef ScaledIdentityMatrix<double,dim> LocalIdentityMatrix;
   typedef BCRSMatrix<LocalMatrix> MatrixType;
-  typedef BCRSMatrix<LocalIdentityMatrix> MatrixType2;
   MatrixType matrix1;
   MatrixType matrix2;
 
diff --git a/dune/fufem/test/sumfunctiontest.cc b/dune/fufem/test/sumfunctiontest.cc
index 38e02a6d..4a59bd5a 100644
--- a/dune/fufem/test/sumfunctiontest.cc
+++ b/dune/fufem/test/sumfunctiontest.cc
@@ -135,7 +135,6 @@ struct SumGridFunctionTestSuite
     template <class GridType>
     bool check(GridType& grid)
     {
-        const int DDIM=GridType::dimension;
         const int RDIM=2;
 
         typedef typename GridType::template Codim<0>::Geometry::GlobalCoordinate DomainType;
-- 
GitLab