mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +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())
|
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:
|
case TRIG:
|
||||||
{
|
{
|
||||||
// if (info.order >= 2) return false; // not yet supported
|
// if (info.order >= 2) return false; // not yet supported
|
||||||
|
@ -1140,6 +1140,7 @@ namespace netgen
|
|||||||
default: break;
|
default: break;
|
||||||
cerr << "Element::SetType unknown type " << int(typ) << endl;
|
cerr << "Element::SetType unknown type " << int(typ) << endl;
|
||||||
}
|
}
|
||||||
|
is_curved = (np > 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -765,11 +765,12 @@ namespace netgen
|
|||||||
void DoArchive (Archive & ar)
|
void DoArchive (Archive & ar)
|
||||||
{
|
{
|
||||||
short _np, _typ;
|
short _np, _typ;
|
||||||
|
bool _curved;
|
||||||
if (ar.Output())
|
if (ar.Output())
|
||||||
{ _np = np; _typ = typ; }
|
{ _np = np; _typ = typ; _curved = is_curved; }
|
||||||
ar & _np & _typ & index;
|
ar & _np & _typ & index & _curved;
|
||||||
if (ar.Input())
|
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++)
|
for (size_t i = 0; i < np; i++)
|
||||||
ar & pnum[i];
|
ar & pnum[i];
|
||||||
}
|
}
|
||||||
|
@ -4005,8 +4005,8 @@ namespace netgen
|
|||||||
Array<int> compress(n3);
|
Array<int> compress(n3);
|
||||||
|
|
||||||
NgProfiler::StartTimer (timer_vals);
|
NgProfiler::StartTimer (timer_vals);
|
||||||
Array<double,PointIndex::BASE> vertval(mesh->GetNV());
|
Array<double,PointIndex::BASE> vertval(mesh->GetNP());
|
||||||
Array<bool,PointIndex::BASE> posval(mesh->GetNV());
|
Array<bool,PointIndex::BASE> posval(mesh->GetNP());
|
||||||
for (PointIndex pi = vertval.Begin(); pi < vertval.End(); pi++)
|
for (PointIndex pi = vertval.Begin(); pi < vertval.End(); pi++)
|
||||||
{
|
{
|
||||||
Point<3> vert = (*mesh)[pi];
|
Point<3> vert = (*mesh)[pi];
|
||||||
|
Loading…
Reference in New Issue
Block a user