mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
write identification names into mesh
This commit is contained in:
parent
7f5df05bb7
commit
bda192ba90
@ -901,6 +901,13 @@ namespace netgen
|
||||
outfile << " " << type;
|
||||
}
|
||||
outfile << "\n";
|
||||
outfile << "identificationnames\n";
|
||||
outfile << ident -> GetMaxNr() << "\n";
|
||||
for (i = 1; i <= ident -> GetMaxNr(); i++)
|
||||
{
|
||||
string name = ident -> GetName(i);
|
||||
outfile << ident->GetName(i) << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
int cntmat = 0;
|
||||
@ -1451,6 +1458,17 @@ namespace netgen
|
||||
ident -> SetType(i,Identifications::ID_TYPE(type));
|
||||
}
|
||||
}
|
||||
if (strcmp (str, "identificationnames") == 0)
|
||||
{
|
||||
infile >> n;
|
||||
PrintMessage (3, n, " identificationnames");
|
||||
for (i = 1; i <= n; i++)
|
||||
{
|
||||
string name;
|
||||
infile >> name;
|
||||
ident -> SetName(i,name);
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp (str, "materials") == 0)
|
||||
{
|
||||
|
@ -1642,6 +1642,19 @@ namespace netgen
|
||||
names.Append(name);
|
||||
return names.Pos(name)+1;
|
||||
}
|
||||
string GetName(int nr) const
|
||||
{
|
||||
if (nr <= names.Size())
|
||||
return names[nr - 1];
|
||||
else
|
||||
return "";
|
||||
}
|
||||
void SetName(int nr, string name)
|
||||
{
|
||||
while(names.Size() < nr)
|
||||
names.Append("");
|
||||
names[nr-1] = name;
|
||||
}
|
||||
|
||||
/// remove secondorder
|
||||
void SetMaxPointNr (int maxpnum);
|
||||
|
Loading…
Reference in New Issue
Block a user