From ec5ec3990982df5d047eb92e305f8209641832eb Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 30 Jul 2019 09:54:46 +0200 Subject: [PATCH] fix refinement if no geometry is available --- libsrc/interface/nginterface_v2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libsrc/interface/nginterface_v2.cpp b/libsrc/interface/nginterface_v2.cpp index 2fb395cf..48c94e40 100644 --- a/libsrc/interface/nginterface_v2.cpp +++ b/libsrc/interface/nginterface_v2.cpp @@ -1163,10 +1163,11 @@ namespace netgen biopt.refine_hp = 1; biopt.task_manager = task_manager; biopt.tracer = tracer; - - const Refinement & ref = mesh->GetGeometry()->GetRefinement(); - ref.Bisect (*mesh, biopt); + if(mesh->GetGeometry()) + mesh->GetGeometry()->GetRefinement().Bisect (*mesh, biopt); + else + Refinement().Bisect(*mesh, biopt); (*tracer)("call updatetop", false); mesh -> UpdateTopology(task_manager, tracer); (*tracer)("call updatetop", true);