mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-24 11:50:33 +05:00
set global shared ptr only if meshing fails
This commit is contained in:
parent
00a1d1a496
commit
4e860f4ca2
@ -271,10 +271,12 @@ DLL_HEADER void ExportNgOCC(py::module &m)
|
|||||||
if (comm.Rank()==0)
|
if (comm.Rank()==0)
|
||||||
{
|
{
|
||||||
SetGlobalMesh(mesh);
|
SetGlobalMesh(mesh);
|
||||||
netgen::mesh = mesh;
|
|
||||||
auto result = geo->GenerateMesh(mesh, mp);
|
auto result = geo->GenerateMesh(mesh, mp);
|
||||||
if(result != 0)
|
if(result != 0)
|
||||||
throw Exception("Meshing failed!");
|
{
|
||||||
|
netgen::mesh = mesh;
|
||||||
|
throw Exception("Meshing failed!");
|
||||||
|
}
|
||||||
ng_geometry = geo;
|
ng_geometry = geo;
|
||||||
if (comm.Size() > 1)
|
if (comm.Size() > 1)
|
||||||
mesh->Distribute();
|
mesh->Distribute();
|
||||||
|
Loading…
Reference in New Issue
Block a user