diff --git a/disc/functions/p1function.hh b/disc/functions/p1function.hh index a8f05b434f4715ddf564608eea38f4cc76956359..06da1b9c93f316d23d7b09cba90cd772b87d73f7 100644 --- a/disc/functions/p1function.hh +++ b/disc/functions/p1function.hh @@ -975,7 +975,7 @@ namespace Dune public: //! manages nothing - P1FunctionManager (const G& g) : grid(g), savedmap(g), mapper(g,g.leafIndexSet()) + P1FunctionManager (const G& g) : mapper(g,g.leafIndexSet()), grid(g), savedmap(g) { // allocate index array to correct size (this possible for vertex data) oldindex.resize(mapper.size()); diff --git a/disc/groundwater/p1groundwaterestimator.hh b/disc/groundwater/p1groundwaterestimator.hh index de5ba1ab6f54285a1bef1b6f0abdaeef908ab419..4ed9642c88091f1934dee0c1383f92dc408e28a7 100644 --- a/disc/groundwater/p1groundwaterestimator.hh +++ b/disc/groundwater/p1groundwaterestimator.hh @@ -72,8 +72,6 @@ namespace Dune { // extract some important parameters Dune::GeometryType gt = e.geometry().type(); - const typename Dune::LagrangeShapeFunctionSetContainer<DT,RT,n>::value_type& sfs=Dune::LagrangeShapeFunctions<DT,RT,n>::general(gt,1); - DT Zero = 0; Dune::FieldVector<DT,n> center = e.geometry().global(Dune::ReferenceElements<DT,n>::general(gt).position(0,0)); // integral over right hand side, div(K grad u_h) = 0 for P1 elements @@ -81,7 +79,7 @@ namespace Dune RT volume = e.geometry().integrationElement(Dune::ReferenceElements<DT,n>::general(gt).position(0,0)); RT h_K = pow(volume,1.0/((double)n)); RT integralq = 0; - for (int g=0; g<Dune::QuadratureRules<DT,n>::rule(gt,p).size(); ++g) // run through all quadrature points + for (std::size_t g=0; g<Dune::QuadratureRules<DT,n>::rule(gt,p).size(); ++g) // run through all quadrature points { const Dune::FieldVector<DT,n>& local = Dune::QuadratureRules<DT,n>::rule(gt,p)[g].position(); // pos of integration point Dune::FieldVector<DT,n> global = e.geometry().global(local); // ip in global coordinates @@ -114,12 +112,10 @@ namespace Dune // extract some important parameters GeometryType gt = e.geometry().type(); const typename Dune::LagrangeShapeFunctionSetContainer<DT,RT,n>::value_type& sfs=Dune::LagrangeShapeFunctions<DT,RT,n>::general(gt,1); - DT Zero = 0; Dune::FieldVector<DT,n> center = e.geometry().global(Dune::ReferenceElements<DT,n>::general(gt).position(0,0)); // the edge term GeometryType gtface = it.intersectionSelfLocal().type(); - int numberInSelf = it.numberInSelf(); const Dune::FieldVector<DT,n-1>& facelocal = Dune::ReferenceElements<DT,n-1>::general(gtface).position(0,0); FieldVector<DT,n> local = it.intersectionSelfLocal().global(facelocal); FieldVector<DT,n> global = it.intersectionGlobal().global(facelocal); @@ -165,7 +161,6 @@ namespace Dune FieldVector<DT,n> nbcenter = outside->geometry().global(ReferenceElements<DT,n>::general(nbgt).position(0,0)); const typename LagrangeShapeFunctionSetContainer<DT,RT,n>::value_type& nbsfs=LagrangeShapeFunctions<DT,RT,n>::general(nbgt,1); GeometryType nbgtface = it.intersectionNeighborLocal().type(); - int numberInNeighbor = it.numberInNeighbor(); const FieldVector<DT,n-1>& nbfacelocal = ReferenceElements<DT,n-1>::general(nbgtface).position(0,0); FieldVector<DT,n> nblocal = it.intersectionNeighborLocal().global(nbfacelocal); FieldMatrix<DT,n,n> nbjac = outside->geometry().jacobianInverseTransposed(nblocal); @@ -245,8 +240,6 @@ namespace Dune // get access to shape functions for P1 elements Dune::GeometryType gt = it->geometry().type(); - const typename Dune::LagrangeShapeFunctionSetContainer<DT,RT,n>::value_type& - sfs=Dune::LagrangeShapeFunctions<DT,RT,n>::general(gt,1); // evaluate element part of estimator RT elementpart; diff --git a/disc/operators/p1operator.hh b/disc/operators/p1operator.hh index af75a084697e497eb8d92981f8d7c9c83a38e2c1..774a0875edae6f4d66160b4cd5649c46a865186f 100644 --- a/disc/operators/p1operator.hh +++ b/disc/operators/p1operator.hh @@ -1288,7 +1288,7 @@ namespace Dune { // allocate flag vector to note hanging nodes whose row has been assembled std::vector<unsigned char> treated(this->vertexmapper.size()); - for (int i=0; i<treated.size(); i++) treated[i] = false; + for (std::size_t i=0; i<treated.size(); i++) treated[i] = false; // run over all leaf elements Iterator eendit = this->is.template end<0,All_Partition>(); @@ -1329,7 +1329,7 @@ namespace Dune void preMark () { marked.resize(this->vertexmapper.size()); - for (int i=0; i<marked.size(); i++) marked[i] = false; + for (std::size_t i=0; i<marked.size(); i++) marked[i] = false; return; } @@ -1409,8 +1409,8 @@ namespace Dune template<class M, class K> void accumulate (M& A, const K& alpha, const M& B) { - for (int i=0; i<A.N(); i++) - for (int j=0; j<A.M(); j++) + for (std::size_t i=0; i<A.N(); i++) + for (std::size_t j=0; j<A.M(); j++) A[i][j] += alpha*B[i][j]; } }; diff --git a/grid/common/gridinfo.hh b/grid/common/gridinfo.hh index 819d02a5859af27face5a53009a42a002be67d7d..7f821c37f5c73bea828d67230275b94c90c4e594 100644 --- a/grid/common/gridinfo.hh +++ b/grid/common/gridinfo.hh @@ -65,7 +65,7 @@ namespace Dune bool first=true; for (int c=0; c<=dim; c++) { - for (int i=0; i<grid.leafIndexSet().geomTypes(c).size(); i++) + for (std::size_t i=0; i<grid.leafIndexSet().geomTypes(c).size(); i++) { if (!first) std::cout << ","; std::cout << grid.leafIndexSet().geomTypes(c)[i] diff --git a/grid/yaspgrid.hh b/grid/yaspgrid.hh index d9f5b54ca38638fffc8c7bf3b0ad8e196852aacf..5711fd3278f394bcff0773bef4da91ef68a82394 100644 --- a/grid/yaspgrid.hh +++ b/grid/yaspgrid.hh @@ -2492,8 +2492,8 @@ namespace Dune { YGLI g = MultiYGrid<dim,ctype>::begin(level); // find send/recv lists or throw error - const std::deque<IS>* sendlist; - const std::deque<IS>* recvlist; + const std::deque<IS>* sendlist=0; + const std::deque<IS>* recvlist=0; if (codim==0) // the elements { if (iftype==InteriorBorder_InteriorBorder_Interface) diff --git a/io/file/vtk/vtkwriter.hh b/io/file/vtk/vtkwriter.hh index 2bdeada7b4f4a7dbca49b84f10e7dda44a9233f4..6d647093da5d6ac52c1d4deced942127598918c1 100644 --- a/io/file/vtk/vtkwriter.hh +++ b/io/file/vtk/vtkwriter.hh @@ -580,7 +580,7 @@ namespace Dune indentUp(); for (functioniterator it=celldata.begin(); it!=celldata.end(); ++it) { - VTKDataArrayWriter<float> *p; + VTKDataArrayWriter<float> *p=0; if (datamode==VTKOptions::ascii) p = new VTKAsciiDataArrayWriter<float>(s,(*it)->name(),(*it)->ncomps()); if (datamode==VTKOptions::binary) @@ -616,7 +616,7 @@ namespace Dune indentUp(); for (functioniterator it=vertexdata.begin(); it!=vertexdata.end(); ++it) { - VTKDataArrayWriter<float> *p; + VTKDataArrayWriter<float> *p=0; if (datamode==VTKOptions::ascii) p = new VTKAsciiDataArrayWriter<float>(s,(*it)->name(),(*it)->ncomps()); if (datamode==VTKOptions::binary) @@ -647,7 +647,7 @@ namespace Dune indent(s); s << "<Points>" << std::endl; indentUp(); - VTKDataArrayWriter<float> *p; + VTKDataArrayWriter<float> *p=0; if (datamode==VTKOptions::ascii) p = new VTKAsciiDataArrayWriter<float>(s,"Coordinates",3); if (datamode==VTKOptions::binary) @@ -682,7 +682,7 @@ namespace Dune indentUp(); // connectivity - VTKDataArrayWriter<int> *p1; + VTKDataArrayWriter<int> *p1=0; if (datamode==VTKOptions::ascii) p1 = new VTKAsciiDataArrayWriter<int>(s,"connectivity",1); if (datamode==VTKOptions::binary) @@ -696,7 +696,7 @@ namespace Dune delete p1; // offsets - VTKDataArrayWriter<int> *p2; + VTKDataArrayWriter<int> *p2=0; if (datamode==VTKOptions::ascii) p2 = new VTKAsciiDataArrayWriter<int>(s,"offsets",1); if (datamode==VTKOptions::binary) @@ -713,7 +713,7 @@ namespace Dune delete p2; // types - VTKDataArrayWriter<unsigned char> *p3; + VTKDataArrayWriter<unsigned char> *p3=0; if (datamode==VTKOptions::ascii) p3 = new VTKAsciiDataArrayWriter<unsigned char>(s,"types",1); if (datamode==VTKOptions::binary) @@ -932,7 +932,7 @@ namespace Dune //! finish output; writes end tag ~VTKBinaryDataArrayWriter () { - int codelength; + // int codelength; if (n>0) { // codelength = base64::base64_encode_block(buffer,n,code,&_state);