From 32cb8d546e4a717931056104df2400f819e54ab5 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Fri, 8 Apr 2022 14:01:01 +0200 Subject: [PATCH] Restrict growth vector only taking boundary of domain into account Else it will restrict too much --- libsrc/meshing/boundarylayer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libsrc/meshing/boundarylayer.cpp b/libsrc/meshing/boundarylayer.cpp index d0f93a76..d552bc24 100644 --- a/libsrc/meshing/boundarylayer.cpp +++ b/libsrc/meshing/boundarylayer.cpp @@ -263,8 +263,12 @@ namespace netgen } }; - // first step: intersect with other surface elements + // first step: intersect with other surface elements that are boundary of domain the layer is grown into // second (and subsequent) steps: intersect with other boundary layers, allow restriction by 20% in each step + auto changed_domains = domains; + if(!params.outside) + changed_domains.Invert(); + bool limit_reached = true; double lam_lower_limit = 1.0; int step = 0; @@ -287,6 +291,10 @@ namespace netgen { const auto & sel = mesh[sei]; Box<3> box(Box<3>::EMPTY_BOX); + const auto& fd = mesh.GetFaceDescriptor(sel.GetIndex()); + if(!changed_domains.Test(fd.DomainIn()) && + !changed_domains.Test(fd.DomainOut())) + continue; for(auto pi : sel.PNums()) box.Add(mesh[pi]); // also add moved points to bounding box