mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
mesh interface, deallocation
This commit is contained in:
parent
92dbe6aeb0
commit
36803ec256
@ -27,8 +27,10 @@ namespace netgen
|
||||
|
||||
BlockAllocator :: ~BlockAllocator ()
|
||||
{
|
||||
// cout << "****************** delete BlockAllocator " << endl;
|
||||
for (int i = 0; i < bablocks.Size(); i++)
|
||||
delete [] bablocks[i];
|
||||
bablocks.SetSize(0);
|
||||
}
|
||||
|
||||
void * BlockAllocator :: Alloc ()
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
///
|
||||
void Free (void * p)
|
||||
{
|
||||
if (!bablocks.Size()) return;
|
||||
*(void**)p = freelist;
|
||||
freelist = p;
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ namespace netgen
|
||||
|
||||
void LoadMesh (istream & str);
|
||||
void SaveMesh (ostream & str) const;
|
||||
void UpdateTopology ();
|
||||
void DoArchive (ngstd::Archive & archive);
|
||||
|
||||
virtual ~Ngx_Mesh();
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "nginterface.h"
|
||||
#include "nginterface_v2.hpp"
|
||||
#include <visual.hpp>
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
@ -22,7 +23,11 @@ namespace netgen
|
||||
shared_ptr<Mesh> Ngx_Mesh :: SelectMesh () const
|
||||
{
|
||||
shared_ptr<Mesh> hmesh = netgen::mesh;
|
||||
|
||||
netgen::mesh = mesh;
|
||||
vssolution.SetMesh(mesh);
|
||||
vsmesh.SetMesh(mesh);
|
||||
|
||||
return hmesh;
|
||||
}
|
||||
|
||||
@ -80,6 +85,11 @@ namespace netgen
|
||||
}
|
||||
}
|
||||
|
||||
void Ngx_Mesh :: UpdateTopology ()
|
||||
{
|
||||
if (mesh)
|
||||
mesh -> UpdateTopology();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
@ -47,6 +47,7 @@ namespace netgen
|
||||
|
||||
Mesh :: ~Mesh()
|
||||
{
|
||||
// cout << "******************** deleting Mesh **********" << endl;
|
||||
delete lochfunc;
|
||||
delete boundaryedges;
|
||||
delete surfelementht;
|
||||
|
Loading…
Reference in New Issue
Block a user