archiving ngscore::CloseHashTable

This commit is contained in:
Joachim Schoeberl 2025-01-01 16:42:11 +01:00
parent ce5f6d695c
commit e926071bb2
4 changed files with 18 additions and 4 deletions

View File

@ -834,6 +834,12 @@ namespace ngcore
hash = T_HASH(invalid); hash = T_HASH(invalid);
used = 0; used = 0;
} }
void DoArchive (Archive & ar)
{
ar & hash & cont;
ar & size & mask & used;
}
class Iterator class Iterator
{ {

View File

@ -2708,10 +2708,9 @@ namespace netgen
void Identifications :: DoArchive (Archive & ar) void Identifications :: DoArchive (Archive & ar)
{ {
ar & maxidentnr; ar & maxidentnr;
// ar & identifiedpoints & identifiedpoints_nr; ar & identifiedpoints & identifiedpoints_nr;
#pragma message( "Archive CloseHadhTable missing " __FILE__ )
ar & idpoints_table; ar & idpoints_table;
if (ar.Output()) if (ar.Output())
{ {
size_t s = type.Size(); size_t s = type.Size();

View File

@ -292,6 +292,9 @@ namespace netgen
constexpr PointIndex operator[] (int i) const { return PointIndex(INDEX_2::operator[](i)); } constexpr PointIndex operator[] (int i) const { return PointIndex(INDEX_2::operator[](i)); }
PointIndex & operator[] (int i) { return reinterpret_cast<PointIndex&>(INDEX_2::operator[](i)); } PointIndex & operator[] (int i) { return reinterpret_cast<PointIndex&>(INDEX_2::operator[](i)); }
template <typename ARCHIVE>
void DoArchive(ARCHIVE& ar) { ar.Do(&I1(), 2); }
PointIndex & I1 () { return (*this)[0]; } PointIndex & I1 () { return (*this)[0]; }
PointIndex & I2 () { return (*this)[1]; } PointIndex & I2 () { return (*this)[1]; }
PointIndex I1 () const { return (*this)[0]; } PointIndex I1 () const { return (*this)[0]; }
@ -314,6 +317,10 @@ namespace netgen
constexpr PointIndices (PointIndex i1, PointIndex i2, PointIndex i3) : INDEX_3(i1,i2,i3) { ; } constexpr PointIndices (PointIndex i1, PointIndex i2, PointIndex i3) : INDEX_3(i1,i2,i3) { ; }
PointIndex operator[] (int i) const { return PointIndex(INDEX_3::operator[](i)); } PointIndex operator[] (int i) const { return PointIndex(INDEX_3::operator[](i)); }
PointIndex & operator[] (int i) { return reinterpret_cast<PointIndex&>(INDEX_3::operator[](i)); } PointIndex & operator[] (int i) { return reinterpret_cast<PointIndex&>(INDEX_3::operator[](i)); }
template <typename ARCHIVE>
void DoArchive(ARCHIVE& ar) { ar.Do(&I1(), 3); }
PointIndex & I1 () { return (*this)[0]; } PointIndex & I1 () { return (*this)[0]; }
PointIndex & I2 () { return (*this)[1]; } PointIndex & I2 () { return (*this)[1]; }
PointIndex & I3 () { return (*this)[2]; } PointIndex & I3 () { return (*this)[2]; }
@ -336,6 +343,9 @@ namespace netgen
PointIndex operator[] (int i) const { return PointIndex(INDEX_4::operator[](i)); } PointIndex operator[] (int i) const { return PointIndex(INDEX_4::operator[](i)); }
PointIndex & operator[] (int i) { return reinterpret_cast<PointIndex&>(INDEX_4::operator[](i)); } PointIndex & operator[] (int i) { return reinterpret_cast<PointIndex&>(INDEX_4::operator[](i)); }
template <typename ARCHIVE>
void DoArchive(ARCHIVE& ar) { ar.Do(&I1(), 4); }
PointIndex & I1 () { return (*this)[0]; } PointIndex & I1 () { return (*this)[0]; }
PointIndex & I2 () { return (*this)[1]; } PointIndex & I2 () { return (*this)[1]; }
PointIndex & I3 () { return (*this)[2]; } PointIndex & I3 () { return (*this)[2]; }

View File

@ -424,7 +424,6 @@ namespace netgen
{ {
PrintMessage (3, "Validate mesh"); PrintMessage (3, "Validate mesh");
int np = mesh.GetNP(); int np = mesh.GetNP();
int ne = mesh.GetNE();
// int i, j; // int i, j;
NgArray<INDEX_2> parents(np); NgArray<INDEX_2> parents(np);