From 24a0f478566daa28be8233341ec8910eec542dd4 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 26 Jul 2024 18:09:37 +0200 Subject: [PATCH] Fix boundary layer thicknesses Height values should be interpreted per-layer, not total (accumulated) height --- libsrc/meshing/boundarylayer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/boundarylayer.cpp b/libsrc/meshing/boundarylayer.cpp index d22ee6c6..63068237 100644 --- a/libsrc/meshing/boundarylayer.cpp +++ b/libsrc/meshing/boundarylayer.cpp @@ -1201,11 +1201,12 @@ void BoundaryLayerTool ::InsertNewElements( Array& new_points) { Point<3> p = mesh[pi]; PointIndex pi_last = pi; + double height = 0.0; for (auto i : Range(params.heights)) { - // p += params.heights[i] * growth_vector; + height += params.heights[i]; auto pi_new = mesh.AddPoint(p); new_points.Append(pi_new); - growth_vector_map[pi_new] = {&growth_vector, params.heights[i]}; + growth_vector_map[pi_new] = {&growth_vector, height}; if (special_boundary_points.count(pi) > 0) mesh.AddLockedPoint(pi_new); pi_last = pi_new; }