mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 12:50:34 +05:00
Merge branch 'save_compressed_mesh' into 'master'
check filename extension when saving a mesh See merge request !57
This commit is contained in:
commit
f1917aa2c4
@ -409,11 +409,16 @@ namespace netgen
|
|||||||
|
|
||||||
void Mesh :: Save (const string & filename) const
|
void Mesh :: Save (const string & filename) const
|
||||||
{
|
{
|
||||||
|
ostream * outfile;
|
||||||
|
if (filename.find(".vol.gz")!=string::npos)
|
||||||
|
outfile = new ogzstream(filename.c_str());
|
||||||
|
else if (filename.find(".vol")!=string::npos)
|
||||||
|
outfile = new ofstream(filename.c_str());
|
||||||
|
else
|
||||||
|
outfile = new ogzstream((filename+".vol.gz").c_str());
|
||||||
|
|
||||||
ofstream outfile(filename.c_str());
|
Save(*outfile);
|
||||||
// ogzstream outfile( (filename+".gz") .c_str());
|
delete outfile;
|
||||||
|
|
||||||
Save(outfile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user