Fix boundary layer thicknesses

Height values should be interpreted per-layer, not total (accumulated) height
This commit is contained in:
Matthias Hochsteger 2024-07-26 18:09:37 +02:00
parent 433247b09b
commit 24a0f47856

View File

@ -1201,11 +1201,12 @@ void BoundaryLayerTool ::InsertNewElements(
Array<PointIndex>& 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;
}