From ebfb4ef1947a43488ed7fdaf80bfcee6005d9f87 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:05:15 +0000 Subject: [PATCH] move "Remove boundary entities" after applying refinemen --- meshwell/model.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meshwell/model.py b/meshwell/model.py index a1f0932..0612456 100644 --- a/meshwell/model.py +++ b/meshwell/model.py @@ -361,10 +361,6 @@ def mesh( ], ) - # Remove boundary entities - for entity in final_entity_list: - if not entity.keep: - self.model.occ.remove(entity.dimtags, recursive=True) # Perform refinement if background_remeshing_file is None: @@ -391,6 +387,11 @@ def mesh( bg_field = self.model.mesh.field.add("PostView") self.model.mesh.field.setNumber(bg_field, "ViewIndex", 0) gmsh.model.mesh.field.setAsBackgroundMesh(bg_field) + + # Remove boundary entities + for entity in final_entity_list: + if not entity.keep: + self.model.occ.remove(entity.dimtags, recursive=True) # Turn off default meshing options self.model.mesh.MeshSizeFromPoints = 0