Merge branch 'save_load_bbbnd' into 'master'

Save load bbbnd

See merge request jschoeberl/netgen!345
This commit is contained in:
Joachim Schöberl 2020-11-02 09:43:04 +00:00
commit b855b419da

View File

@ -604,6 +604,19 @@ namespace netgen
outfile << (*this)[pi](2)/scale << "\n"; outfile << (*this)[pi](2)/scale << "\n";
} }
outfile << "\n" << "\n";
outfile << "# pnum index" << "\n";
outfile << "pointelements" << "\n";
outfile << pointelements.Size() << "\n";
for (i = 0; i < pointelements.Size(); i++)
{
outfile.width(8);
outfile << pointelements[i].pnum << " ";
outfile.width(8);
outfile << pointelements[i].index << "\n";
}
if (ident -> GetMaxNr() > 0) if (ident -> GetMaxNr() > 0)
{ {
outfile << "identifications\n"; outfile << "identifications\n";
@ -677,6 +690,18 @@ namespace netgen
outfile << endl << endl; outfile << endl << endl;
} }
int cntcd3names = 0;
for (int ii = 0; ii<cd3names.Size(); ii++)
if(cd3names[ii]) cntcd3names++;
if(cntcd3names)
{
outfile << "\n\ncd3names" << endl << cd3names.Size() << endl;
for (i=0; i<cd3names.Size(); i++)
outfile << i+1 << "\t" << GetCD3Name(i) << endl;
outfile << endl << endl;
}
/* /*
if ( GetDimension() == 2 ) if ( GetDimension() == 2 )
{ {
@ -1071,6 +1096,19 @@ namespace netgen
PrintMessage (3, n, " points done"); PrintMessage (3, n, " points done");
} }
if (strcmp (str, "pointelements") == 0)
{
infile >> n;
PrintMessage (3, n, " pointelements");
for (i = 1; i <= n; i++)
{
Element0d el;
infile >> el.pnum >> el.index;
pointelements.Append (el);
}
PrintMessage (3, n, " pointelements done");
}
if (strcmp (str, "identifications") == 0) if (strcmp (str, "identifications") == 0)
{ {
infile >> n; infile >> n;
@ -1155,6 +1193,23 @@ namespace netgen
} }
} }
if ( strcmp (str, "cd3names" ) == 0)
{
infile >> n;
NgArray<int,0> cd3nrs(n);
SetNCD3Names(n);
for( i=1; i<=n; i++)
{
string nextcd3name;
infile >> cd3nrs[i-1] >> nextcd3name;
cd3names[cd3nrs[i-1]-1] = new string(nextcd3name);
}
if (GetDimension() < 3)
{
throw NgException("co dim 3 elements not implemented for dimension < 3");
}
}
if (strcmp (str, "singular_points") == 0) if (strcmp (str, "singular_points") == 0)
{ {
infile >> n; infile >> n;