diff --git a/libsrc/geom2d/genmesh2d.cpp b/libsrc/geom2d/genmesh2d.cpp index 582c59c7..dead31e9 100644 --- a/libsrc/geom2d/genmesh2d.cpp +++ b/libsrc/geom2d/genmesh2d.cpp @@ -30,7 +30,7 @@ namespace netgen } // limit slope - double gradh = 1/elto0; + double gradh = min(1/elto0,mp.grading); for (int i = 0; i < n-1; i++) { double hnext = hi[i] + gradh * (xi[i+1]-xi[i]).Length(); diff --git a/libsrc/geom2d/geometry2d.hpp b/libsrc/geom2d/geometry2d.hpp index 9f8fc3c2..0c21859c 100644 --- a/libsrc/geom2d/geometry2d.hpp +++ b/libsrc/geom2d/geometry2d.hpp @@ -129,7 +129,7 @@ namespace netgen Array tensormeshing; Array layer; Array bcnames; - double elto0; + double elto0 = 1.0; public: