mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
create empty mesh before calling mesher (thx jwpeterson)
This commit is contained in:
parent
7cbdcf29cf
commit
bdac0aee24
@ -73,6 +73,9 @@ using namespace netgen;
|
||||
|
||||
namespace nglib
|
||||
{
|
||||
inline void NOOP_Deleter(void *) { ; }
|
||||
|
||||
|
||||
// initialize, deconstruct Netgen library:
|
||||
DLL_HEADER void Ng_Init ()
|
||||
{
|
||||
@ -510,9 +513,9 @@ namespace nglib
|
||||
// MeshingParameters mparam;
|
||||
mp->Transfer_Parameters();
|
||||
|
||||
shared_ptr<Mesh> m;
|
||||
shared_ptr<Mesh> m(new Mesh, &NOOP_Deleter);
|
||||
MeshFromSpline2D (*(SplineGeometry2d*)geom, m, mparam);
|
||||
new shared_ptr<Mesh> (m); // hack to keep mesh m alive
|
||||
// new shared_ptr<Mesh> (m); // hack to keep mesh m alive
|
||||
|
||||
cout << m->GetNSE() << " elements, " << m->GetNP() << " points" << endl;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user