mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 14:40:35 +05:00
more archive
This commit is contained in:
parent
f85b51496f
commit
bda771f86f
@ -259,7 +259,7 @@ namespace netgen
|
|||||||
first_id.Set();
|
first_id.Set();
|
||||||
|
|
||||||
|
|
||||||
if (mesh.GetIdentifications().HasIdentifiedPoints())
|
// if (mesh.GetIdentifications().HasIdentifiedPoints())
|
||||||
{
|
{
|
||||||
INDEX_2_HASHTABLE<int> & identpts =
|
INDEX_2_HASHTABLE<int> & identpts =
|
||||||
mesh.GetIdentifications().GetIdentifiedPoints ();
|
mesh.GetIdentifications().GetIdentifiedPoints ();
|
||||||
|
@ -81,6 +81,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
BASE_INDEX_2_HASHTABLE () { ; }
|
||||||
|
|
||||||
BASE_INDEX_2_HASHTABLE (int size)
|
BASE_INDEX_2_HASHTABLE (int size)
|
||||||
: hash (size) { };
|
: hash (size) { };
|
||||||
|
|
||||||
@ -113,6 +115,8 @@ class INDEX_2_HASHTABLE : public BASE_INDEX_2_HASHTABLE
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
INDEX_2_HASHTABLE () { ; }
|
||||||
|
|
||||||
INDEX_2_HASHTABLE (int size)
|
INDEX_2_HASHTABLE (int size)
|
||||||
: BASE_INDEX_2_HASHTABLE (size), cont(size)
|
: BASE_INDEX_2_HASHTABLE (size), cont(size)
|
||||||
{ ; }
|
{ ; }
|
||||||
@ -254,8 +258,19 @@ public:
|
|||||||
|
|
||||||
const T & GetData (const Iterator & it) const
|
const T & GetData (const Iterator & it) const
|
||||||
{ return cont[it.BagNr()][it.Pos()]; }
|
{ return cont[it.BagNr()][it.Pos()]; }
|
||||||
|
|
||||||
|
ngstd::Archive & DoArchive (ngstd::Archive & ar)
|
||||||
|
{
|
||||||
|
ar & hash & cont;
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
inline ngstd::Archive & operator & (ngstd::Archive & archive, INDEX_2_HASHTABLE<T> & mp)
|
||||||
|
{ return mp.DoArchive(archive); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -285,6 +300,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
BASE_INDEX_3_HASHTABLE () { ; }
|
||||||
BASE_INDEX_3_HASHTABLE (int size)
|
BASE_INDEX_3_HASHTABLE (int size)
|
||||||
: hash (size) { };
|
: hash (size) { };
|
||||||
|
|
||||||
@ -322,6 +338,7 @@ class INDEX_3_HASHTABLE : private BASE_INDEX_3_HASHTABLE
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
inline INDEX_3_HASHTABLE () { ; }
|
||||||
inline INDEX_3_HASHTABLE (int size);
|
inline INDEX_3_HASHTABLE (int size);
|
||||||
///
|
///
|
||||||
inline void Set (const INDEX_3 & ahash, const T & acont);
|
inline void Set (const INDEX_3 & ahash, const T & acont);
|
||||||
@ -419,11 +436,21 @@ public:
|
|||||||
{ return cont[it.BagNr()][it.Pos()]; }
|
{ return cont[it.BagNr()][it.Pos()]; }
|
||||||
|
|
||||||
|
|
||||||
|
ngstd::Archive & DoArchive (ngstd::Archive & ar)
|
||||||
|
{
|
||||||
|
ar & hash & cont;
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
inline ngstd::Archive & operator & (ngstd::Archive & archive, INDEX_3_HASHTABLE<T> & mp)
|
||||||
|
{ return mp.DoArchive(archive); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -211,4 +211,40 @@ namespace netgen
|
|||||||
data[i].size = data[i].maxsize;
|
data[i].size = data[i].maxsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ngstd::Archive & BASE_TABLE :: DoArchive (ngstd::Archive & ar, int elemsize)
|
||||||
|
{
|
||||||
|
if (ar.Output())
|
||||||
|
{
|
||||||
|
size_t entries = 0, size = data.Size();
|
||||||
|
for (size_t i = 0; i < data.Size(); i++)
|
||||||
|
entries += data[i].size;
|
||||||
|
ar & size & entries;
|
||||||
|
for (size_t i = 0; i < data.Size(); i++)
|
||||||
|
{
|
||||||
|
ar & data[i].size;
|
||||||
|
ar.Do ((unsigned char*)data[i].col, data[i].size*elemsize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
size_t entries, size;
|
||||||
|
ar & size & entries;
|
||||||
|
data.SetSize(size);
|
||||||
|
oneblock = new char [entries*elemsize];
|
||||||
|
char * ptr = oneblock;
|
||||||
|
for (size_t i = 0; i < data.Size(); i++)
|
||||||
|
{
|
||||||
|
ar & data[i].size;
|
||||||
|
data[i].col = ptr;
|
||||||
|
data[i].maxsize = data[i].size;
|
||||||
|
ar.Do ((unsigned char*)data[i].col, data[i].size*elemsize);
|
||||||
|
ptr += size*elemsize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,8 @@ public:
|
|||||||
size_t UsedElements () const;
|
size_t UsedElements () const;
|
||||||
|
|
||||||
void SetElementSizesToMaxSizes ();
|
void SetElementSizesToMaxSizes ();
|
||||||
|
|
||||||
|
ngstd::Archive & DoArchive (ngstd::Archive & ar, int elemsize);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -235,9 +237,22 @@ public:
|
|||||||
|
|
||||||
return FlatArray<T> (data[i-BASE].size, (T*)data[i-BASE].col);
|
return FlatArray<T> (data[i-BASE].size, (T*)data[i-BASE].col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngstd::Archive & DoArchive (ngstd::Archive & ar)
|
||||||
|
{
|
||||||
|
return BASE_TABLE::DoArchive(ar, sizeof(T));
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T, int BASE>
|
||||||
|
inline ngstd::Archive & operator & (ngstd::Archive & archive, TABLE<T,BASE> & mp)
|
||||||
|
{ return mp.DoArchive(archive); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class T, int BASE>
|
template <class T, int BASE>
|
||||||
inline ostream & operator<< (ostream & ost, const TABLE<T,BASE> & table)
|
inline ostream & operator<< (ostream & ost, const TABLE<T,BASE> & table)
|
||||||
{
|
{
|
||||||
|
@ -71,8 +71,6 @@ namespace netgen
|
|||||||
|
|
||||||
void Ngx_Mesh :: DoArchive (ngstd::Archive & archive)
|
void Ngx_Mesh :: DoArchive (ngstd::Archive & archive)
|
||||||
{
|
{
|
||||||
cout << "ngx_mesh, doarchive, output = " << archive.Output() << endl;
|
|
||||||
cout << "mesh = " << mesh.get() << endl;
|
|
||||||
if (archive.Input()) mesh = make_shared<Mesh>();
|
if (archive.Input()) mesh = make_shared<Mesh>();
|
||||||
mesh->DoArchive(archive);
|
mesh->DoArchive(archive);
|
||||||
if (archive.Input())
|
if (archive.Input())
|
||||||
|
@ -1313,6 +1313,14 @@ namespace netgen
|
|||||||
archive & facedecoding;
|
archive & facedecoding;
|
||||||
archive & materials & bcnames & cd2names;
|
archive & materials & bcnames & cd2names;
|
||||||
|
|
||||||
|
if (archive.Output())
|
||||||
|
archive & *ident;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ident = new Identifications(*this);
|
||||||
|
archive & *ident;
|
||||||
|
}
|
||||||
|
|
||||||
if (archive.Input())
|
if (archive.Input())
|
||||||
{
|
{
|
||||||
RebuildSurfaceElementLists();
|
RebuildSurfaceElementLists();
|
||||||
|
@ -87,7 +87,7 @@ namespace netgen
|
|||||||
epgeominfo[1].dist = 0;
|
epgeominfo[1].dist = 0;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bcname = 0;
|
bcname = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Segment::Segment (const Segment & other)
|
Segment::Segment (const Segment & other)
|
||||||
@ -2433,25 +2433,31 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
Identifications :: Identifications (Mesh & amesh)
|
Identifications :: Identifications (Mesh & amesh)
|
||||||
: mesh(amesh)
|
: mesh(amesh), identifiedpoints(100), identifiedpoints_nr(100)
|
||||||
{
|
{
|
||||||
identifiedpoints = new INDEX_2_HASHTABLE<int>(100);
|
// identifiedpoints = new INDEX_2_HASHTABLE<int>(100);
|
||||||
identifiedpoints_nr = new INDEX_3_HASHTABLE<int>(100);
|
// identifiedpoints_nr = new INDEX_3_HASHTABLE<int>(100);
|
||||||
maxidentnr = 0;
|
maxidentnr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Identifications :: ~Identifications ()
|
Identifications :: ~Identifications ()
|
||||||
{
|
{
|
||||||
delete identifiedpoints;
|
;
|
||||||
delete identifiedpoints_nr;
|
// delete identifiedpoints;
|
||||||
|
// delete identifiedpoints_nr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Identifications :: Delete ()
|
void Identifications :: Delete ()
|
||||||
{
|
{
|
||||||
|
identifiedpoints.DeleteData();
|
||||||
|
identifiedpoints_nr.DeleteData();
|
||||||
|
|
||||||
|
/*
|
||||||
delete identifiedpoints;
|
delete identifiedpoints;
|
||||||
identifiedpoints = new INDEX_2_HASHTABLE<int>(100);
|
identifiedpoints = new INDEX_2_HASHTABLE<int>(100);
|
||||||
delete identifiedpoints_nr;
|
delete identifiedpoints_nr;
|
||||||
identifiedpoints_nr = new INDEX_3_HASHTABLE<int>(100);
|
identifiedpoints_nr = new INDEX_3_HASHTABLE<int>(100);
|
||||||
|
*/
|
||||||
maxidentnr = 0;
|
maxidentnr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2459,10 +2465,10 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
// (*testout) << "Identification::Add, pi1 = " << pi1 << ", pi2 = " << pi2 << ", identnr = " << identnr << endl;
|
// (*testout) << "Identification::Add, pi1 = " << pi1 << ", pi2 = " << pi2 << ", identnr = " << identnr << endl;
|
||||||
INDEX_2 pair (pi1, pi2);
|
INDEX_2 pair (pi1, pi2);
|
||||||
identifiedpoints->Set (pair, identnr);
|
identifiedpoints.Set (pair, identnr);
|
||||||
|
|
||||||
INDEX_3 tripl (pi1, pi2, identnr);
|
INDEX_3 tripl (pi1, pi2, identnr);
|
||||||
identifiedpoints_nr->Set (tripl, 1);
|
identifiedpoints_nr.Set (tripl, 1);
|
||||||
|
|
||||||
if (identnr > maxidentnr) maxidentnr = identnr;
|
if (identnr > maxidentnr) maxidentnr = identnr;
|
||||||
|
|
||||||
@ -2476,8 +2482,8 @@ namespace netgen
|
|||||||
int Identifications :: Get (PointIndex pi1, PointIndex pi2) const
|
int Identifications :: Get (PointIndex pi1, PointIndex pi2) const
|
||||||
{
|
{
|
||||||
INDEX_2 pair(pi1, pi2);
|
INDEX_2 pair(pi1, pi2);
|
||||||
if (identifiedpoints->Used (pair))
|
if (identifiedpoints.Used (pair))
|
||||||
return identifiedpoints->Get(pair);
|
return identifiedpoints.Get(pair);
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2485,7 +2491,7 @@ namespace netgen
|
|||||||
bool Identifications :: Get (PointIndex pi1, PointIndex pi2, int nr) const
|
bool Identifications :: Get (PointIndex pi1, PointIndex pi2, int nr) const
|
||||||
{
|
{
|
||||||
INDEX_3 tripl(pi1, pi2, nr);
|
INDEX_3 tripl(pi1, pi2, nr);
|
||||||
if (identifiedpoints_nr->Used (tripl))
|
if (identifiedpoints_nr.Used (tripl))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
@ -2496,12 +2502,12 @@ namespace netgen
|
|||||||
int Identifications :: GetSymmetric (PointIndex pi1, PointIndex pi2) const
|
int Identifications :: GetSymmetric (PointIndex pi1, PointIndex pi2) const
|
||||||
{
|
{
|
||||||
INDEX_2 pair(pi1, pi2);
|
INDEX_2 pair(pi1, pi2);
|
||||||
if (identifiedpoints->Used (pair))
|
if (identifiedpoints.Used (pair))
|
||||||
return identifiedpoints->Get(pair);
|
return identifiedpoints.Get(pair);
|
||||||
|
|
||||||
pair = INDEX_2 (pi2, pi1);
|
pair = INDEX_2 (pi2, pi1);
|
||||||
if (identifiedpoints->Used (pair))
|
if (identifiedpoints.Used (pair))
|
||||||
return identifiedpoints->Get(pair);
|
return identifiedpoints.Get(pair);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2525,12 +2531,12 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
cout << "getmap, identnr = " << identnr << endl;
|
cout << "getmap, identnr = " << identnr << endl;
|
||||||
|
|
||||||
for (int i = 1; i <= identifiedpoints_nr->GetNBags(); i++)
|
for (int i = 1; i <= identifiedpoints_nr.GetNBags(); i++)
|
||||||
for (int j = 1; j <= identifiedpoints_nr->GetBagSize(i); j++)
|
for (int j = 1; j <= identifiedpoints_nr.GetBagSize(i); j++)
|
||||||
{
|
{
|
||||||
INDEX_3 i3;
|
INDEX_3 i3;
|
||||||
int dummy;
|
int dummy;
|
||||||
identifiedpoints_nr->GetData (i, j, i3, dummy);
|
identifiedpoints_nr.GetData (i, j, i3, dummy);
|
||||||
|
|
||||||
if (i3.I3() == identnr || !identnr)
|
if (i3.I3() == identnr || !identnr)
|
||||||
{
|
{
|
||||||
@ -2550,21 +2556,21 @@ namespace netgen
|
|||||||
identpairs.SetSize(0);
|
identpairs.SetSize(0);
|
||||||
|
|
||||||
if (identnr == 0)
|
if (identnr == 0)
|
||||||
for (int i = 1; i <= identifiedpoints->GetNBags(); i++)
|
for (int i = 1; i <= identifiedpoints.GetNBags(); i++)
|
||||||
for (int j = 1; j <= identifiedpoints->GetBagSize(i); j++)
|
for (int j = 1; j <= identifiedpoints.GetBagSize(i); j++)
|
||||||
{
|
{
|
||||||
INDEX_2 i2;
|
INDEX_2 i2;
|
||||||
int nr;
|
int nr;
|
||||||
identifiedpoints->GetData (i, j, i2, nr);
|
identifiedpoints.GetData (i, j, i2, nr);
|
||||||
identpairs.Append (i2);
|
identpairs.Append (i2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (int i = 1; i <= identifiedpoints_nr->GetNBags(); i++)
|
for (int i = 1; i <= identifiedpoints_nr.GetNBags(); i++)
|
||||||
for (int j = 1; j <= identifiedpoints_nr->GetBagSize(i); j++)
|
for (int j = 1; j <= identifiedpoints_nr.GetBagSize(i); j++)
|
||||||
{
|
{
|
||||||
INDEX_3 i3;
|
INDEX_3 i3;
|
||||||
int dummy;
|
int dummy;
|
||||||
identifiedpoints_nr->GetData (i, j, i3 , dummy);
|
identifiedpoints_nr.GetData (i, j, i3 , dummy);
|
||||||
|
|
||||||
if (i3.I3() == identnr)
|
if (i3.I3() == identnr)
|
||||||
identpairs.Append (INDEX_2(i3.I1(), i3.I2()));
|
identpairs.Append (INDEX_2(i3.I1(), i3.I2()));
|
||||||
@ -2574,17 +2580,17 @@ namespace netgen
|
|||||||
|
|
||||||
void Identifications :: SetMaxPointNr (int maxpnum)
|
void Identifications :: SetMaxPointNr (int maxpnum)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= identifiedpoints->GetNBags(); i++)
|
for (int i = 1; i <= identifiedpoints.GetNBags(); i++)
|
||||||
for (int j = 1; j <= identifiedpoints->GetBagSize(i); j++)
|
for (int j = 1; j <= identifiedpoints.GetBagSize(i); j++)
|
||||||
{
|
{
|
||||||
INDEX_2 i2;
|
INDEX_2 i2;
|
||||||
int nr;
|
int nr;
|
||||||
identifiedpoints->GetData (i, j, i2, nr);
|
identifiedpoints.GetData (i, j, i2, nr);
|
||||||
|
|
||||||
if (i2.I1() > maxpnum || i2.I2() > maxpnum)
|
if (i2.I1() > maxpnum || i2.I2() > maxpnum)
|
||||||
{
|
{
|
||||||
i2.I1() = i2.I2() = -1;
|
i2.I1() = i2.I2() = -1;
|
||||||
identifiedpoints->SetData (i, j, i2, -1);
|
identifiedpoints.SetData (i, j, i2, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2593,8 +2599,8 @@ namespace netgen
|
|||||||
void Identifications :: Print (ostream & ost) const
|
void Identifications :: Print (ostream & ost) const
|
||||||
{
|
{
|
||||||
ost << "Identifications:" << endl;
|
ost << "Identifications:" << endl;
|
||||||
ost << "pairs: " << endl << *identifiedpoints << endl;
|
ost << "pairs: " << endl << identifiedpoints << endl;
|
||||||
ost << "pairs and nr: " << endl << *identifiedpoints_nr << endl;
|
ost << "pairs and nr: " << endl << identifiedpoints_nr << endl;
|
||||||
ost << "table: " << endl << idpoints_table << endl;
|
ost << "table: " << endl << idpoints_table << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1445,17 +1445,17 @@ namespace netgen
|
|||||||
class Identifications
|
class Identifications
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum ID_TYPE { UNDEFINED = 1, PERIODIC = 2, CLOSESURFACES = 3, CLOSEEDGES = 4};
|
enum ID_TYPE : unsigned char { UNDEFINED = 1, PERIODIC = 2, CLOSESURFACES = 3, CLOSEEDGES = 4};
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Mesh & mesh;
|
class Mesh & mesh;
|
||||||
|
|
||||||
/// identify points (thin layers, periodic b.c.)
|
/// identify points (thin layers, periodic b.c.)
|
||||||
INDEX_2_HASHTABLE<int> * identifiedpoints;
|
INDEX_2_HASHTABLE<int> identifiedpoints;
|
||||||
|
|
||||||
/// the same, with info about the id-nr
|
/// the same, with info about the id-nr
|
||||||
INDEX_3_HASHTABLE<int> * identifiedpoints_nr;
|
INDEX_3_HASHTABLE<int> identifiedpoints_nr;
|
||||||
|
|
||||||
/// sorted by identification nr
|
/// sorted by identification nr
|
||||||
TABLE<INDEX_2> idpoints_table;
|
TABLE<INDEX_2> idpoints_table;
|
||||||
@ -1486,23 +1486,23 @@ namespace netgen
|
|||||||
bool Get (PointIndex pi1, PointIndex pi2, int identnr) const;
|
bool Get (PointIndex pi1, PointIndex pi2, int identnr) const;
|
||||||
bool GetSymmetric (PointIndex pi1, PointIndex pi2, int identnr) const;
|
bool GetSymmetric (PointIndex pi1, PointIndex pi2, int identnr) const;
|
||||||
|
|
||||||
bool HasIdentifiedPoints() const { return identifiedpoints != nullptr; }
|
// bool HasIdentifiedPoints() const { return identifiedpoints != nullptr; }
|
||||||
///
|
///
|
||||||
INDEX_2_HASHTABLE<int> & GetIdentifiedPoints ()
|
INDEX_2_HASHTABLE<int> & GetIdentifiedPoints ()
|
||||||
{
|
{
|
||||||
return *identifiedpoints;
|
return identifiedpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Used (PointIndex pi1, PointIndex pi2)
|
bool Used (PointIndex pi1, PointIndex pi2)
|
||||||
{
|
{
|
||||||
return identifiedpoints->Used (INDEX_2 (pi1, pi2));
|
return identifiedpoints.Used (INDEX_2 (pi1, pi2));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UsedSymmetric (PointIndex pi1, PointIndex pi2)
|
bool UsedSymmetric (PointIndex pi1, PointIndex pi2)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
identifiedpoints->Used (INDEX_2 (pi1, pi2)) ||
|
identifiedpoints.Used (INDEX_2 (pi1, pi2)) ||
|
||||||
identifiedpoints->Used (INDEX_2 (pi2, pi1));
|
identifiedpoints.Used (INDEX_2 (pi2, pi1));
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -1531,8 +1531,38 @@ namespace netgen
|
|||||||
void SetMaxPointNr (int maxpnum);
|
void SetMaxPointNr (int maxpnum);
|
||||||
|
|
||||||
DLL_HEADER void Print (ostream & ost) const;
|
DLL_HEADER void Print (ostream & ost) const;
|
||||||
|
|
||||||
|
ngstd::Archive & DoArchive (ngstd::Archive & ar)
|
||||||
|
{
|
||||||
|
ar & maxidentnr;
|
||||||
|
ar & identifiedpoints & identifiedpoints_nr;
|
||||||
|
ar & idpoints_table;
|
||||||
|
if (ar.Output())
|
||||||
|
{
|
||||||
|
size_t s = type.Size();
|
||||||
|
ar & s;
|
||||||
|
for (auto & t : type)
|
||||||
|
ar & (unsigned char&)(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
size_t s;
|
||||||
|
ar & s;
|
||||||
|
type.SetSize(s);
|
||||||
|
for (auto & t : type)
|
||||||
|
ar & (unsigned char&)(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << "identifiedpoints = " << identifiedpoints << endl;
|
||||||
|
cout << "identifiedpoints_nr = " << identifiedpoints_nr << endl;
|
||||||
|
cout << "idpoints_table = " << idpoints_table << endl;
|
||||||
|
cout << "type = " << type << endl;
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline ngstd::Archive & operator & (ngstd::Archive & archive, Identifications & mp)
|
||||||
|
{ return mp.DoArchive(archive); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -861,7 +861,7 @@ namespace netgen
|
|||||||
|
|
||||||
if (mesh -> HasIdentifications() )
|
if (mesh -> HasIdentifications() )
|
||||||
{
|
{
|
||||||
if (mesh->GetIdentifications().HasIdentifiedPoints())
|
// if (mesh->GetIdentifications().HasIdentifiedPoints())
|
||||||
{
|
{
|
||||||
INDEX_2_HASHTABLE<int> & idpts =
|
INDEX_2_HASHTABLE<int> & idpts =
|
||||||
mesh->GetIdentifications().GetIdentifiedPoints();
|
mesh->GetIdentifications().GetIdentifiedPoints();
|
||||||
|
Loading…
Reference in New Issue
Block a user