diff --git a/src/underworld3/utilities/__init__.py b/src/underworld3/utilities/__init__.py index 2c5638b9f..bef031533 100644 --- a/src/underworld3/utilities/__init__.py +++ b/src/underworld3/utilities/__init__.py @@ -2,20 +2,22 @@ from . import _api_tools -# get/import petsc_gen_xdmf from the original petsc installation -import sys -import petsc4py +def _append_petsc_path(): + # get/import petsc_gen_xdmf from the original petsc installation + import sys + import petsc4py -conf = petsc4py.get_config() -petsc_dir = conf["PETSC_DIR"] -if not petsc_dir + "/lib/petsc/bin" in sys.path: - sys.path.append(petsc_dir + "/lib/petsc/bin") + conf = petsc4py.get_config() + petsc_dir = conf["PETSC_DIR"] + if not petsc_dir + "/lib/petsc/bin" in sys.path: + sys.path.append(petsc_dir + "/lib/petsc/bin") -from .uw_petsc_gen_xdmf import * -from .uw_swarmIO import * +_append_petsc_path() -from ._utils import * +from .uw_petsc_gen_xdmf import Xdmf, generateXdmf, generate_uw_Xdmf +from .uw_swarmIO import swarm_h5, swarm_xdmf +from ._utils import CaptureStdout, h5_scan, mem_footprint, gather_data + +from .read_medit_ascii import read_medit_ascii, print_medit_mesh_info +from .create_dmplex_from_medit import create_dmplex_from_medit -from .read_medit_ascii import read_medit_ascii -from .read_medit_ascii import print_medit_mesh_info -from .create_dmplex_from_medit import create_dmplex_from_medit \ No newline at end of file