From b6d1ac0143dfbb672a1e977c11a1af5b29e1eff8 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sun, 4 Apr 2021 00:03:05 +0100 Subject: [PATCH 01/12] added build of cubit learn --- Dockerfile | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c67f4ec..4eb94567 100644 --- a/Dockerfile +++ b/Dockerfile @@ -186,30 +186,35 @@ RUN if [ "$include_neutronics" = "true" ] ; \ pip install openmc_data_downloader ; \ fi -COPY requirements.txt requirements.txt -RUN pip install -r requirements.txt +RUN if [ "$include_neutronics" = "true" ] ; \ + wget https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/master/Linux/Coreform-Cubit-master-b7317c72-Lin64.deb ; \ + dpkg -i Coreform-Cubit-master-b7317c72-Lin64.deb ; \ + fi + +# COPY requirements.txt requirements.txt +# RUN pip install -r requirements.txt -ENV OPENMC_CROSS_SECTIONS=/root/nndc_hdf5/cross_sections.xml -ENV PATH="/MOAB/build/bin:${PATH}" -ENV PATH="/DAGMC/bin:${PATH}" +# ENV OPENMC_CROSS_SECTIONS=/root/nndc_hdf5/cross_sections.xml +# ENV PATH="/MOAB/build/bin:${PATH}" +# ENV PATH="/DAGMC/bin:${PATH}" -RUN mkdir /home/paramak -EXPOSE 8888 -WORKDIR /home/paramak +# RUN mkdir /home/paramak +# EXPOSE 8888 +# WORKDIR /home/paramak -FROM dependencies as final +# FROM dependencies as final -COPY run_tests.sh run_tests.sh -COPY paramak paramak/ -COPY examples examples/ -COPY setup.py setup.py -COPY tests tests/ -COPY README.md README.md +# COPY run_tests.sh run_tests.sh +# COPY paramak paramak/ +# COPY examples examples/ +# COPY setup.py setup.py +# COPY tests tests/ +# COPY README.md README.md -# using setup.py instead of pip due to https://github.com/pypa/pip/issues/5816 -RUN python setup.py install +# # using setup.py instead of pip due to https://github.com/pypa/pip/issues/5816 +# RUN python setup.py install -# this helps prevent the kernal failing -RUN echo "#!/bin/bash\n\njupyter lab --notebook-dir=/home/paramak --port=8888 --no-browser --ip=0.0.0.0 --allow-root" >> /home/paramak/docker-cmd.sh -CMD bash /home/paramak/docker-cmd.sh +# # this helps prevent the kernal failing +# RUN echo "#!/bin/bash\n\njupyter lab --notebook-dir=/home/paramak --port=8888 --no-browser --ip=0.0.0.0 --allow-root" >> /home/paramak/docker-cmd.sh +# CMD bash /home/paramak/docker-cmd.sh From d23cc0472e3604e6d3a1b953285367f95b6c300d Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sun, 4 Apr 2021 22:38:16 +0100 Subject: [PATCH 02/12] added then to if statement --- Dockerfile | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4eb94567..4ce3bc71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -187,34 +187,34 @@ RUN if [ "$include_neutronics" = "true" ] ; \ fi RUN if [ "$include_neutronics" = "true" ] ; \ - wget https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/master/Linux/Coreform-Cubit-master-b7317c72-Lin64.deb ; \ + then wget https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/master/Linux/Coreform-Cubit-master-b7317c72-Lin64.deb ; \ dpkg -i Coreform-Cubit-master-b7317c72-Lin64.deb ; \ fi -# COPY requirements.txt requirements.txt -# RUN pip install -r requirements.txt +COPY requirements.txt requirements.txt +RUN pip install -r requirements.txt -# ENV OPENMC_CROSS_SECTIONS=/root/nndc_hdf5/cross_sections.xml -# ENV PATH="/MOAB/build/bin:${PATH}" -# ENV PATH="/DAGMC/bin:${PATH}" +ENV OPENMC_CROSS_SECTIONS=/root/nndc_hdf5/cross_sections.xml +ENV PATH="/MOAB/build/bin:${PATH}" +ENV PATH="/DAGMC/bin:${PATH}" -# RUN mkdir /home/paramak -# EXPOSE 8888 -# WORKDIR /home/paramak +RUN mkdir /home/paramak +EXPOSE 8888 +WORKDIR /home/paramak -# FROM dependencies as final +FROM dependencies as final -# COPY run_tests.sh run_tests.sh -# COPY paramak paramak/ -# COPY examples examples/ -# COPY setup.py setup.py -# COPY tests tests/ -# COPY README.md README.md +COPY run_tests.sh run_tests.sh +COPY paramak paramak/ +COPY examples examples/ +COPY setup.py setup.py +COPY tests tests/ +COPY README.md README.md -# # using setup.py instead of pip due to https://github.com/pypa/pip/issues/5816 -# RUN python setup.py install +# using setup.py instead of pip due to https://github.com/pypa/pip/issues/5816 +RUN python setup.py install -# # this helps prevent the kernal failing -# RUN echo "#!/bin/bash\n\njupyter lab --notebook-dir=/home/paramak --port=8888 --no-browser --ip=0.0.0.0 --allow-root" >> /home/paramak/docker-cmd.sh -# CMD bash /home/paramak/docker-cmd.sh +# this helps prevent the kernal failing +RUN echo "#!/bin/bash\n\njupyter lab --notebook-dir=/home/paramak --port=8888 --no-browser --ip=0.0.0.0 --allow-root" >> /home/paramak/docker-cmd.sh +CMD bash /home/paramak/docker-cmd.sh From a892bf84d57dcf00d1b6aa0b6c7d493260540edc Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 5 Apr 2021 15:27:19 +0100 Subject: [PATCH 03/12] using openmc version 0.12.1 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4ce3bc71..97bd44bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -164,7 +164,7 @@ RUN if [ "$include_neutronics" = "true" ] ; \ # Clone and install OpenMC with DAGMC RUN if [ "$include_neutronics" = "true" ] ; \ - then git clone --recurse-submodules https://github.com/openmc-dev/openmc.git /opt/openmc ; \ + then git clone --single-branch --branch v0.12.1 --depth 1 --recurse-submodules https://github.com/openmc-dev/openmc.git /opt/openmc ; \ cd /opt/openmc ; \ mkdir build ; \ cd build ; \ @@ -176,6 +176,7 @@ RUN if [ "$include_neutronics" = "true" ] ; \ make -j"$compile_cores" install ; \ cd .. ; \ pip install -e .[test] ; \ + cat /opt/openmc/tools/ci/download-xs.sh ; \ /opt/openmc/tools/ci/download-xs.sh ; \ fi From 765793cf2b94fbaf1f8b3a19fb14be42ffb3f313 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 10 Apr 2021 19:38:41 +0100 Subject: [PATCH 04/12] added extra packages for coreform cubit --- Dockerfile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97bd44bc..aa57d144 100644 --- a/Dockerfile +++ b/Dockerfile @@ -188,8 +188,19 @@ RUN if [ "$include_neutronics" = "true" ] ; \ fi RUN if [ "$include_neutronics" = "true" ] ; \ - then wget https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/master/Linux/Coreform-Cubit-master-b7317c72-Lin64.deb ; \ - dpkg -i Coreform-Cubit-master-b7317c72-Lin64.deb ; \ + then wget https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/master/Linux/Coreform-Cubit-master-60a5c1c2-Lin64.deb ; \ + apt-get --yes install libx11-6 ; \ + apt-get --yes install libgl1 ; \ + apt-get --yes install libglu1-mesa ; \ + apt-get --yes install libgl1-mesa-glx ; \ + apt-get --yes install libxcb-icccm4 ; \ + apt-get --yes install libxcb-image0 ; \ + apt-get --yes install libxcb-keysyms1 ; \ + apt-get --yes install libxcb-render-util0 ; \ + apt-get --yes install libxkbcommon-x11-0 ; \ + apt-get --yes install libxcb-randr0 ; \ + apt-get --yes install libxcb-xinerama0 ; \ + dpkg -i Coreform-Cubit-master-60a5c1c2-Lin64.deb ; \ fi COPY requirements.txt requirements.txt From 3590b3fc7b8a25cd0ff7665a08349e4cea533c21 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 10 Apr 2021 19:38:57 +0100 Subject: [PATCH 05/12] uncommented trelis tests --- tests/test_neutronics_utils.py | 364 ++++++++++++++++----------------- 1 file changed, 182 insertions(+), 182 deletions(-) diff --git a/tests/test_neutronics_utils.py b/tests/test_neutronics_utils.py index 0f0178ea..eb9839bc 100644 --- a/tests/test_neutronics_utils.py +++ b/tests/test_neutronics_utils.py @@ -199,185 +199,185 @@ def test_make_watertight_cmd_with_example_dagmc_file(self): assert Path("watertight_dagmc.h5m").exists() is True # these tests only work if trelis is avaialbe - # def test_make_watertight_cmd(self): - # """exports a h5m and makes it watertight, checks the the watertight - # file is produced.""" - - # os.system('rm *.stl *.h5m') - - # https://github.com/Shimwell/fusion_example_for_openmc_using_paramak/raw/main/dagmc.h5m - - # pf_coil = paramak.PoloidalFieldCoil( - # height=10, - # width=10, - # center_point=(100, 0), - # rotation_angle=180, - # material_tag='copper', - # method='trelis' - # ) - - # pf_coil.export_h5m_with_trelis( - # filename='not_watertight_dagmc.h5m', - # include_graveyard=True, - # ) - - # assert Path('not_watertight_dagmc.h5m').is_file - - # output_filename = paramak.neutronics_utils.make_watertight( - # input_filename="not_watertight_dagmc.h5m", - # output_filename="watertight_dagmc.h5m" - # ) - - # assert Path("not_watertight_dagmc.h5").exists() is True - # assert output_filename == "watertight_dagmc.h5m" - # assert Path("watertight_dagmc.h5").exists() is True - - # def test_trelis_command_to_create_dagmc_h5m_with_default_mat_name(self): - # """Creats a h5m file with trelis and forms groups using the material_tag - # key in the manifest.json file. Then checks the groups in the resulting - # h5 file match those in the original dictionary""" - - # pf_coil = paramak.PoloidalFieldCoil( - # height=10, - # width=10, - # center_point=(100, 0), - # rotation_angle=180, - # ) - - # pf_coil_case = paramak.PoloidalFieldCoilCaseFC( - # pf_coil=pf_coil, - # casing_thickness=5 - # ) - - # pf_coil.export_stp('pf_coil.stp') - # pf_coil_case.export_stp('pf_coil_case.stp') - - # manifest_with_material_tags = [ - # { - # "material_tag": "copper", - # "stp_filename": "pf_coil_case.stp" - # }, - # { - # "material_tag": "tungsten_carbide", - # "stp_filename": "pf_coil.stp" - # } - # ] - # with open('manifest.json', 'w') as outfile: - # json.dump(manifest_with_material_tags, outfile) - - # paramak.neutronics_utils.trelis_command_to_create_dagmc_h5m( - # faceting_tolerance=1e-2, - # merge_tolerance=1e-4, - # material_key_name='material_tag', - # batch=True - # ) - - # list_of_mats = paramak.neutronics_utils.find_material_groups_in_h5m( - # filename="dagmc_not_watertight.h5m" - # ) - - # assert len(list_of_mats) == 2 - # assert 'mat:copper' in list_of_mats - # assert 'mat:tungsten_carbide' in list_of_mats - # # assert 'mat:graveyard' in list_of_mats - - # def test_trelis_command_to_create_dagmc_h5m_with_user_mat_name(self): - # """Creats a h5m file with trelis and forms groups using the material_id - # key in the manifest.json file. Then checks the groups in the resulting - # h5 file match those in the original dictionary""" - - # os.system('rm *.stp *.h5m *.json') - - # pf_coil = paramak.PoloidalFieldCoil( - # height=10, - # width=10, - # center_point=(100, 0), - # rotation_angle=180, - # ) - - # pf_coil_case = paramak.PoloidalFieldCoilCaseFC( - # pf_coil=pf_coil, - # casing_thickness=5 - # ) - - # pf_coil.export_stp('pf_coil.stp') - # pf_coil_case.export_stp('pf_coil_case.stp') - - # manifest_with_material_tags = [ - # { - # "material_id": "42", - # "stp_filename": "pf_coil_case.stp" - # }, - # { - # "material_id": 12, # this is an int to check the str() works - # "stp_filename": "pf_coil.stp" - # } - # ] - # with open('manifest.json', 'w') as outfile: - # json.dump(manifest_with_material_tags, outfile) - - # paramak.neutronics_utils.trelis_command_to_create_dagmc_h5m( - # faceting_tolerance=1e-2, - # merge_tolerance=1e-4, - # material_key_name='material_id', - # batch=True, - # ) - - # list_of_mats = paramak.neutronics_utils.find_material_groups_in_h5m( - # filename="dagmc_not_watertight.h5m" - # ) - - # assert len(list_of_mats) == 2 - # assert 'mat:42' in list_of_mats - # assert 'mat:12' in list_of_mats - # # assert 'mat:graveyard' in list_of_mats - - # def test_trelis_command_to_create_dagmc_h5m_with_custom_geometry_key(self): - # """Creats a h5m file with trelis and loads stp files using a custom - # key in the manifest.json file. Then checks the groups in the resulting - # h5 file match those in the original dictionary""" - - # os.system('rm *.stp *.h5m *.json') - - # pf_coil = paramak.PoloidalFieldCoil( - # height=10, - # width=10, - # center_point=(100, 0), - # rotation_angle=180, - # ) - - # pf_coil_case = paramak.PoloidalFieldCoilCaseFC( - # pf_coil=pf_coil, - # casing_thickness=5 - # ) - - # pf_coil.export_stp('pf_coil_custom_key.stp') - # pf_coil_case.export_stp('pf_coil_case_custom_key.stp') - - # manifest_with_material_tags = [ - # { - # "material_tag": "copper", - # "geometry_filename": "pf_coil_custom_key.stp" - # }, - # { - # "material_tag": "tungsten_carbide", - # "geometry_filename": "pf_coil_case_custom_key.stp" - # } - # ] - # with open('manifest.json', 'w') as outfile: - # json.dump(manifest_with_material_tags, outfile) - - # paramak.neutronics_utils.trelis_command_to_create_dagmc_h5m( - # faceting_tolerance=1e-2, - # merge_tolerance=1e-4, - # geometry_key_name='geometry_filename', - # batch=True - # ) - - # list_of_mats = paramak.neutronics_utils.find_material_groups_in_h5m( - # filename="dagmc_not_watertight.h5m" - # ) - - # assert len(list_of_mats) == 2 - # assert 'mat:copper' in list_of_mats - # assert 'mat:tungsten_carbide' in list_of_mats + def test_make_watertight_cmd(self): + """exports a h5m and makes it watertight, checks the the watertight + file is produced.""" + + os.system('rm *.stl *.h5m') + + https://github.com/Shimwell/fusion_example_for_openmc_using_paramak/raw/main/dagmc.h5m + + pf_coil = paramak.PoloidalFieldCoil( + height=10, + width=10, + center_point=(100, 0), + rotation_angle=180, + material_tag='copper', + method='trelis' + ) + + pf_coil.export_h5m_with_trelis( + filename='not_watertight_dagmc.h5m', + include_graveyard=True, + ) + + assert Path('not_watertight_dagmc.h5m').is_file + + output_filename = paramak.neutronics_utils.make_watertight( + input_filename="not_watertight_dagmc.h5m", + output_filename="watertight_dagmc.h5m" + ) + + assert Path("not_watertight_dagmc.h5").exists() is True + assert output_filename == "watertight_dagmc.h5m" + assert Path("watertight_dagmc.h5").exists() is True + + def test_trelis_command_to_create_dagmc_h5m_with_default_mat_name(self): + """Creats a h5m file with trelis and forms groups using the material_tag + key in the manifest.json file. Then checks the groups in the resulting + h5 file match those in the original dictionary""" + + pf_coil = paramak.PoloidalFieldCoil( + height=10, + width=10, + center_point=(100, 0), + rotation_angle=180, + ) + + pf_coil_case = paramak.PoloidalFieldCoilCaseFC( + pf_coil=pf_coil, + casing_thickness=5 + ) + + pf_coil.export_stp('pf_coil.stp') + pf_coil_case.export_stp('pf_coil_case.stp') + + manifest_with_material_tags = [ + { + "material_tag": "copper", + "stp_filename": "pf_coil_case.stp" + }, + { + "material_tag": "tungsten_carbide", + "stp_filename": "pf_coil.stp" + } + ] + with open('manifest.json', 'w') as outfile: + json.dump(manifest_with_material_tags, outfile) + + paramak.neutronics_utils.trelis_command_to_create_dagmc_h5m( + faceting_tolerance=1e-2, + merge_tolerance=1e-4, + material_key_name='material_tag', + batch=True + ) + + list_of_mats = paramak.neutronics_utils.find_material_groups_in_h5m( + filename="dagmc_not_watertight.h5m" + ) + + assert len(list_of_mats) == 2 + assert 'mat:copper' in list_of_mats + assert 'mat:tungsten_carbide' in list_of_mats + # assert 'mat:graveyard' in list_of_mats + + def test_trelis_command_to_create_dagmc_h5m_with_user_mat_name(self): + """Creats a h5m file with trelis and forms groups using the material_id + key in the manifest.json file. Then checks the groups in the resulting + h5 file match those in the original dictionary""" + + os.system('rm *.stp *.h5m *.json') + + pf_coil = paramak.PoloidalFieldCoil( + height=10, + width=10, + center_point=(100, 0), + rotation_angle=180, + ) + + pf_coil_case = paramak.PoloidalFieldCoilCaseFC( + pf_coil=pf_coil, + casing_thickness=5 + ) + + pf_coil.export_stp('pf_coil.stp') + pf_coil_case.export_stp('pf_coil_case.stp') + + manifest_with_material_tags = [ + { + "material_id": "42", + "stp_filename": "pf_coil_case.stp" + }, + { + "material_id": 12, # this is an int to check the str() works + "stp_filename": "pf_coil.stp" + } + ] + with open('manifest.json', 'w') as outfile: + json.dump(manifest_with_material_tags, outfile) + + paramak.neutronics_utils.trelis_command_to_create_dagmc_h5m( + faceting_tolerance=1e-2, + merge_tolerance=1e-4, + material_key_name='material_id', + batch=True, + ) + + list_of_mats = paramak.neutronics_utils.find_material_groups_in_h5m( + filename="dagmc_not_watertight.h5m" + ) + + assert len(list_of_mats) == 2 + assert 'mat:42' in list_of_mats + assert 'mat:12' in list_of_mats + # assert 'mat:graveyard' in list_of_mats + + def test_trelis_command_to_create_dagmc_h5m_with_custom_geometry_key(self): + """Creats a h5m file with trelis and loads stp files using a custom + key in the manifest.json file. Then checks the groups in the resulting + h5 file match those in the original dictionary""" + + os.system('rm *.stp *.h5m *.json') + + pf_coil = paramak.PoloidalFieldCoil( + height=10, + width=10, + center_point=(100, 0), + rotation_angle=180, + ) + + pf_coil_case = paramak.PoloidalFieldCoilCaseFC( + pf_coil=pf_coil, + casing_thickness=5 + ) + + pf_coil.export_stp('pf_coil_custom_key.stp') + pf_coil_case.export_stp('pf_coil_case_custom_key.stp') + + manifest_with_material_tags = [ + { + "material_tag": "copper", + "geometry_filename": "pf_coil_custom_key.stp" + }, + { + "material_tag": "tungsten_carbide", + "geometry_filename": "pf_coil_case_custom_key.stp" + } + ] + with open('manifest.json', 'w') as outfile: + json.dump(manifest_with_material_tags, outfile) + + paramak.neutronics_utils.trelis_command_to_create_dagmc_h5m( + faceting_tolerance=1e-2, + merge_tolerance=1e-4, + geometry_key_name='geometry_filename', + batch=True + ) + + list_of_mats = paramak.neutronics_utils.find_material_groups_in_h5m( + filename="dagmc_not_watertight.h5m" + ) + + assert len(list_of_mats) == 2 + assert 'mat:copper' in list_of_mats + assert 'mat:tungsten_carbide' in list_of_mats From 4dea04abe7fad5fab9f3ac8fa1aba230ab10a406 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 10 Apr 2021 19:39:12 +0100 Subject: [PATCH 06/12] remplaced trelis with coreform --- paramak/neutronics_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paramak/neutronics_utils.py b/paramak/neutronics_utils.py index d2115d16..0108dca7 100644 --- a/paramak/neutronics_utils.py +++ b/paramak/neutronics_utils.py @@ -136,7 +136,8 @@ def trelis_command_to_create_dagmc_h5m( os.system('rm dagmc_not_watertight.h5m') if batch: - trelis_cmd = 'trelis -batch -nographics' + # trelis_cmd = 'trelis -batch -nographics' + trelis_cmd = 'libxcb-xinerama0 -batch -nographics' else: trelis_cmd = 'trelis' From 03f2c0296e67caba1f760e0ebdcad0b0011f8bd3 Mon Sep 17 00:00:00 2001 From: autopep8 Date: Sat, 10 Apr 2021 18:40:04 +0000 Subject: [PATCH 07/12] Automated autopep8 fixes --- tests/test_neutronics_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_neutronics_utils.py b/tests/test_neutronics_utils.py index eb9839bc..4f933def 100644 --- a/tests/test_neutronics_utils.py +++ b/tests/test_neutronics_utils.py @@ -205,7 +205,7 @@ def test_make_watertight_cmd(self): os.system('rm *.stl *.h5m') - https://github.com/Shimwell/fusion_example_for_openmc_using_paramak/raw/main/dagmc.h5m + https: // github.com / Shimwell / fusion_example_for_openmc_using_paramak / raw / main / dagmc.h5m pf_coil = paramak.PoloidalFieldCoil( height=10, @@ -270,7 +270,7 @@ def test_trelis_command_to_create_dagmc_h5m_with_default_mat_name(self): merge_tolerance=1e-4, material_key_name='material_tag', batch=True - ) + ) list_of_mats = paramak.neutronics_utils.find_material_groups_in_h5m( filename="dagmc_not_watertight.h5m" From c07a7f6aae6a304ba9f6721ce1804f59e2946c46 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 10 Apr 2021 19:42:42 +0100 Subject: [PATCH 08/12] added nuclear data download again --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa57d144..ac7a0302 100644 --- a/Dockerfile +++ b/Dockerfile @@ -176,7 +176,7 @@ RUN if [ "$include_neutronics" = "true" ] ; \ make -j"$compile_cores" install ; \ cd .. ; \ pip install -e .[test] ; \ - cat /opt/openmc/tools/ci/download-xs.sh ; \ + /opt/openmc/tools/ci/download-xs.sh ; \ /opt/openmc/tools/ci/download-xs.sh ; \ fi From 653225c3474aa90bc97badb97ea1af1ef9fb3fe1 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 10 Apr 2021 19:43:10 +0100 Subject: [PATCH 09/12] removed duplicate nuclear data --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ac7a0302..95e4ffa3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -177,7 +177,6 @@ RUN if [ "$include_neutronics" = "true" ] ; \ cd .. ; \ pip install -e .[test] ; \ /opt/openmc/tools/ci/download-xs.sh ; \ - /opt/openmc/tools/ci/download-xs.sh ; \ fi RUN if [ "$include_neutronics" = "true" ] ; \ From 9d89b5775d3c6dcdf1c5a94e8487fddfec42b542 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 10 Apr 2021 19:44:18 +0100 Subject: [PATCH 10/12] corrected cubit cmd typo --- paramak/neutronics_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paramak/neutronics_utils.py b/paramak/neutronics_utils.py index 0108dca7..0258fcab 100644 --- a/paramak/neutronics_utils.py +++ b/paramak/neutronics_utils.py @@ -137,7 +137,7 @@ def trelis_command_to_create_dagmc_h5m( if batch: # trelis_cmd = 'trelis -batch -nographics' - trelis_cmd = 'libxcb-xinerama0 -batch -nographics' + trelis_cmd = 'coreform_cubit -batch -nographics' else: trelis_cmd = 'trelis' From 2d4e4ba1180ce8be7eb232231cbeb64a3e75625d Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sat, 10 Apr 2021 19:45:40 +0100 Subject: [PATCH 11/12] commented out url --- tests/test_neutronics_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_neutronics_utils.py b/tests/test_neutronics_utils.py index 4f933def..466d034d 100644 --- a/tests/test_neutronics_utils.py +++ b/tests/test_neutronics_utils.py @@ -205,7 +205,7 @@ def test_make_watertight_cmd(self): os.system('rm *.stl *.h5m') - https: // github.com / Shimwell / fusion_example_for_openmc_using_paramak / raw / main / dagmc.h5m + # https: // github.com / Shimwell / fusion_example_for_openmc_using_paramak / raw / main / dagmc.h5m pf_coil = paramak.PoloidalFieldCoil( height=10, From 9b97d27a1f86abb77103f8ed5cf17d8fec48ea01 Mon Sep 17 00:00:00 2001 From: autopep8 Date: Sat, 10 Apr 2021 18:46:27 +0000 Subject: [PATCH 12/12] Automated autopep8 fixes --- tests/test_neutronics_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_neutronics_utils.py b/tests/test_neutronics_utils.py index 466d034d..0e52a864 100644 --- a/tests/test_neutronics_utils.py +++ b/tests/test_neutronics_utils.py @@ -205,7 +205,8 @@ def test_make_watertight_cmd(self): os.system('rm *.stl *.h5m') - # https: // github.com / Shimwell / fusion_example_for_openmc_using_paramak / raw / main / dagmc.h5m + # https: // github.com / Shimwell / + # fusion_example_for_openmc_using_paramak / raw / main / dagmc.h5m pf_coil = paramak.PoloidalFieldCoil( height=10,