mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
curved prisms fix
This commit is contained in:
parent
d299cc75bb
commit
17a0d73514
@ -2041,12 +2041,9 @@ namespace netgen
|
|||||||
shapes(fnums[1])-shapes(fnums[0]), shapes(fnums[2]),
|
shapes(fnums[1])-shapes(fnums[0]), shapes(fnums[2]),
|
||||||
shapes(fnums[0])+shapes(fnums[1])+shapes(fnums[2]), &shapes(ii));
|
shapes(fnums[0])+shapes(fnums[1])+shapes(fnums[2]), &shapes(ii));
|
||||||
ii += (forder-1)*(forder-2)/2;
|
ii += (forder-1)*(forder-2)/2;
|
||||||
// CalcScaledEdgeShape (forder, shapes(vi1)-shapes(vi2), shapes(vi1)+shapes(vi2), &shapes(ii));
|
|
||||||
// ii += forder-1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2506,6 +2503,7 @@ namespace netgen
|
|||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
int forder = faceorder[info.facenrs[i]];
|
int forder = faceorder[info.facenrs[i]];
|
||||||
|
|
||||||
if ( forder < 3 ) continue;
|
if ( forder < 3 ) continue;
|
||||||
int ndf = (forder+1)*(forder+2)/2 - 3 - 3*(forder-1);
|
int ndf = (forder+1)*(forder+2)/2 - 3 - 3*(forder-1);
|
||||||
|
|
||||||
@ -2530,10 +2528,12 @@ namespace netgen
|
|||||||
trans(1,j) = dlami[fav[0]][j];
|
trans(1,j) = dlami[fav[0]][j];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < order-1; j++)
|
for (int j = 0; j < ndf; j++)
|
||||||
{
|
{
|
||||||
double ddx = dshapes(ii+j,0);
|
// double ddx = dshapes(ii+j,0);
|
||||||
double ddt = dshapes(ii+j,1);
|
// double ddt = dshapes(ii+j,1);
|
||||||
|
double ddx = dshapei(j,0);
|
||||||
|
double ddt = dshapei(j,1);
|
||||||
dshapes(ii+j,0) = ddx * trans(0,0) + ddt * trans(1,0);
|
dshapes(ii+j,0) = ddx * trans(0,0) + ddt * trans(1,0);
|
||||||
dshapes(ii+j,1) = ddx * trans(0,1) + ddt * trans(1,1);
|
dshapes(ii+j,1) = ddx * trans(0,1) + ddt * trans(1,1);
|
||||||
}
|
}
|
||||||
@ -2677,19 +2677,8 @@ namespace netgen
|
|||||||
void CurvedElements ::
|
void CurvedElements ::
|
||||||
GetCoefficients (ElementInfo & info, Vec<3> * coefs) const
|
GetCoefficients (ElementInfo & info, Vec<3> * coefs) const
|
||||||
{
|
{
|
||||||
// cout << "getcoeffs, info.elnr = " << info.elnr << endl;
|
|
||||||
// cout << "getcoeffs, info.nv = " << info.nv << endl;
|
|
||||||
|
|
||||||
const Element & el = mesh[info.elnr];
|
const Element & el = mesh[info.elnr];
|
||||||
|
|
||||||
/*
|
|
||||||
coefs.SetSize (info.ndof);
|
|
||||||
coefs = Vec<3> (0,0,0);
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
for (int i = 0; i < info.ndof; i++)
|
|
||||||
coefs[i] = Vec<3> (0,0,0);
|
|
||||||
*/
|
|
||||||
for (int i = 0; i < info.nv; i++)
|
for (int i = 0; i < info.nv; i++)
|
||||||
coefs[i] = Vec<3> (mesh[el[i]]);
|
coefs[i] = Vec<3> (mesh[el[i]]);
|
||||||
|
|
||||||
@ -3281,8 +3270,6 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Vector shapes;
|
Vector shapes;
|
||||||
MatrixFixWidth<3> dshapes;
|
MatrixFixWidth<3> dshapes;
|
||||||
|
|
||||||
@ -3332,6 +3319,7 @@ namespace netgen
|
|||||||
x[j*sx+k] = xj(k);
|
x[j*sx+k] = xj(k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dxdxi)
|
if (dxdxi)
|
||||||
{
|
{
|
||||||
for (int ip = 0; ip < n; ip++)
|
for (int ip = 0; ip < n; ip++)
|
||||||
@ -3341,7 +3329,7 @@ namespace netgen
|
|||||||
xij(k) = xi[ip*sxi+k];
|
xij(k) = xi[ip*sxi+k];
|
||||||
|
|
||||||
CalcElementDShapes (info, xij, dshapes);
|
CalcElementDShapes (info, xij, dshapes);
|
||||||
|
|
||||||
Mat<3> dxdxij;
|
Mat<3> dxdxij;
|
||||||
dxdxij = 0.0;
|
dxdxij = 0.0;
|
||||||
for (int i = 0; i < coefs.Size(); i++)
|
for (int i = 0; i < coefs.Size(); i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user