mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Set flags correctly when loading Element from Archive
This commit is contained in:
parent
a51f8ed307
commit
958bbb1ae0
@ -1124,6 +1124,26 @@ namespace netgen
|
||||
is_curved = typ != TET; // false;
|
||||
}
|
||||
|
||||
void Element :: DoArchive (Archive & ar)
|
||||
{
|
||||
short _np, _typ;
|
||||
bool _curved;
|
||||
if (ar.Output())
|
||||
{ _np = np; _typ = typ; _curved = is_curved; }
|
||||
ar & _np;
|
||||
|
||||
// placement new to init flags
|
||||
if (ar.Input())
|
||||
new (this) Element(_np);
|
||||
|
||||
ar & _typ & index & _curved;
|
||||
typ = ELEMENT_TYPE(_typ);
|
||||
is_curved = _curved;
|
||||
|
||||
for (size_t i = 0; i < np; i++)
|
||||
ar & pnum[i];
|
||||
}
|
||||
|
||||
void Element :: SetOrder (const int aorder)
|
||||
{
|
||||
orderx = aorder;
|
||||
|
@ -836,18 +836,7 @@ namespace netgen
|
||||
///
|
||||
const PointIndex & PNumMod (int i) const { return pnum[(i-1) % np]; }
|
||||
|
||||
void DoArchive (Archive & ar)
|
||||
{
|
||||
short _np, _typ;
|
||||
bool _curved;
|
||||
if (ar.Output())
|
||||
{ _np = np; _typ = typ; _curved = is_curved; }
|
||||
ar & _np & _typ & index & _curved;
|
||||
if (ar.Input())
|
||||
{ np = _np; typ = ELEMENT_TYPE(_typ); is_curved = _curved; }
|
||||
for (size_t i = 0; i < np; i++)
|
||||
ar & pnum[i];
|
||||
}
|
||||
void DoArchive (Archive & ar);
|
||||
|
||||
#ifdef PARALLEL
|
||||
static MPI_Datatype MyGetMPIType();
|
||||
|
Loading…
Reference in New Issue
Block a user