From b99e37999ffcf2e84126c2e7a239ed655be26568 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 5 Nov 2019 15:19:54 +0100 Subject: [PATCH] fixes for mac and windows --- libsrc/meshing/basegeom.cpp | 2 +- libsrc/meshing/meshtype.cpp | 2 +- libsrc/meshing/meshtype.hpp | 2 +- libsrc/occ/occgenmesh.cpp | 2 +- libsrc/stlgeom/stlgeommesh.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libsrc/meshing/basegeom.cpp b/libsrc/meshing/basegeom.cpp index 77e5ebbf..a305d478 100644 --- a/libsrc/meshing/basegeom.cpp +++ b/libsrc/meshing/basegeom.cpp @@ -219,7 +219,7 @@ namespace netgen mindist = min2(mindist, line.Dist(other)); } if(mindist == 1e99) continue; - mindist /= mparam.closeedgefac.value() + 1e-10; + mindist /= *mparam.closeedgefac + 1e-10; if(mindist < 1e-3 * bounding_box.Diam()) { (*testout) << "extremely small local h: " << mindist diff --git a/libsrc/meshing/meshtype.cpp b/libsrc/meshing/meshtype.cpp index bd5563d5..9523fab7 100644 --- a/libsrc/meshing/meshtype.cpp +++ b/libsrc/meshing/meshtype.cpp @@ -2803,7 +2803,7 @@ namespace netgen << " inverttets = " << inverttets << endl << " inverttrigs = " << inverttrigs << endl << "closeedge enabled = " << closeedgefac.has_value() << endl - << "closeedgefac = " << (closeedgefac.has_value() ? closeedgefac.value() : 0.) << endl; + << "closeedgefac = " << closeedgefac.value_or(0.) << endl; } /* diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index f22a6529..1a42b33a 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -1260,7 +1260,7 @@ namespace netgen /// file for meshsize string meshsizefilename = ""; /// restrict h based on close edges - optional closeedgefac = {}; + optional closeedgefac = nullopt; /// start surfacemeshing from everywhere in surface bool startinsurface = false; /// check overlapping surfaces (debug) diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index 7ab12806..8b00b684 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -1259,7 +1259,7 @@ namespace netgen mindist = min (mindist, line.Dist(lines[num])); } - mindist /= (mparam.closeedgefac.value() + VSMALL); + mindist /= (*mparam.closeedgefac + VSMALL); if (mindist < 1e-3 * bb.Diam()) { diff --git a/libsrc/stlgeom/stlgeommesh.cpp b/libsrc/stlgeom/stlgeommesh.cpp index 60d9a482..bf715a66 100644 --- a/libsrc/stlgeom/stlgeommesh.cpp +++ b/libsrc/stlgeom/stlgeommesh.cpp @@ -926,7 +926,7 @@ void STLGeometry :: RestrictLocalH(class Mesh & mesh, double gh, const STLParame PushStatusF("Restrict H due to close edges"); //geht nicht für spiralen!!!!!!!!!!!!!!!!!! - double disttohfact = sqr(10.0 / mparam.closeedgefac.value()); + double disttohfact = sqr(10.0 / *mparam.closeedgefac); int k,l; double h1, h2, dist; int rc = 0;