mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
fixes for tet10 and trig6 elements (is_curved, clipping-plane vis)
This commit is contained in:
parent
2e4836f0cf
commit
e220a252d1
@ -2241,6 +2241,20 @@ namespace netgen
|
||||
|
||||
switch (el.GetType())
|
||||
{
|
||||
case TRIG6:
|
||||
{
|
||||
AutoDiff<2,T> lam3 = 1-x-y;
|
||||
AutoDiff<2,T> lami[6] = { x * (2*x-1), y * (2*y-1), lam3 * (2*lam3-1),
|
||||
4 * y * lam3, 4 * x * lam3, 4 * x * y };
|
||||
for (int j = 0; j < 6; j++)
|
||||
{
|
||||
Point<3> p = mesh[el[j]];
|
||||
for (int k = 0; k < DIM_SPACE; k++)
|
||||
mapped_x[k] += p(k) * lami[j];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case TRIG:
|
||||
{
|
||||
// if (info.order >= 2) return false; // not yet supported
|
||||
|
@ -1140,6 +1140,7 @@ namespace netgen
|
||||
default: break;
|
||||
cerr << "Element::SetType unknown type " << int(typ) << endl;
|
||||
}
|
||||
is_curved = (np > 4);
|
||||
}
|
||||
|
||||
|
||||
|
@ -765,11 +765,12 @@ namespace netgen
|
||||
void DoArchive (Archive & ar)
|
||||
{
|
||||
short _np, _typ;
|
||||
bool _curved;
|
||||
if (ar.Output())
|
||||
{ _np = np; _typ = typ; }
|
||||
ar & _np & _typ & index;
|
||||
{ _np = np; _typ = typ; _curved = is_curved; }
|
||||
ar & _np & _typ & index & _curved;
|
||||
if (ar.Input())
|
||||
{ np = _np; typ = ELEMENT_TYPE(_typ); }
|
||||
{ np = _np; typ = ELEMENT_TYPE(_typ); is_curved = _curved; }
|
||||
for (size_t i = 0; i < np; i++)
|
||||
ar & pnum[i];
|
||||
}
|
||||
|
@ -4005,8 +4005,8 @@ namespace netgen
|
||||
Array<int> compress(n3);
|
||||
|
||||
NgProfiler::StartTimer (timer_vals);
|
||||
Array<double,PointIndex::BASE> vertval(mesh->GetNV());
|
||||
Array<bool,PointIndex::BASE> posval(mesh->GetNV());
|
||||
Array<double,PointIndex::BASE> vertval(mesh->GetNP());
|
||||
Array<bool,PointIndex::BASE> posval(mesh->GetNP());
|
||||
for (PointIndex pi = vertval.Begin(); pi < vertval.End(); pi++)
|
||||
{
|
||||
Point<3> vert = (*mesh)[pi];
|
||||
|
Loading…
Reference in New Issue
Block a user