store refinement

This commit is contained in:
Christopher Lackner 2019-10-03 13:52:59 +02:00 committed by Matthias Hochsteger
parent fa3ae333ce
commit c309c9846f
2 changed files with 9 additions and 7 deletions

View File

@ -126,12 +126,6 @@ namespace netgen
return 0;
}
const Refinement & NetgenGeometry :: GetRefinement () const
{
return *new Refinement(*this);
}
void NetgenGeometry :: Save (string filename) const
{
throw NgException("Cannot save geometry - no geometry available");

View File

@ -15,12 +15,20 @@ namespace netgen
class DLL_HEADER NetgenGeometry
{
unique_ptr<Refinement> ref;
public:
NetgenGeometry()
{
ref = make_unique<Refinement>(*this);
}
virtual ~NetgenGeometry () { ; }
virtual int GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam);
virtual const Refinement & GetRefinement () const;
virtual const Refinement & GetRefinement () const
{
return *ref;
}
virtual void DoArchive(Archive&)
{ throw NgException("DoArchive not implemented for " + Demangle(typeid(*this).name())); }