store geometry with mesh, if available

This commit is contained in:
Joachim Schöberl 2016-05-06 07:30:59 +02:00
parent 1d9f0ae95c
commit 055031ce0d
3 changed files with 7 additions and 2 deletions

View File

@ -1096,6 +1096,8 @@ void Ng_HighOrder (int order, bool rational)
(&const_cast<Refinement&> (ng_geometry -> GetRefinement()), (&const_cast<Refinement&> (ng_geometry -> GetRefinement()),
order, rational); order, rational);
*/ */
if (!mesh->GetGeometry())
throw NgException ("don't have a geometry for mesh curving");
mesh->BuildCurvedElements mesh->BuildCurvedElements
(&const_cast<Refinement&> (mesh->GetGeometry()->GetRefinement()), (&const_cast<Refinement&> (mesh->GetGeometry()->GetRefinement()),
order, rational); order, rational);

View File

@ -768,6 +768,9 @@ namespace netgen
} }
} }
outfile << endl << endl << "endmesh" << endl << endl;
if (geometry)
geometry -> SaveToMeshFile (outfile);
} }

View File

@ -305,9 +305,9 @@ namespace netgen
outfile = new ofstream (filename.c_str()); outfile = new ofstream (filename.c_str());
mesh -> Save (*outfile); mesh -> Save (*outfile);
*outfile << endl << endl << "endmesh" << endl << endl; // *outfile << endl << endl << "endmesh" << endl << endl;
if (ng_geometry) if (ng_geometry && !mesh->GetGeometry())
ng_geometry -> SaveToMeshFile (*outfile); ng_geometry -> SaveToMeshFile (*outfile);
delete outfile; delete outfile;