Skip to content

Commit

Permalink
Merge pull request #655 from ukaea/simulate_optionally_rebuilds_model
Browse files Browse the repository at this point in the history
Simulate optionally rebuilds model
  • Loading branch information
shimwell authored Jan 2, 2021
2 parents 955f576 + 8b067fe commit 151d54e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-publish-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 10 additions & 9 deletions paramak/parametric_neutronics/neutronics_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,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':

Expand Down Expand Up @@ -350,8 +352,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
Expand Down

0 comments on commit 151d54e

Please sign in to comment.