Remove warnings

This commit is contained in:
Matthias Hochsteger 2024-01-08 10:36:44 +01:00
parent ce308a3373
commit ae749afa0b

View File

@ -616,7 +616,7 @@ struct GrowthVectorLimiter {
// Vec<3> ab_base_norm = (b_base - a_base).Normalize(); // Vec<3> ab_base_norm = (b_base - a_base).Normalize();
// double a_vec_x = Dot(a_vec, ab_base_norm); // double a_vec_x = Dot(a_vec, ab_base_norm);
// double b_vec_x = Dot(b_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; // double PARALLEL_RATIO_LIMIT = 0.85;
// if (ratio_parallel > PARALLEL_RATIO_LIMIT) { // if (ratio_parallel > PARALLEL_RATIO_LIMIT) {
@ -671,7 +671,7 @@ struct GrowthVectorLimiter {
// }; // };
// //
// auto modifiedsmooth = [&](size_t nsteps) { // auto modifiedsmooth = [&](size_t nsteps) {
// for (auto i : Range(nsteps)) // for ([[maybe_unused]] auto i : Range(nsteps))
// for (SurfaceElementIndex sei : mesh.SurfaceElements().Range()) // for (SurfaceElementIndex sei : mesh.SurfaceElements().Range())
// { // {
// // assuming triangle // // assuming triangle
@ -682,7 +682,7 @@ struct GrowthVectorLimiter {
// }; // };
// auto smooth = [&] (size_t nsteps) { // auto smooth = [&] (size_t nsteps) {
// for(auto i : Range(nsteps)) // for([[maybe_unused]] auto i : Range(nsteps))
// for(const auto & sel : mesh.SurfaceElements()) // for(const auto & sel : mesh.SurfaceElements())
// { // {
// double min_limit = 999; // double min_limit = 999;
@ -893,7 +893,7 @@ struct GrowthVectorLimiter {
Array<Segment> BuildSegments( Mesh & mesh ) Array<Segment> BuildSegments( Mesh & mesh )
{ {
Array<Segment> segments; Array<Segment> segments;
auto& topo = mesh.GetTopology(); // auto& topo = mesh.GetTopology();
NgArray<SurfaceElementIndex> surf_els; NgArray<SurfaceElementIndex> surf_els;
@ -1007,14 +1007,14 @@ struct GrowthVectorLimiter {
auto p2sel = mesh.CreatePoint2SurfaceElementTable(); auto p2sel = mesh.CreatePoint2SurfaceElementTable();
// smooth tangential part of growth vectors from edges to surface elements // smooth tangential part of growth vectors from edges to surface elements
RegionTimer rtsmooth(tsmooth); RegionTimer rtsmooth(tsmooth);
for(auto i : Range(10)) for([[maybe_unused]] auto i : Range(10))
{ {
for(auto pi : points) for(auto pi : points)
{ {
auto sels = p2sel[pi]; auto sels = p2sel[pi];
Vec<3> new_gw = getGW(pi); Vec<3> new_gw = getGW(pi);
new_gw = 0.; new_gw = 0.;
int cnt = 1; // int cnt = 1;
std::set<PointIndex> suround; std::set<PointIndex> suround;
suround.insert(pi); suround.insert(pi);
double total_weight = 0; double total_weight = 0;
@ -1163,20 +1163,22 @@ struct GrowthVectorLimiter {
if(face_done.Test(facei)) if(face_done.Test(facei))
continue; continue;
bool point_moved = false; bool point_moved = false;
bool point_fixed = false; // bool point_fixed = false;
for(auto pi : sel.PNums()) for(auto pi : sel.PNums())
{ {
if(growthvectors[pi].Length() > 0) if(growthvectors[pi].Length() > 0)
point_moved = true; point_moved = true;
/*
else else
point_fixed = true; point_fixed = true;
*/
} }
if(point_moved && !moved_surfaces.Test(facei)) if(point_moved && !moved_surfaces.Test(facei))
{ {
int new_si = mesh.GetNFD()+1; int new_si = mesh.GetNFD()+1;
const auto& fd = mesh.GetFaceDescriptor(facei); const auto& fd = mesh.GetFaceDescriptor(facei);
auto isIn = domains.Test(fd.DomainIn()); // auto isIn = domains.Test(fd.DomainIn());
auto isOut = domains.Test(fd.DomainOut()); // auto isOut = domains.Test(fd.DomainOut());
int si = params.sides_keep_surfaceindex ? facei : -1; int si = params.sides_keep_surfaceindex ? facei : -1;
// domin and domout can only be set later // domin and domout can only be set later
FaceDescriptor new_fd(si, -1, FaceDescriptor new_fd(si, -1,
@ -1625,7 +1627,7 @@ struct GrowthVectorLimiter {
{ {
// copy here since we will add segments and this would // copy here since we will add segments and this would
// invalidate a reference! // invalidate a reference!
auto segi = segments[sei]; // auto segi = segments[sei];
for(auto [sej, type] : segmap[sei]) for(auto [sej, type] : segmap[sei])
{ {
auto segj = segments[sej]; auto segj = segments[sej];
@ -2113,7 +2115,7 @@ struct GrowthVectorLimiter {
auto p2el = mesh.CreatePoint2ElementTable(is_inner_point); auto p2el = mesh.CreatePoint2ElementTable(is_inner_point);
// smooth growth vectors to shift additional element layers to the inside and fix flipped tets // 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) for(auto pi : points)
{ {