diff --git a/libsrc/core/exception.cpp b/libsrc/core/exception.cpp index 38e6e62a..bd62f40f 100644 --- a/libsrc/core/exception.cpp +++ b/libsrc/core/exception.cpp @@ -122,7 +122,7 @@ namespace ngcore auto libname = s.substr(0, brace_open_pos); auto funcname = s.substr(brace_open_pos+1, plus_pos - brace_open_pos - 1); auto offset = std::strtoul(s.substr(plus_pos+1, brace_close_pos - plus_pos - 1).c_str(), 0, 16); - auto position = std::strtoul(s.substr(bracket_open_pos+1, bracket_close_pos - bracket_open_pos - 1).c_str(), 0, 16); + // auto position = std::strtoul(s.substr(bracket_open_pos+1, bracket_close_pos - bracket_open_pos - 1).c_str(), 0, 16); std::stringstream out; if(!funcname.empty()) @@ -181,7 +181,7 @@ namespace ngcore for (i = 1; i < bt_size-1; i++) { dladdr(bt[i], &info); - size_t len = strlen(bt_syms[i]); + // size_t len = strlen(bt_syms[i]); result << '#'<< i << '\t' << detail::TranslateBacktrace( bt_syms[i], info.dli_fname ); } free(bt_syms); diff --git a/libsrc/core/paje_trace.cpp b/libsrc/core/paje_trace.cpp index 818a92c8..570ebf4d 100644 --- a/libsrc/core/paje_trace.cpp +++ b/libsrc/core/paje_trace.cpp @@ -199,7 +199,7 @@ namespace ngcore { } PajeEvent( int aevent_type, double atime, int atype, int acontainer, std::string as_value, int aid = 0 ) - : time(atime), event_type(aevent_type), type(atype), container(acontainer), id(aid), s_value(as_value), value_is_alias(false), value_is_int(false) + : time(atime), event_type(aevent_type), type(atype), container(acontainer), s_value(as_value), id(aid), value_is_alias(false), value_is_int(false) { } PajeEvent( int aevent_type, double atime, int atype, int acontainer, int avalue, int astart_container, int akey ) diff --git a/libsrc/core/taskmanager.cpp b/libsrc/core/taskmanager.cpp index f57be4db..247700ea 100644 --- a/libsrc/core/taskmanager.cpp +++ b/libsrc/core/taskmanager.cpp @@ -412,7 +412,7 @@ namespace ngcore } } - catch (Exception e) + catch (Exception & e) { { lock_guard guard(copyex_mutex); @@ -548,7 +548,7 @@ namespace ngcore } } - catch (Exception e) + catch (Exception & e) { { // cout << "got exception in TM" << endl; diff --git a/libsrc/csg/revolution.cpp b/libsrc/csg/revolution.cpp index cc872cec..10ea2141 100644 --- a/libsrc/csg/revolution.cpp +++ b/libsrc/csg/revolution.cpp @@ -781,7 +781,7 @@ namespace netgen Point<2> p2d; faces[0]->CalcProj(p,p2d); - int intersections_before(0), intersections_after(0); + [[maybe_unused]] int intersections_before(0), intersections_after(0); double randomx = 7.42357; double randomy = 1.814756; double randomlen = sqrt(randomx*randomx+randomy*randomy); diff --git a/libsrc/csg/vscsg.cpp b/libsrc/csg/vscsg.cpp index be91902f..2e397ecf 100644 --- a/libsrc/csg/vscsg.cpp +++ b/libsrc/csg/vscsg.cpp @@ -393,9 +393,9 @@ namespace netgen glBitmap (7, 7, 3, 3, 0, 0, &knoedel[0]); } */ - for (const Point3d & p : mesh->Points()) + for (Point<3> p : mesh->Points()) { - glRasterPos3d (p.X(), p.Y(), p.Z()); + glRasterPos3d (p(0), p(1), p(2)); glBitmap (7, 7, 3, 3, 0, 0, &knoedel[0]); } } diff --git a/libsrc/general/myadt.hpp b/libsrc/general/myadt.hpp index d71e45b9..56f65ab2 100644 --- a/libsrc/general/myadt.hpp +++ b/libsrc/general/myadt.hpp @@ -12,7 +12,6 @@ */ - #include "../include/mystdlib.h" #include "../include/mydefs.hpp" diff --git a/libsrc/geom2d/csg2d.cpp b/libsrc/geom2d/csg2d.cpp index fdefb59c..20143d15 100644 --- a/libsrc/geom2d/csg2d.cpp +++ b/libsrc/geom2d/csg2d.cpp @@ -670,7 +670,7 @@ IntersectionType Intersect( Spline p, Spline s, double &alpha, double &beta) if(have_intersection) { - for(auto i : IntRange(10)) + for([[maybe_unused]] auto i : IntRange(10)) NewtonIntersect(p, s, alpha, beta); return ClassifyNonOverlappingIntersection( alpha, beta ); } @@ -1733,7 +1733,7 @@ Solid2d ClipSolids ( Solid2d && s1, Solid2d && s2, char op) res.polys.Append(std::move(res_polys)); - return std::move(res); + return res; } Vertex* Loop :: getNonIntersectionVertex() diff --git a/libsrc/geom2d/csg2d.hpp b/libsrc/geom2d/csg2d.hpp index dcc06132..737c6afb 100644 --- a/libsrc/geom2d/csg2d.hpp +++ b/libsrc/geom2d/csg2d.hpp @@ -602,7 +602,7 @@ struct Loop size_t cnt = 0; - for(auto v : Vertices(ALL)) + for([[maybe_unused]] auto v : Vertices(ALL)) cnt++; return cnt; diff --git a/libsrc/geom2d/genmesh2d.cpp b/libsrc/geom2d/genmesh2d.cpp index b2ed2dc3..7ab995fc 100644 --- a/libsrc/geom2d/genmesh2d.cpp +++ b/libsrc/geom2d/genmesh2d.cpp @@ -81,7 +81,7 @@ namespace netgen for (int j = 1; j <= n && i < nel; j++) { - double t = (j-0.5)*dt; + // double t = (j-0.5)*dt; double fun = hi[j-1]; f = oldf + dt / fun; @@ -92,7 +92,7 @@ namespace netgen i++; } oldf = f; - t += dt; + // t += dt; } points.Append (len); } @@ -511,7 +511,7 @@ namespace netgen t_h.Stop(); int bnp = mesh->GetNP(); // boundary points - auto BndPntRange = mesh->Points().Range(); + // auto BndPntRange = mesh->Points().Range(); int hquad = mp.quad; diff --git a/libsrc/interface/writeOpenFOAM15x.cpp b/libsrc/interface/writeOpenFOAM15x.cpp index 8b185d75..d484e8d9 100644 --- a/libsrc/interface/writeOpenFOAM15x.cpp +++ b/libsrc/interface/writeOpenFOAM15x.cpp @@ -600,7 +600,7 @@ namespace netgen void WriteOpenFOAM15xFormat (const Mesh & mesh, const filesystem::path & dirname, const bool compressed) { bool error = false; - char casefiles[256]; + // char casefiles[256]; // Make sure that the mesh data has been updated const_cast (mesh).Compress(); diff --git a/libsrc/interface/writeelmer.cpp b/libsrc/interface/writeelmer.cpp index ebaa97f7..2b0be044 100644 --- a/libsrc/interface/writeelmer.cpp +++ b/libsrc/interface/writeelmer.cpp @@ -57,7 +57,7 @@ void WriteElmerFormat (const Mesh &mesh, int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int i, j; - char str[200]; + // char str[200]; int inverttets = mparam.inverttets; int invertsurf = mparam.inverttrigs; diff --git a/libsrc/interface/writeuser.cpp b/libsrc/interface/writeuser.cpp index 637a22ec..24aeb57b 100644 --- a/libsrc/interface/writeuser.cpp +++ b/libsrc/interface/writeuser.cpp @@ -830,12 +830,12 @@ void WriteEdgeElementFormat (const Mesh & mesh, auto eledges = top->GetEdges(ElementIndex(i-1)); outfile << endl << " "; outfile.width(8); - outfile << edges.Size(); - for (j=1; j <= edges.Size(); j++) + outfile << eledges.Size(); + for (j=1; j <= eledges.Size(); j++) { outfile << " "; outfile.width(8); - outfile << edges[j-1]+1; + outfile << eledges[j-1]+1; } outfile << "\n"; diff --git a/libsrc/meshing/adfront3.cpp b/libsrc/meshing/adfront3.cpp index 588f1d23..c0776ebf 100644 --- a/libsrc/meshing/adfront3.cpp +++ b/libsrc/meshing/adfront3.cpp @@ -357,12 +357,14 @@ void AdFront3 :: RebuildInternalTables () faces.Elem(i).cluster = points[faces.Get(i).Face().PNum(1)].cluster; } + /* int cntcl = 0; for (int i = PointIndex::BASE; i < np+PointIndex::BASE; i++) if (usecl[i]) cntcl++; - + */ + NgArray clvol (np); clvol = 0.0; diff --git a/libsrc/meshing/basegeom.cpp b/libsrc/meshing/basegeom.cpp index f6818eba..2cd03a2d 100644 --- a/libsrc/meshing/basegeom.cpp +++ b/libsrc/meshing/basegeom.cpp @@ -513,7 +513,7 @@ namespace netgen tdivedgesections.Stop(); - auto n = hvalue.Size()-1; + // auto n = hvalue.Size()-1; int nsubedges = max2(1, int(floor(hvalue.Last()+0.5))); points.SetSize(nsubedges-1); params.SetSize(nsubedges+1); @@ -590,7 +590,7 @@ namespace netgen ident.name, ident.type); - size_t segnr = 0; + // size_t segnr = 0; auto nedges = edges.Size(); Array> all_pnums(nedges); Array> all_params(nedges); @@ -644,7 +644,7 @@ namespace netgen { auto nr_primary = edge->primary->nr; auto & pnums_primary = all_pnums[nr_primary]; - auto & params_primary = all_params[nr_primary]; + // auto & params_primary = all_params[nr_primary]; auto trafo = edge->primary_to_me; auto np = pnums_primary.Size(); @@ -707,7 +707,7 @@ namespace netgen for(auto i : Range(pnums.Size()-1)) { - segnr++; + // segnr++; Segment seg; seg[0] = pnums[i]; seg[1] = pnums[i+1]; @@ -866,7 +866,7 @@ namespace netgen { auto edgenr = s.edgenr-1; auto & edge = *edges[edgenr]; - ShapeIdentification *edge_mapping; + // ShapeIdentification *edge_mapping; // have edgenr first time, search for closesurface identification diff --git a/libsrc/meshing/clusters.cpp b/libsrc/meshing/clusters.cpp index 4b544a20..3bb98f9e 100644 --- a/libsrc/meshing/clusters.cpp +++ b/libsrc/meshing/clusters.cpp @@ -41,7 +41,7 @@ namespace netgen ned = top.GetNEdges(); nfa = top.GetNFaces(); ne = mesh.GetNE(); - int nse = mesh.GetNSE(); + // int nse = mesh.GetNSE(); cluster_reps.SetSize (nv+ned+nfa+ne); cluster_reps = -1; @@ -218,13 +218,13 @@ namespace netgen static const int tet_cluster34[] = { 2, 3, 1, 1, 4, 5, 1, 6, 4, 5, 5, 4, 7, 7, 7 }; - int cnt = 0; + // int cnt = 0; do { static Timer t("update cluster, identify"); RegionTimer rtr(t); - cnt++; + // cnt++; changed = 0; for (int i = 1; i <= ne; i++) diff --git a/libsrc/meshing/curvedelems.cpp b/libsrc/meshing/curvedelems.cpp index ddc3fe34..10c857fb 100644 --- a/libsrc/meshing/curvedelems.cpp +++ b/libsrc/meshing/curvedelems.cpp @@ -3313,10 +3313,10 @@ namespace netgen int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1); if (el[vi1] > el[vi2]) swap (vi1, vi2); - T bubz = lamiz[vi1] * lamiz[vi2]; - T dbubz = dlamiz[vi1]*lamiz[vi2] + lamiz[vi1]*dlamiz[vi2]; - T polyz = lamiz[vi1] - lamiz[vi2]; - T dpolyz = dlamiz[vi1] - dlamiz[vi2]; + // T bubz = lamiz[vi1] * lamiz[vi2]; + // T dbubz = dlamiz[vi1]*lamiz[vi2] + lamiz[vi1]*dlamiz[vi2]; + // T polyz = lamiz[vi1] - lamiz[vi2]; + // T dpolyz = dlamiz[vi1] - dlamiz[vi2]; T bubxy = lami[(vi1)%3]; T dbubxydx = dlami[(vi1)%3][0]; T dbubxydy = dlami[(vi1)%3][1]; diff --git a/libsrc/meshing/fieldlines.cpp b/libsrc/meshing/fieldlines.cpp index 84cf0a65..f77ce19a 100644 --- a/libsrc/meshing/fieldlines.cpp +++ b/libsrc/meshing/fieldlines.cpp @@ -340,7 +340,7 @@ namespace netgen break; } - double dummyt; + double dummyt{0}; stepper.StartNextValCalc(points.Last(),dummyt,h,true); stepper.FeedNextF(v); bool drawelem = false; diff --git a/libsrc/meshing/geomsearch.cpp b/libsrc/meshing/geomsearch.cpp index dde4d5ac..bfeeecc9 100644 --- a/libsrc/meshing/geomsearch.cpp +++ b/libsrc/meshing/geomsearch.cpp @@ -199,9 +199,9 @@ namespace netgen int ez = int((maxp.Z()-minext.Z())/elemsize.Z()+1.); int ix,iy,iz,i,k; - int cnt1 = 0; // test, how efficient hashtable is - int cnt2 = 0; - int cnt3 = 0; + [[maybe_unused]] int cnt1 = 0; // test, how efficient hashtable is + [[maybe_unused]] int cnt2 = 0; + [[maybe_unused]] int cnt3 = 0; for (ix = sx; ix <= ex; ix++) { diff --git a/libsrc/meshing/improve2.cpp b/libsrc/meshing/improve2.cpp index 139eddb4..a2b28468 100644 --- a/libsrc/meshing/improve2.cpp +++ b/libsrc/meshing/improve2.cpp @@ -602,7 +602,7 @@ namespace netgen auto elementsonnode = mesh.CreatePoint2SurfaceElementTable(faceindex); - int ntasks = ngcore::TaskManager::GetMaxThreads(); + // int ntasks = ngcore::TaskManager::GetMaxThreads(); Array> edges; BuildEdgeList( mesh, elementsonnode, edges ); diff --git a/libsrc/meshing/improve3.cpp b/libsrc/meshing/improve3.cpp index b9ee7585..cdfa2295 100644 --- a/libsrc/meshing/improve3.cpp +++ b/libsrc/meshing/improve3.cpp @@ -224,7 +224,7 @@ double MeshOptimize3d :: CombineImproveEdge (Mesh & mesh, for (auto ei : has_one_point) { Element elem = mesh[ei]; - int l; + // int l; for (int l = 0; l < 4; l++) if (elem[l] == pi1) { @@ -392,7 +392,7 @@ void MeshOptimize3d :: CombineImprove (Mesh & mesh, double MeshOptimize3d :: SplitImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal, Table & elementsonnode, Array &elerrs, NgArray &locfaces, double badmax, PointIndex pi1, PointIndex pi2, PointIndex ptmp, bool check_only) { double d_badness = 0.0; - int cnt = 0; + // int cnt = 0; ArrayMem hasbothpoints; @@ -526,7 +526,7 @@ double MeshOptimize3d :: SplitImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal, Table if (d_badness<0.0) { - cnt++; + // cnt++; PointIndex pinew = mesh.AddPoint (pnew); @@ -562,7 +562,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh, static Timer topt("Optimize"); static Timer tsearch("Search"); - int np = mesh.GetNP(); + // int np = mesh.GetNP(); int ne = mesh.GetNE(); double bad = 0.0; double badmax = 0.0; @@ -646,7 +646,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh, bad = mesh.CalcTotalBad (mp); (*testout) << "Total badness = " << bad << endl; - int cntill = 0; + [[maybe_unused]] int cntill = 0; ne = mesh.GetNE(); for (ElementIndex ei = 0; ei < ne; ei++) if (!mesh.LegalTet (mesh[ei])) @@ -1247,7 +1247,7 @@ double MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal, for (int k = bestl+1; k <= nsuround + bestl - 2; k++) { - int k1; + // int k1; hel[0] = suroundpts[bestl]; hel[1] = suroundpts[k % nsuround]; @@ -1297,8 +1297,8 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, int cnt = 0; - int np = mesh.GetNP(); - int ne = mesh.GetNE(); + // int np = mesh.GetNP(); + // int ne = mesh.GetNE(); mesh.BuildBoundaryEdges(false); BitArray free_points(mesh.GetNP()+PointIndex::BASE); @@ -1449,7 +1449,7 @@ void MeshOptimize3d :: SwapImproveSurface (Mesh & mesh, OPTIMIZEGOAL goal, } - PointIndex pi1, pi2, pi3, pi4, pi5, pi6; + PointIndex pi1, pi2; // , pi3, pi4, pi5, pi6; PointIndex pi1other, pi2other; int cnt = 0; @@ -2466,7 +2466,7 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal) mesh.BuildBoundaryEdges(false); int cnt = 0; - double bad1, bad2; + // double bad1, bad2; int np = mesh.GetNP(); int ne = mesh.GetNE(); @@ -2478,7 +2478,7 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal) PrintMessage (3, "SwapImprove2 "); (*testout) << "\n" << "Start SwapImprove2" << "\n"; - bad1 = mesh.CalcTotalBad (mp); + double bad1 = mesh.CalcTotalBad (mp); (*testout) << "Total badness = " << bad1 << endl; // find elements on node diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index b8b8e604..16749a25 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -1180,7 +1180,7 @@ namespace netgen throw NgException ("mesh file not found"); } - int rank = GetCommunicator().Rank(); + // int rank = GetCommunicator().Rank(); int ntasks = GetCommunicator().Size(); char str[100]; @@ -1215,7 +1215,7 @@ namespace netgen { int nfd; infile >> nfd; - for(auto i : Range(nfd)) + for([[maybe_unused]] auto i : Range(nfd)) { int surfnr, domin, domout, tlosurf, bcprop; infile >> surfnr >> domin >> domout >> tlosurf >> bcprop; @@ -1439,7 +1439,7 @@ namespace netgen if (strcmp (str, "materials") == 0) { infile >> n; - for ( auto i : Range(n) ) + for ([[maybe_unused]] auto i : Range(n) ) { int nr; string mat; @@ -1615,7 +1615,7 @@ namespace netgen { int cnt_facedesc = GetNFD(); infile >> n; - int index = 1; + // int index = 1; if(n == cnt_facedesc) { for(int index = 1; index <= n; index++) @@ -1676,7 +1676,7 @@ namespace netgen if (comm.Rank() == 0) archive & dimension; - auto rank = comm.Rank(); + // auto rank = comm.Rank(); auto & partop = GetParallelTopology(); @@ -1833,7 +1833,7 @@ namespace netgen if (archive.Input()) { - int rank = GetCommunicator().Rank(); + // int rank = GetCommunicator().Rank(); int ntasks = GetCommunicator().Size(); RebuildSurfaceElementLists(); @@ -2391,8 +2391,8 @@ namespace netgen cerr << "Mesh::FixPoints: sizes don't fit" << endl; return; } - int np = GetNP(); /* + int np = GetNP(); for (int i = 1; i <= np; i++) if (fixpoints.Test(i)) { @@ -2412,7 +2412,7 @@ namespace netgen static Timer t_pointloop("Mesh::FindOpenElements - pointloop"); int np = GetNP(); - int ne = GetNE(); + // int ne = GetNE(); int nse = GetNSE(); t_table.Start(); @@ -2957,7 +2957,7 @@ namespace netgen for (int j = 1; j <= el.GetNP(); j++) { INDEX_3 seg (el.PNumMod(j), el.PNumMod(j+1), el.GetIndex()); - int data; + // int data; if (seg.I1() < PointIndex::BASE || seg.I2() < PointIndex::BASE) cerr << "seg = " << seg << endl; @@ -5710,7 +5710,7 @@ namespace netgen double delta=1; - bool retval; + // bool retval; int i = 0; @@ -7413,7 +7413,7 @@ namespace netgen auto l = v.Length(); if(l> ipmap; ipmap.SetSize(num_domains); - auto dim = mesh.GetDimension(); + // auto dim = mesh.GetDimension(); auto num_points = mesh.GetNP(); auto num_facedescriptors = mesh.GetNFD(); @@ -635,7 +635,7 @@ namespace netgen const char* savetask = multithread.task; multithread.task = "Optimize Volume"; - int i; + // int i; PrintMessage (1, "Volume Optimization"); diff --git a/libsrc/meshing/meshing2.cpp b/libsrc/meshing/meshing2.cpp index deadcd10..a1696143 100644 --- a/libsrc/meshing/meshing2.cpp +++ b/libsrc/meshing/meshing2.cpp @@ -285,7 +285,7 @@ namespace netgen NgArray plainzones; auto loclinesptr = make_shared>(); auto &loclines = *loclinesptr; - int cntelem = 0, trials = 0, nfaces = 0; + int trials = 0, nfaces = 0; int oldnl = 0; UpdateVisSurfaceMeshData(oldnl, locpointsptr, loclinesptr, plainpointsptr); @@ -1379,7 +1379,7 @@ namespace netgen mesh.AddSurfaceElement (mtri); - cntelem++; + // cntelem++; // cout << "elements: " << cntelem << endl; diff --git a/libsrc/meshing/meshing3.cpp b/libsrc/meshing/meshing3.cpp index 2d5436f3..646478d8 100644 --- a/libsrc/meshing/meshing3.cpp +++ b/libsrc/meshing/meshing3.cpp @@ -219,7 +219,7 @@ GenerateMesh (Mesh & mesh, const MeshingParameters & mp) float minerr; int hasfound; - double tetvol; + [[maybe_unused]] double tetvol; // int giveup = 0; diff --git a/libsrc/meshing/parallelmesh.cpp b/libsrc/meshing/parallelmesh.cpp index 05cebf56..e6171ca4 100644 --- a/libsrc/meshing/parallelmesh.cpp +++ b/libsrc/meshing/parallelmesh.cpp @@ -216,7 +216,7 @@ namespace netgen static Timer tbuildelementtable("SendMesh::Build_elementtable"); NgMPI_Comm comm = GetCommunicator(); - int id = comm.Rank(); + // int id = comm.Rank(); int ntasks = comm.Size(); int dim = GetDimension(); @@ -630,7 +630,7 @@ namespace netgen size_t nse = GetNSE(); NgArray ided_sel(nse); ided_sel = -1; - bool has_ided_sels = false; + [[maybe_unused]] bool has_ided_sels = false; if(GetNE() && has_periodic) //we can only have identified surf-els if we have vol-els (right?) { Array os1, os2; @@ -661,8 +661,8 @@ namespace netgen if(os1.Size()>1) { throw NgException("SurfaceElement identified with more than one other??"); } - const Element2d & sel2 = (*this)[sei]; - auto points2 = sel2.PNums(); + // const Element2d & sel2 = (*this)[sei]; + // auto points2 = sel2.PNums(); has_ided_sels = true; ided_sel[sei] = os1[0]; ided_sel[os1[0]] = sei; @@ -937,13 +937,13 @@ namespace netgen self.segments = Array(0); self.pointelements = Array(0); self.lockedpoints = Array(0); + /* auto cleanup_ptr = [](auto & ptr) { if (ptr != nullptr) { delete ptr; ptr = nullptr; } }; - /* cleanup_ptr(self.boundaryedges); cleanup_ptr(self.segmentht); cleanup_ptr(self.surfelementht); @@ -991,7 +991,7 @@ namespace netgen NgMPI_Comm comm = GetCommunicator(); int id = comm.Rank(); - int ntasks = comm.Size(); + // int ntasks = comm.Size(); int dim; comm.Bcast(dim); diff --git a/libsrc/meshing/paralleltop.cpp b/libsrc/meshing/paralleltop.cpp index 5694f94b..88c0ab39 100644 --- a/libsrc/meshing/paralleltop.cpp +++ b/libsrc/meshing/paralleltop.cpp @@ -319,7 +319,7 @@ namespace netgen { topology.GetElementFaces (el, faces); topology.GetElementEdges (el, edges); - const Element & volel = mesh.VolumeElement (el); + // const Element & volel = mesh.VolumeElement (el); // NgArray & sendarray = *sendarrays[volel.GetPartition()]; NgArray & sendarray = *sendarrays[mesh.vol_partition[el-1]]; @@ -333,7 +333,7 @@ namespace netgen for (int el = 1; el <= mesh.GetNSE(); el++) { topology.GetSurfaceElementEdges (el, edges); - const Element2d & surfel = mesh.SurfaceElement (el); + // const Element2d & surfel = mesh.SurfaceElement (el); // NgArray & sendarray = *sendarrays[surfel.GetPartition()]; NgArray & sendarray = *sendarrays[mesh.surf_partition[el-1]]; @@ -409,7 +409,7 @@ namespace netgen PrintMessage (1, "update parallel topology"); - const MeshTopology & topology = mesh.GetTopology(); + // const MeshTopology & topology = mesh.GetTopology(); Array cnt_send(ntasks); @@ -542,7 +542,7 @@ namespace netgen // static int timerv = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex vertices"); static int timere = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex edges"); - static int timerf = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex faces"); + // static int timerf = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex faces"); NgProfiler::StartTimer (timere); diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 35d12877..0b114013 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -1058,13 +1058,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) self.Points().SetAllocSize(self.Points().Size()+info.shape[0]); if (info.shape[1]==2) - for (auto i : Range(info.shape[0])) + for ([[maybe_unused]] auto i : Range(info.shape[0])) { self.AddPoint (Point<3>(ptr[0], ptr[1], 0)); ptr += 2; } if (info.shape[1]==3) - for (auto i : Range(info.shape[0])) + for ([[maybe_unused]] auto i : Range(info.shape[0])) { self.AddPoint (Point<3>(ptr[0], ptr[1], ptr[2])); ptr += 3; @@ -1089,10 +1089,10 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) int * ptr = static_cast (info.ptr); if (dim == 1) { - ELEMENT_TYPE type; + // ELEMENT_TYPE type; int np = info.shape[1]; self.LineSegments().SetAllocSize(self.LineSegments().Size()+info.shape[0]); - for (auto i : Range(info.shape[0])) + for ([[maybe_unused]] auto i : Range(info.shape[0])) { Segment el; for (int j = 0; j < np; j++) @@ -1116,7 +1116,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) throw Exception("unsupported 2D element with "+ToString(np)+" points"); } self.SurfaceElements().SetAllocSize(self.SurfaceElements().Size()+info.shape[0]); - for (auto i : Range(info.shape[0])) + for ([[maybe_unused]] auto i : Range(info.shape[0])) { Element2d el(type); for (int j = 0; j < np; j++) @@ -1142,7 +1142,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) throw Exception("unsupported 3D element with "+ToString(np)+" points"); } self.VolumeElements().SetAllocSize(self.VolumeElements().Size()+info.shape[0]); - for (auto i : Range(info.shape[0])) + for ([[maybe_unused]] auto i : Range(info.shape[0])) { Element el(type); for (int j = 0; j < np;j ++) @@ -1350,7 +1350,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) size_t npts = ref_info.shape[0]; size_t dim = ref_info.shape[1]; - size_t nel = phys_info.shape[0]; + // size_t nel = phys_info.shape[0]; size_t dim_phys = phys_info.shape[2]; size_t stride_refpts = ref_info.strides[0]/sizeof(double); diff --git a/libsrc/meshing/smoothing3.cpp b/libsrc/meshing/smoothing3.cpp index 321c6704..3cc10f7c 100644 --- a/libsrc/meshing/smoothing3.cpp +++ b/libsrc/meshing/smoothing3.cpp @@ -1001,7 +1001,6 @@ void JacobianPointFunction :: SetPointIndex (PointIndex aactpind) double JacobianPointFunction :: Func (const Vector & v) const { - int j; double badness = 0; Point<3> hp = points[actpind]; @@ -1027,7 +1026,7 @@ double JacobianPointFunction :: Func (const Vector & v) const double JacobianPointFunction :: FuncGrad (const Vector & x, Vector & g) const { - int j, k; + int k; int lpi; double badness = 0;//, hbad; @@ -1094,7 +1093,7 @@ FuncGrad (const Vector & x, Vector & g) const double JacobianPointFunction :: FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { - int j, k; + int k; int lpi; double badness = 0; @@ -1338,7 +1337,7 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal) (*testout) << "Improve Mesh" << "\n"; PrintMessage (3, "ImproveMesh"); - int np = GetNP(); + // int np = GetNP(); int ne = GetNE(); PointFunction pf_glob(*this, mp); diff --git a/libsrc/meshing/surfacegeom.cpp b/libsrc/meshing/surfacegeom.cpp index a2e81d4d..09f57332 100644 --- a/libsrc/meshing/surfacegeom.cpp +++ b/libsrc/meshing/surfacegeom.cpp @@ -120,7 +120,7 @@ namespace netgen Array> tangs(2); Vec<3> diff, f_uu, f_vv, f_uv; Vec<2> r, dx; - double norm_r, det, energy=0.0, new_energy=0.0, alpha=2.0,u=0.0,v=0.0,maxerr=1e-16; + double norm_r, energy=0.0, new_energy=0.0, alpha=2.0,u=0.0,v=0.0,maxerr=1e-16; Mat<2,2> mat, inv; int num=0, maxit=25; double damping=0.5; diff --git a/libsrc/meshing/topology.cpp b/libsrc/meshing/topology.cpp index 92df2fd5..25b169d4 100644 --- a/libsrc/meshing/topology.cpp +++ b/libsrc/meshing/topology.cpp @@ -162,8 +162,9 @@ namespace netgen { // triangle INDEX_4 face(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], 0); - - int facedir = 0; + + + [[maybe_unused]] int facedir = 0; if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 1; } if (face.I2() > face.I3()) @@ -753,7 +754,7 @@ namespace netgen { INT<2> paedge1, paedge2, paedge3; int orient1 = 0, orient2 = 0, orient3=0; - int orient_inner = 0; + // int orient_inner = 0; paedge1 = INT<2> (pa0[0], pa0[1]); paedge2 = INT<2> (pa1[0], pa1[1]); // find common vertex and the third pa edge diff --git a/libsrc/meshing/visual_interface.hpp b/libsrc/meshing/visual_interface.hpp index 5f856a24..c1bd03b7 100644 --- a/libsrc/meshing/visual_interface.hpp +++ b/libsrc/meshing/visual_interface.hpp @@ -5,7 +5,7 @@ #include #include -class Ng_SolutionData; +struct Ng_SolutionData; // Function pointers for visualization purposed, all set to nullptr by default and initialized correctly when the GUI library is loaded @@ -15,7 +15,7 @@ DLL_HEADER extern void (*Ptr_Ng_SetSolutionData) (Ng_SolutionData * soldata); DLL_HEADER extern void (*Ptr_Ng_Redraw) (bool blocking); // Tcl wrapper functions -class Tcl_Interp; +struct Tcl_Interp; typedef int (Tcl_CmdProc) (void * clientData, Tcl_Interp *interp, int argc, const char *argv[]); typedef void (Tcl_FreeProc) (char *blockPtr); diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index 4cf9306c..656b8e36 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -249,7 +249,7 @@ namespace netgen multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL); geom.facemeshstatus[k-1] = -1; - FaceDescriptor & fd = mesh.GetFaceDescriptor(k); + // FaceDescriptor & fd = mesh.GetFaceDescriptor(k); auto face = TopoDS::Face(geom.fmap(k)); const auto& occface = dynamic_cast(geom.GetFace(k-1)); @@ -342,7 +342,7 @@ namespace netgen Array gis(2*segments.Size()); gis.SetSize (0); glob2loc = 0; - int cntpt = 0; + // int cntpt = 0; Box<2> uv_box(Box<2>::EMPTY_BOX); for(auto & seg : segments) @@ -735,7 +735,7 @@ namespace netgen gp_Vec d0 = prop.D1().Normalized(); double s_start = s0; - int count = 0; + // int count = 0; for (int j = 1; j <= sections; j++) { double s = s0 + (s1-s0)*(double)j/(double)sections; @@ -744,7 +744,7 @@ namespace netgen double cosalpha = fabs(d0*d1); if ((j == sections) || (cosalpha < cos(10.0/180.0*M_PI))) { - count++; + // count++; gp_Pnt p0 = c->Value (s_start); gp_Pnt p1 = c->Value (s); lines[nlines].p0 = Point<3> (p0.X(), p0.Y(), p0.Z()); diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp index d53dbf16..c70a779d 100644 --- a/libsrc/occ/occgeom.cpp +++ b/libsrc/occ/occgeom.cpp @@ -1335,7 +1335,7 @@ namespace netgen const auto& occface = dynamic_cast(face); for(auto& vert : GetVertices(occface.Shape())) verts.Append(&GetVertex(vert)); - return std::move(verts); + return verts; } @@ -2243,7 +2243,7 @@ namespace netgen auto & identifications = OCCGeometry::GetIdentifications(shape); if(identifications.size()==0) return; - auto n = identifications.size(); + // auto n = identifications.size(); Array ident_items; ident_items.Append(item); diff --git a/libsrc/occ/occmeshsurf.cpp b/libsrc/occ/occmeshsurf.cpp index 0e707e94..812ef03c 100644 --- a/libsrc/occ/occmeshsurf.cpp +++ b/libsrc/occ/occmeshsurf.cpp @@ -37,7 +37,7 @@ namespace netgen double setu=geominfo.u,setv=geominfo.v; double ustep = 0.01*(umax-umin); - double vstep = 0.01*(vmax-vmin); + // double vstep = 0.01*(vmax-vmin); n=0; diff --git a/libsrc/occ/vsocc.hpp b/libsrc/occ/vsocc.hpp index 777028f4..a96e4378 100644 --- a/libsrc/occ/vsocc.hpp +++ b/libsrc/occ/vsocc.hpp @@ -14,7 +14,7 @@ namespace netgen { NgArray trilists; NgArray linelists; - int selsurf; + // int selsurf; class OCCGeometry * occgeometry; public: VisualSceneOCCGeometry (); diff --git a/libsrc/stlgeom/stlgeom.cpp b/libsrc/stlgeom/stlgeom.cpp index 0a8496e8..a596cfc4 100644 --- a/libsrc/stlgeom/stlgeom.cpp +++ b/libsrc/stlgeom/stlgeom.cpp @@ -536,7 +536,7 @@ void STLGeometry :: SmoothNormals(const STLParameters& stlparam) area2 += area; } - } + } (*testout) << "area1 = " << area1 << " area2 = " << area2 << endl; if (area1 < 0.1 * area2) @@ -2630,10 +2630,10 @@ void STLGeometry :: FindEdgesFromAngles(const STLParameters& stlparam) if (stlparam.contyangle < stlparam.yangle) { int changed = 1; - int its = 0; + [[maybe_unused]] int its = 0; while (changed && stlparam.contyangle < stlparam.yangle) { - its++; + its++; //(*mycout) << "." << flush; changed = 0; for (int i = 1; i <= edgedata->Size(); i++) @@ -3659,7 +3659,7 @@ void STLGeometry :: WriteChartToFile( ChartId chartnumber, filesystem::path file pts[k] = GetPoint(trig[k]); box.Add(pts[k]); } - Vec3d normal = Cross( pts[1]-pts[0], pts[2]-pts[0] ); + // Vec3d normal = Cross( pts[1]-pts[0], pts[2]-pts[0] ); readtrigs.Append(STLReadTriangle(pts, trig.Normal())); } auto dist = box.PMax() - box.PMin(); diff --git a/libsrc/stlgeom/stlgeomchart.cpp b/libsrc/stlgeom/stlgeomchart.cpp index a3a22f89..e4bceffe 100644 --- a/libsrc/stlgeom/stlgeomchart.cpp +++ b/libsrc/stlgeom/stlgeomchart.cpp @@ -749,7 +749,7 @@ void STLGeometry :: GetDirtyChartTrigs(int chartnum, STLChart& chart, dirtytrigs.SetSize(0); - int cnt = 0; + // int cnt = 0; for (int j = 1; j <= chart.GetNChartT(); j++) { @@ -766,13 +766,13 @@ void STLGeometry :: GetDirtyChartTrigs(int chartnum, STLChart& chart, if (!IsEdge(np1,np2)) { dirtytrigs.Append(j); //local numbers!!! - cnt++; + // cnt++; break; //only once per trig!!! } } } } - cnt = 0; + // cnt = 0; STLPointId ap1, ap2, pn; Array trigsaroundp; @@ -832,7 +832,7 @@ void STLGeometry :: GetDirtyChartTrigs(int chartnum, STLChart& chart, if (problem && !dirtytrigs.Contains(j)) { dirtytrigs.Append(j); - cnt++; + // cnt++; break; //only once per triangle } } diff --git a/libsrc/stlgeom/stlgeommesh.cpp b/libsrc/stlgeom/stlgeommesh.cpp index 00e38724..67b1598d 100644 --- a/libsrc/stlgeom/stlgeommesh.cpp +++ b/libsrc/stlgeom/stlgeommesh.cpp @@ -536,11 +536,11 @@ int STLGeometry :: Project(Point<3> & p3d) const { Point<3> p, pf; - int j; + // int j; int fi = 0; - int cnt = 0; + // int cnt = 0; int different = 0; - const double lamtol = 1e-6; + // const double lamtol = 1e-6; const STLChart& chart = GetChart(meshchart); diff --git a/libsrc/stlgeom/stltool.cpp b/libsrc/stlgeom/stltool.cpp index d2377cb1..67fec1bd 100644 --- a/libsrc/stlgeom/stltool.cpp +++ b/libsrc/stlgeom/stltool.cpp @@ -1172,7 +1172,7 @@ bool STLBoundary :: TestSeg(const Point<3>& p1, const Point<3> & p2, const Vec<3 } #endif - int i,j,k; + int i,k; Point<3> seg1p/*, seg2p*/; Point<3> sp1,sp2; double lambda1, lambda2, vlen2; diff --git a/libsrc/stlgeom/stltopology.cpp b/libsrc/stlgeom/stltopology.cpp index 2ef61885..55d17bad 100644 --- a/libsrc/stlgeom/stltopology.cpp +++ b/libsrc/stlgeom/stltopology.cpp @@ -353,7 +353,7 @@ STLGeometry * STLTopology ::Load (istream & ist, bool surface) if(std::isblank(buf[istart])==0) break; - for (auto i : Range(buflen)) + for ([[maybe_unused]] auto i : Range(buflen)) ist.unget(); // does not start with "solid" -> binary file @@ -374,7 +374,7 @@ STLGeometry * STLTopology ::Load (istream & ist, bool surface) Point<3> pts[3]; Vec<3> normal; - int cntface = 0; + [[maybe_unused]] int cntface = 0; int vertex = 0; bool badnormals = false; ist >> buf; // skip first line diff --git a/libsrc/visualization/mvdraw.cpp b/libsrc/visualization/mvdraw.cpp index b6f70627..54b304dc 100644 --- a/libsrc/visualization/mvdraw.cpp +++ b/libsrc/visualization/mvdraw.cpp @@ -950,7 +950,7 @@ namespace netgen // glEnable (GL_LIGHTING); double shine = vispar.shininess; - double transp = vispar.transp; + // double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); diff --git a/libsrc/visualization/vsmesh.cpp b/libsrc/visualization/vsmesh.cpp index 715c7ffe..1bbe25e8 100644 --- a/libsrc/visualization/vsmesh.cpp +++ b/libsrc/visualization/vsmesh.cpp @@ -873,7 +873,7 @@ namespace netgen int n = data.Size()/4; colors.width = min2(n, 1024); colors.height = (n+colors.width-1)/colors.width; - for(auto i: Range(n, colors.width*colors.height)) + for([[maybe_unused]] auto i: Range(n, colors.width*colors.height)) data.Append({0.0f, 0.0f, 0.0f, 0.0f}); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, colors.width, colors.height, 0, GL_RGBA, GL_FLOAT, data.Data()); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -986,8 +986,8 @@ namespace netgen glBindTexture(GL_TEXTURE_2D, colors.texture); } - GLfloat matcol[] = { 0, 1, 0, 1 }; - GLfloat matcolsel[] = { 1, 0, 0, 1 }; + // GLfloat matcol[] = { 0, 1, 0, 1 }; + // GLfloat matcolsel[] = { 1, 0, 0, 1 }; GLint rendermode; glGetIntegerv (GL_RENDER_MODE, &rendermode); @@ -1021,7 +1021,7 @@ namespace netgen SurfaceElementIndex sei = seia[hi]; const Element2d & el = (*mesh)[sei]; - bool drawel = (!el.IsDeleted() & el.IsVisible()); + bool drawel = (!el.IsDeleted() && el.IsVisible()); #ifdef STLGEOM if (checkvicinity) @@ -1364,7 +1364,7 @@ namespace netgen { const Element2d & el = (*mesh)[sei]; - bool drawel = (!el.IsDeleted() & el.IsVisible()); + bool drawel = (!el.IsDeleted() && el.IsVisible()); #ifdef STLGEOM if (checkvicinity) @@ -3135,7 +3135,7 @@ namespace netgen } glGetIntegerv (GL_VIEWPORT, select.viewport); - GLenum err; + // GLenum err; if(select.framebuffer == 0 || select.viewport[2] != select.width || select.viewport[3] != select.height) { select.width = select.viewport[2]; diff --git a/libsrc/visualization/vssolution.cpp b/libsrc/visualization/vssolution.cpp index baaaf448..7079590b 100644 --- a/libsrc/visualization/vssolution.cpp +++ b/libsrc/visualization/vssolution.cpp @@ -4736,7 +4736,7 @@ namespace netgen void VisualSceneSolution :: MouseDblClick (int px, int py) { auto mesh = GetMesh(); - auto dim = mesh->GetDimension(); + // auto dim = mesh->GetDimension(); marker = nullopt; auto formatComplex = [](double real, double imag) @@ -4817,7 +4817,7 @@ namespace netgen // marker = p; bool have_scal_func = scalfunction!=-1 && soldata[scalfunction]->draw_volume; - bool have_vec_func = vecfunction!=-1 && soldata[vecfunction]->draw_volume; + // bool have_vec_func = vecfunction!=-1 && soldata[vecfunction]->draw_volume; if(have_scal_func) { diff --git a/rules/makerlsfile.cpp b/rules/makerlsfile.cpp index 822c721d..18b7d512 100644 --- a/rules/makerlsfile.cpp +++ b/rules/makerlsfile.cpp @@ -15,10 +15,10 @@ int main (int argc, char ** argv) exit(1); } - - char line[maxlen], infile[maxlen], outfile[maxlen];\ + + char line[maxlen]; // , infile[maxlen], outfile[maxlen]; char ch; - int i, j; + int i; /* cout << "infile: ";