More restrictive fixes

This commit is contained in:
vgeza 2023-09-01 12:32:35 +03:00
parent cc715804ac
commit 18a2a95a61
3 changed files with 86 additions and 5 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
out
.vs

76
CMakeSettings.json Normal file
View File

@ -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"
}
]
}
]
}

View File

@ -96,7 +96,7 @@ namespace netgen
array<Point<3>, 2> BoundaryLayerTool :: GetMappedSeg( PointIndex pi ) array<Point<3>, 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<Point<3>, 4> BoundaryLayerTool :: GetFace( SurfaceElementIndex sei ) ArrayMem<Point<3>, 4> BoundaryLayerTool :: GetFace( SurfaceElementIndex sei )
@ -348,7 +348,7 @@ namespace netgen
if (isIntersectingFace(seg, face, lam_)) if (isIntersectingFace(seg, face, lam_))
{ {
if (is_bl_sel) if (is_bl_sel)
lam_ *= 0.5; lam_ *= 0.3;
lam = min(lam, lam_); lam = min(lam, lam_);
} }
} }
@ -358,7 +358,7 @@ namespace netgen
if(isIntersectingFace(seg, face, lam_)) if(isIntersectingFace(seg, face, lam_))
{ {
if(is_bl_sel) // allow only half the distance if the opposing surface element has a boundary layer too 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_); lam = min(lam, lam_);
} }
} }
@ -378,7 +378,7 @@ namespace netgen
}); });
if(lam<1) if(lam<1)
{ {
if(lam<lam_lower_limit && step>0) if(lam<lam_lower_limit && step>1)
{ {
limit_reached = true; limit_reached = true;
lam = lam_lower_limit; lam = lam_lower_limit;
@ -389,6 +389,8 @@ namespace netgen
} }
step++; step++;
limits = new_limits; limits = new_limits;
if (step > 0)
modifiedsmooth(1);
} }
self_intersection(); self_intersection();
@ -1499,10 +1501,11 @@ namespace netgen
auto segmap = BuildSegMap(); auto segmap = BuildSegMap();
auto in_surface_direction = ProjectGrowthVectorsOnSurface(); auto in_surface_direction = ProjectGrowthVectorsOnSurface();
InterpolateGrowthVectors();
if(params.limit_growth_vectors) if(params.limit_growth_vectors)
LimitGrowthVectorLengths(); LimitGrowthVectorLengths();
InterpolateGrowthVectors();
FixVolumeElements(); FixVolumeElements();
InsertNewElements(segmap, in_surface_direction); InsertNewElements(segmap, in_surface_direction);
SetDomInOut(); SetDomInOut();