boundarylayers - don't project on not-in-surface-direction

This commit is contained in:
Christopher Lackner 2022-02-25 12:08:24 +01:00
parent bf02481299
commit 2d70263cda

View File

@ -360,8 +360,11 @@ namespace netgen
auto v2 = (mesh[prev] - mesh[pi]).Normalize();
auto v3 = growthvectors[pi];
v3.Normalize();
if((v1 * v3 > 1e-12) || (v2 * v3 > 1e-12))
auto tol = v1.Length() * 1e-12;
if((v1 * v3 > -tol) && (v2 * v3 > -tol))
in_surface_direction.SetBit(sel.GetIndex());
else
continue;
auto& g = growthvectors[pi];
auto ng = n * g;