Boundarylayer thickness limitation fix

Don't check for intersecting mapped trigs if only volume elements are
added (and no mapped surface elements).

In case of only inserted volume elements, we don't care about the limit
at special points.
This commit is contained in:
Matthias Hochsteger 2025-04-28 16:32:05 +02:00
parent aa66cd11c4
commit b84975586c

View File

@ -505,6 +505,25 @@ struct GrowthVectorLimiter
RegionTimer reg(t);
// check if surface trigs are intersecting each other
bool changed = true;
std::set<PointIndex> special_points;
if (tool.insert_only_volume_elements)
for (auto [pi, special_point] : tool.special_boundary_points)
{
special_points.insert(pi);
for (auto& group : special_point.growth_groups)
special_points.insert(group.new_points.Last());
}
auto skip_trig = [&] (const Element2d& tri) {
if (!tool.insert_only_volume_elements)
return false;
for (auto pi : tri.PNums())
if (special_points.find(pi) != special_points.end())
return true;
return false;
};
while (changed)
{
changed = false;
@ -516,6 +535,9 @@ struct GrowthVectorLimiter
{
const Element2d& tri = Get(sei);
if (skip_trig(tri))
continue;
Box<3> box(Box<3>::EMPTY_BOX);
for (PointIndex pi : tri.PNums())
box.Add(GetPoint(pi, 1.0, true));
@ -528,6 +550,9 @@ struct GrowthVectorLimiter
{
const Element2d& tri = Get(sei);
if (skip_trig(tri))
continue;
Box<3> box(Box<3>::EMPTY_BOX);
for (PointIndex pi : tri.PNums())
box.Add(GetPoint(pi, 1.0, true));
@ -684,8 +709,9 @@ struct GrowthVectorLimiter
for (auto pi : Range(growthvectors))
check_point(pi);
for (auto& [special_pi, special_point] : tool.special_boundary_points)
check_point(special_pi);
if (!tool.insert_only_volume_elements)
for (auto& [special_pi, special_point] : tool.special_boundary_points)
check_point(special_pi);
}
void Perform ()