From ac5dca6ddf7640aa7b3280626d2b70392c0de366 Mon Sep 17 00:00:00 2001 From: Enrique Miralles-Dolz Date: Thu, 21 Nov 2024 15:34:31 -0500 Subject: [PATCH] adds new function for creating Cubit instances --- parastell/cubit_io.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/parastell/cubit_io.py b/parastell/cubit_io.py index 4a984ad..0e0a2bf 100644 --- a/parastell/cubit_io.py +++ b/parastell/cubit_io.py @@ -205,3 +205,14 @@ def export_dagmc_cubit_native( # exports if delete_upon_export: cubit.cmd(f"delete mesh volume all propagate") + + +def create_new_cubit_instance(): + """Creates new cubit instance checking if Cubit has been already + initialized. + + """ + if initialized: + cubit.cmd("new") + else: + init_cubit()