From d009761dd2cf4fd2b06e0e0e5dc8bce2ec6cfc6d Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 24 Dec 2020 17:24:46 +0000 Subject: [PATCH 1/2] :whale: changed tag name of dependances image --- .github/workflows/dockerhub-publish-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub-publish-dependencies.yml b/.github/workflows/dockerhub-publish-dependencies.yml index 51300e4e4..73cc2542d 100644 --- a/.github/workflows/dockerhub-publish-dependencies.yml +++ b/.github/workflows/dockerhub-publish-dependencies.yml @@ -33,7 +33,7 @@ jobs: with: dockerfile: DockerfileDependances push: true - tags: ukaea/paramak:latest + tags: ukaea/paramak:dependances build-args: | cq_version=master compile_cores=2 From 8b067fe3d0a74b6c6a334a1d3775baeefbad7854 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 2 Jan 2021 19:51:25 +0000 Subject: [PATCH 2/2] method=None now skips geometry creation --- .../parametric_neutronics/neutronics_model.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/paramak/parametric_neutronics/neutronics_model.py b/paramak/parametric_neutronics/neutronics_model.py index def689647..5354a2e01 100644 --- a/paramak/parametric_neutronics/neutronics_model.py +++ b/paramak/parametric_neutronics/neutronics_model.py @@ -269,17 +269,19 @@ def create_neutronics_geometry(self, method=None): Arguments: method: (str): The method to use when making the imprinted and - merged geometry. Options are "ppp", "trelis", "pymoab". - Defaults to None. + merged geometry. Options are "ppp", "trelis", "pymoab" and + None. Defaults to None. """ - os.system('rm dagmc_not_watertight.h5m') - os.system('rm dagmc.h5m') - - if method not in ['ppp', 'trelis', 'pymoab']: + if method in ['ppp', 'trelis', 'pymoab']: + os.system('rm dagmc_not_watertight.h5m') + os.system('rm dagmc.h5m') + elif method is None and Path.is_file('dagmc.h5m'): + print('Using previously made dagmc.h5m file') + else: raise ValueError( "the method using in create_neutronics_geometry \ - should be either ppp or trelis not", method) + should be either ppp, trelis, pymoab or None.", method) if method == 'ppp': @@ -322,8 +324,7 @@ def create_neutronics_geometry(self, method=None): filename='dagmc.h5m', tolerance=self.faceting_tolerance ) - - print('neutronics model saved as dagmc.h5m') + return 'dagmc.h5m' def _make_watertight(self): """Runs the DAGMC make_watertight script thatt seals the facetets of