From 18a2a95a61ac56db3274c669b91d2bbd8a84ec2f Mon Sep 17 00:00:00 2001 From: vgeza Date: Fri, 1 Sep 2023 12:32:35 +0300 Subject: [PATCH] More restrictive fixes --- .gitignore | 2 + CMakeSettings.json | 76 ++++++++++++++++++++++++++++++++ libsrc/meshing/boundarylayer.cpp | 13 +++--- 3 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 CMakeSettings.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..39638a7f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +out +.vs diff --git a/CMakeSettings.json b/CMakeSettings.json new file mode 100644 index 00000000..f225f7f0 --- /dev/null +++ b/CMakeSettings.json @@ -0,0 +1,76 @@ +{ + "configurations": [ + { + "name": "x64-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "" + }, + { + "name": "x64-Release", + "generator": "Ninja", + "configurationType": "Release", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "msvc_x64_x64" ], + "variables": [ + { + "name": "OCC_DOWNLOAD_URL_WIN", + "value": "D:/source/netgen_occ/latest/occ_win64_cenos.zip", + "type": "STRING" + }, + { + "name": "USE_NATIVE_ARCH", + "value": "False", + "type": "BOOL" + }, + { + "name": "USE_OCC", + "value": "True", + "type": "BOOL" + } + ] + }, + { + "name": "x64-RelWithDebInfo", + "generator": "Ninja", + "configurationType": "RelWithDebInfo", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "msvc_x64_x64" ], + "variables": [ + { + "name": "OCC_DOWNLOAD_URL_WIN", + "value": "D:/source/netgen_occ/latest/occ_win64_cenos.zip", + "type": "STRING" + }, + { + "name": "USE_NATIVE_ARCH", + "value": "False", + "type": "BOOL" + }, + { + "name": "USE_OCC", + "value": "True", + "type": "BOOL" + }, + { + "name": "USE_PYTHON", + "value": "False", + "type": "BOOL" + } + ] + } + ] +} \ No newline at end of file diff --git a/libsrc/meshing/boundarylayer.cpp b/libsrc/meshing/boundarylayer.cpp index 0adbd545..6f36e9e3 100644 --- a/libsrc/meshing/boundarylayer.cpp +++ b/libsrc/meshing/boundarylayer.cpp @@ -96,7 +96,7 @@ namespace netgen array, 2> BoundaryLayerTool :: GetMappedSeg( PointIndex pi ) { - return { mesh[pi], mesh[pi] + height*limits[pi]*growthvectors[pi] }; + return { mesh[pi], mesh[pi] + height*limits[pi]*growthvectors[pi] * 1.5 }; } ArrayMem, 4> BoundaryLayerTool :: GetFace( SurfaceElementIndex sei ) @@ -348,7 +348,7 @@ namespace netgen if (isIntersectingFace(seg, face, lam_)) { if (is_bl_sel) - lam_ *= 0.5; + lam_ *= 0.3; lam = min(lam, lam_); } } @@ -358,7 +358,7 @@ namespace netgen if(isIntersectingFace(seg, face, lam_)) { if(is_bl_sel) // allow only half the distance if the opposing surface element has a boundary layer too - lam_ *= 0.5; + lam_ *= 0.3; lam = min(lam, lam_); } } @@ -378,7 +378,7 @@ namespace netgen }); if(lam<1) { - if(lam0) + if(lam1) { limit_reached = true; lam = lam_lower_limit; @@ -389,6 +389,8 @@ namespace netgen } step++; limits = new_limits; + if (step > 0) + modifiedsmooth(1); } self_intersection(); @@ -1499,10 +1501,11 @@ namespace netgen auto segmap = BuildSegMap(); auto in_surface_direction = ProjectGrowthVectorsOnSurface(); - InterpolateGrowthVectors(); if(params.limit_growth_vectors) LimitGrowthVectorLengths(); + + InterpolateGrowthVectors(); FixVolumeElements(); InsertNewElements(segmap, in_surface_direction); SetDomInOut();