occ meshing with mesh-sharedptr

This commit is contained in:
Joachim Schoeberl 2014-09-30 17:30:36 +00:00
parent 46a6c155da
commit 335148a503
3 changed files with 6 additions and 6 deletions

View File

@ -1273,15 +1273,15 @@ namespace netgen
int OCCGenerateMesh (OCCGeometry & geom, Mesh *& mesh, MeshingParameters & mparam, int OCCGenerateMesh (OCCGeometry & geom, shared_ptr<Mesh> & mesh, MeshingParameters & mparam,
int perfstepsstart, int perfstepsend) int perfstepsstart, int perfstepsend)
{ {
multithread.percent = 0; multithread.percent = 0;
if (perfstepsstart <= MESHCONST_ANALYSE) if (perfstepsstart <= MESHCONST_ANALYSE)
{ {
delete mesh; // delete mesh;
mesh = new Mesh(); mesh = make_shared<Mesh>();
mesh->geomtype = Mesh::GEOM_OCC; mesh->geomtype = Mesh::GEOM_OCC;
OCCSetLocalMeshSize(geom,*mesh); OCCSetLocalMeshSize(geom,*mesh);

View File

@ -1564,7 +1564,7 @@ namespace netgen
int OCCGeometry :: GenerateMesh (Mesh*& mesh, MeshingParameters & mparam, int OCCGeometry :: GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam,
int perfstepsstart, int perfstepsend) int perfstepsstart, int perfstepsend)
{ {
return OCCGenerateMesh (*this, mesh, mparam, perfstepsstart, perfstepsend); return OCCGenerateMesh (*this, mesh, mparam, perfstepsstart, perfstepsend);

View File

@ -387,7 +387,7 @@ namespace netgen
void WriteOCC_STL(char * filename); void WriteOCC_STL(char * filename);
virtual int GenerateMesh (Mesh*& mesh, MeshingParameters & mparam, virtual int GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam,
int perfstepsstart, int perfstepsend); int perfstepsstart, int perfstepsend);
virtual const Refinement & GetRefinement () const; virtual const Refinement & GetRefinement () const;
@ -441,7 +441,7 @@ namespace netgen
// Philippose - 31.09.2009 // Philippose - 31.09.2009
// External access to the mesh generation functions within the OCC // External access to the mesh generation functions within the OCC
// subsystem (Not sure if this is the best way to implement this....!!) // subsystem (Not sure if this is the best way to implement this....!!)
extern int OCCGenerateMesh (OCCGeometry & occgeometry, Mesh*& mesh, extern int OCCGenerateMesh (OCCGeometry & occgeometry, shared_ptr<Mesh> & mesh,
MeshingParameters & mparam, MeshingParameters & mparam,
int perfstepsstart, int perfstepsend); int perfstepsstart, int perfstepsend);