mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Fix maxh issue for splines
This commit is contained in:
parent
2b5d00b259
commit
9d5661fdc5
@ -242,16 +242,20 @@ namespace netgen
|
||||
mesh2d.RestrictLocalHLine (Point<3>(p1(0),p1(1),0),
|
||||
Point<3>(p2(0),p2(1),0), len/mp.segmentsperedge);
|
||||
|
||||
// skip curvature restrictions for straight lines
|
||||
if(spline.MaxCurvature()==0)
|
||||
continue;
|
||||
|
||||
double hcurve = min (spline.hmax, h/spline.reffak);
|
||||
double hl = GetDomainMaxh (spline.leftdom);
|
||||
if (hl > 0) hcurve = min2 (hcurve, hl);
|
||||
double hr = GetDomainMaxh (spline.rightdom);
|
||||
if (hr > 0) hcurve = min2 (hcurve, hr);
|
||||
|
||||
// skip curvature restrictions for straight lines
|
||||
if(spline.MaxCurvature()==0)
|
||||
{
|
||||
mesh2d.RestrictLocalHLine (Point<3>(p1(0),p1(1),0),
|
||||
Point<3>(p2(0),p2(1),0), hcurve);
|
||||
}
|
||||
else
|
||||
{
|
||||
int np = 1000;
|
||||
for (double t = 0.5/np; t < 1; t += 1.0/np)
|
||||
{
|
||||
@ -260,6 +264,7 @@ namespace netgen
|
||||
mesh2d.RestrictLocalH (Point<3> (x(0), x(1), 0), min2(hc, hcurve));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto mspnt : mp.meshsize_points)
|
||||
mesh2d.RestrictLocalH (mspnt.pnt, mspnt.h);
|
||||
|
Loading…
Reference in New Issue
Block a user