mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
Do linear interpolation of corresponding edge points in SplineGeometry tensor mesh generation
better results for curved domains
This commit is contained in:
parent
5bea3bb612
commit
d1c7a16d63
@ -527,11 +527,16 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
for (PointIndex pix = nextpi[c1], ix = 0; pix != c2; pix = nextpi[pix], ix++)
|
for (PointIndex pix = nextpi[c1], ix = 0; pix != c2; pix = nextpi[pix], ix++)
|
||||||
|
{
|
||||||
|
Point<3> px = (*mesh)[pix];
|
||||||
for (PointIndex piy = nextpi[c2], iy = 0; piy != c3; piy = nextpi[piy], iy++)
|
for (PointIndex piy = nextpi[c2], iy = 0; piy != c3; piy = nextpi[piy], iy++)
|
||||||
{
|
{
|
||||||
Point<3> p = (*mesh)[pix] + ( (*mesh)[piy] - (*mesh)[c2] );
|
double lam = Dist((*mesh)[piy],(*mesh)[c2]) / Dist((*mesh)[c3],(*mesh)[c2]);
|
||||||
pts[(nex+1)*(iy+1) + ix+1] = mesh -> AddPoint (p , 1, FIXEDPOINT);
|
auto pix1 = pts[(nex+1)*ney+ix+1];
|
||||||
|
auto pnew = px + lam*((*mesh)[pix1]-px);
|
||||||
|
pts[(nex+1)*(iy+1) + ix+1] = mesh -> AddPoint (pnew, 1, FIXEDPOINT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < ney; i++)
|
for (int i = 0; i < ney; i++)
|
||||||
for (int j = 0; j < nex; j++)
|
for (int j = 0; j < nex; j++)
|
||||||
|
Loading…
Reference in New Issue
Block a user