diff --git a/DockerfileTrelis b/DockerfileTrelis new file mode 100644 index 000000000..454ce368a --- /dev/null +++ b/DockerfileTrelis @@ -0,0 +1,38 @@ +# You will need the dagmc plugin (trelis17.1_ubuntu18.04.tar.gz) and Trelis +# (trelis17.1_ubuntu18.04.tar.gz) downloaded and in the same folder as this +# Dockerfile + +# buid with the following command +# sudo docker build -t paramak_with_trelis . + +# run with the following command +# sudo docker run -p 8888:8888 -p 5053:5053 paramak_with_trelis + + +FROM ukaea/paramak + +COPY trelis17.1_ubuntu18.04.tar.gz . +#this command installs trelis + +RUN mkdir -p /opt/Trelis-17.1/ + +RUN tar -xf trelis17.1_ubuntu18.04.tar.gz -C /opt/Trelis-17.1 + +COPY Trelis-17.1.0-Lin64.deb . +RUN dpkg -i Trelis-17.1.0-Lin64.deb + +RUN cd /opt/Trelis-17.1/bin && \ + ln -s plugins/svalinn/libdagmc.so . && \ + ln -s plugins/svalinn/libiGeom.so . && \ + ln -s plugins/svalinn/libmakeWatertight.so . && \ + ln -s plugins/svalinn/libmcnp2cad.so . && \ + ln -s plugins/svalinn/libMOAB.so . && \ + ln -s plugins/svalinn/libMOAB.so.5 . + +# puts the path for trelis into the PATH env +ENV PATH=$PATH:/opt/Trelis-17.1/bin + +# adds the license details, network or VPN connection will be needed +RUN echo 'HOST trelis-lic-1.services.l ANY 5053\nISV csimsoft' >> /opt/Trelis-17.1/bin/licenses/remote2.lic + +# now trelis should run in --batch --nographics mode diff --git a/paramak/neutronics_utils.py b/paramak/neutronics_utils.py index d4f33ae82..47b3e816d 100644 --- a/paramak/neutronics_utils.py +++ b/paramak/neutronics_utils.py @@ -236,8 +236,13 @@ def get_neutronics_results_from_statepoint_file( _save_2d_mesh_tally_as_png( score=score, tally=tally, - filename=tally.name.replace('(', '').replace(')', '').replace(',', '-') - ) + filename=tally.name.replace( + '(', + '').replace( + ')', + '').replace( + ',', + '-')) elif '_on_3D_mesh' in tally.name: mesh_id = 1 @@ -278,8 +283,14 @@ def get_neutronics_results_from_statepoint_file( tally_label=tally.name, tally_data=data, error_data=error, - outfile=tally.name.replace('(', '').replace(')', '').replace(',', '-') + '.vtk' - ) + outfile=tally.name.replace( + '(', + '').replace( + ')', + '').replace( + ',', + '-') + + '.vtk') else: # this must be a standard score cell tally