From 13a0b78e264f89d807d3a0b454ad467301747897 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 1 Mar 2022 14:34:18 +0100 Subject: [PATCH] interpolate only tangential part of growth vector --- libsrc/meshing/boundarylayer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libsrc/meshing/boundarylayer.cpp b/libsrc/meshing/boundarylayer.cpp index 4c1bd8c0..4d1276db 100644 --- a/libsrc/meshing/boundarylayer.cpp +++ b/libsrc/meshing/boundarylayer.cpp @@ -241,8 +241,13 @@ namespace netgen { dmesh.AddPoint(pi, &weights); auto & v = growthvectors[pi]; + auto n = 1./v.Length() * v; for(auto & [pi_other, weight] : weights) - v += weight * growthvectors[pi_other]; + { + auto t = weight * growthvectors[pi_other]; + t -= (t * n) * t; + v += t; + } } } @@ -341,8 +346,6 @@ namespace netgen { for(auto pi : sel.PNums()) { - if(interpolate_growth_vectors && mesh[pi].Type() >= SURFACEPOINT) - continue; auto & np = growthvectors[pi]; if(np.Length() == 0) { np = n; continue; } auto npn = np * n; @@ -436,8 +439,6 @@ namespace netgen for(auto i : Range(sel.PNums())) { auto pi = sel.PNums()[i]; - if(interpolate_growth_vectors && mesh[pi].Type() >= SURFACEPOINT) - continue; if(growthvectors[pi].Length2() == 0.) continue; auto next = sel.PNums()[(i+1)%sel.GetNV()];