mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
improved elementmapping for non-curved trigs
This commit is contained in:
parent
97630292e2
commit
4e3be67517
@ -3270,6 +3270,21 @@ namespace netgen
|
||||
|
||||
if (x)
|
||||
{
|
||||
if (info.order == 1 && type == TRIG)
|
||||
{
|
||||
for (int j = 0; j < npts; j++)
|
||||
{
|
||||
Point<2> vxi(xi[j*sxi], xi[j*sxi+1]);
|
||||
|
||||
Point<DIM_SPACE> val (coefs[2]);
|
||||
val += vxi(0) * (coefs[0]-coefs[2]);
|
||||
val += vxi(1) * (coefs[1]-coefs[2]);
|
||||
|
||||
for (int k = 0; k < DIM_SPACE; k++)
|
||||
x[j*sx+k] = val(k);
|
||||
}
|
||||
}
|
||||
else
|
||||
for (int j = 0; j < npts; j++)
|
||||
{
|
||||
Point<2> vxi(xi[j*sxi], xi[j*sxi+1]);
|
||||
@ -3285,6 +3300,26 @@ namespace netgen
|
||||
}
|
||||
|
||||
if (dxdxi)
|
||||
{
|
||||
if (info.order == 1 && type == TRIG)
|
||||
{
|
||||
Point<2> xij(xi[0], xi[1]);
|
||||
CalcElementDShapes (info, xij, dshapes);
|
||||
|
||||
Mat<3,2> dxdxij;
|
||||
dxdxij = 0.0;
|
||||
for (int i = 0; i < coefs.Size(); i++)
|
||||
for (int j = 0; j < DIM_SPACE; j++)
|
||||
for (int k = 0; k < 2; k++)
|
||||
dxdxij(j,k) += dshapes(i,k) * coefs[i](j);
|
||||
|
||||
|
||||
for (int ip = 0; ip < npts; ip++)
|
||||
for (int j = 0; j < DIM_SPACE; j++)
|
||||
for (int k = 0; k < 2; k++)
|
||||
dxdxi[ip*sdxdxi+2*j+k] = dxdxij(j,k);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < npts; j++)
|
||||
{
|
||||
@ -3304,6 +3339,7 @@ namespace netgen
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user