mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-24 03:40:34 +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)
|
||||
{
|
||||
SetGlobalMesh(mesh);
|
||||
netgen::mesh = mesh;
|
||||
auto result = geo->GenerateMesh(mesh, mp);
|
||||
if(result != 0)
|
||||
throw Exception("Meshing failed!");
|
||||
{
|
||||
netgen::mesh = mesh;
|
||||
throw Exception("Meshing failed!");
|
||||
}
|
||||
ng_geometry = geo;
|
||||
if (comm.Size() > 1)
|
||||
mesh->Distribute();
|
||||
|
Loading…
Reference in New Issue
Block a user