From ae749afa0bd09920f3312eb9810cacbeba35dd10 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 8 Jan 2024 10:36:44 +0100 Subject: [PATCH] Remove warnings --- libsrc/meshing/boundarylayer.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/libsrc/meshing/boundarylayer.cpp b/libsrc/meshing/boundarylayer.cpp index ba3053b5..f5dfddbe 100644 --- a/libsrc/meshing/boundarylayer.cpp +++ b/libsrc/meshing/boundarylayer.cpp @@ -616,7 +616,7 @@ struct GrowthVectorLimiter { // Vec<3> ab_base_norm = (b_base - a_base).Normalize(); // double a_vec_x = Dot(a_vec, ab_base_norm); // double b_vec_x = Dot(b_vec, -ab_base_norm); - // double ratio_parallel = (a_vec_x + b_vec_x) / ab_base; + // // double ratio_parallel = (a_vec_x + b_vec_x) / ab_base; // double PARALLEL_RATIO_LIMIT = 0.85; // if (ratio_parallel > PARALLEL_RATIO_LIMIT) { @@ -671,7 +671,7 @@ struct GrowthVectorLimiter { // }; // // auto modifiedsmooth = [&](size_t nsteps) { - // for (auto i : Range(nsteps)) + // for ([[maybe_unused]] auto i : Range(nsteps)) // for (SurfaceElementIndex sei : mesh.SurfaceElements().Range()) // { // // assuming triangle @@ -682,7 +682,7 @@ struct GrowthVectorLimiter { // }; // auto smooth = [&] (size_t nsteps) { - // for(auto i : Range(nsteps)) + // for([[maybe_unused]] auto i : Range(nsteps)) // for(const auto & sel : mesh.SurfaceElements()) // { // double min_limit = 999; @@ -893,7 +893,7 @@ struct GrowthVectorLimiter { Array BuildSegments( Mesh & mesh ) { Array segments; - auto& topo = mesh.GetTopology(); + // auto& topo = mesh.GetTopology(); NgArray surf_els; @@ -1007,14 +1007,14 @@ struct GrowthVectorLimiter { auto p2sel = mesh.CreatePoint2SurfaceElementTable(); // smooth tangential part of growth vectors from edges to surface elements RegionTimer rtsmooth(tsmooth); - for(auto i : Range(10)) + for([[maybe_unused]] auto i : Range(10)) { for(auto pi : points) { auto sels = p2sel[pi]; Vec<3> new_gw = getGW(pi); new_gw = 0.; - int cnt = 1; + // int cnt = 1; std::set suround; suround.insert(pi); double total_weight = 0; @@ -1163,20 +1163,22 @@ struct GrowthVectorLimiter { if(face_done.Test(facei)) continue; bool point_moved = false; - bool point_fixed = false; + // bool point_fixed = false; for(auto pi : sel.PNums()) { if(growthvectors[pi].Length() > 0) point_moved = true; + /* else point_fixed = true; + */ } if(point_moved && !moved_surfaces.Test(facei)) { int new_si = mesh.GetNFD()+1; const auto& fd = mesh.GetFaceDescriptor(facei); - auto isIn = domains.Test(fd.DomainIn()); - auto isOut = domains.Test(fd.DomainOut()); + // auto isIn = domains.Test(fd.DomainIn()); + // auto isOut = domains.Test(fd.DomainOut()); int si = params.sides_keep_surfaceindex ? facei : -1; // domin and domout can only be set later FaceDescriptor new_fd(si, -1, @@ -1625,7 +1627,7 @@ struct GrowthVectorLimiter { { // copy here since we will add segments and this would // invalidate a reference! - auto segi = segments[sei]; + // auto segi = segments[sei]; for(auto [sej, type] : segmap[sei]) { auto segj = segments[sej]; @@ -2113,7 +2115,7 @@ struct GrowthVectorLimiter { auto p2el = mesh.CreatePoint2ElementTable(is_inner_point); // smooth growth vectors to shift additional element layers to the inside and fix flipped tets - for(auto step : Range(10)) + for([[maybe_unused]] auto step : Range(10)) { for(auto pi : points) {