diff --git a/examples/curved_cadquery_object.py b/examples/curved_cadquery_object.py index 9e6396d..107b2e7 100644 --- a/examples/curved_cadquery_object.py +++ b/examples/curved_cadquery_object.py @@ -2,6 +2,7 @@ import cadquery as cq from math import sin, cos, pi, floor + # define the generating function def hypocycloid(t, r1, r2): return ( diff --git a/src/cad_to_dagmc/core.py b/src/cad_to_dagmc/core.py index 5e368d7..5c56751 100644 --- a/src/cad_to_dagmc/core.py +++ b/src/cad_to_dagmc/core.py @@ -95,8 +95,6 @@ def export_dagmc_h5m_file( center_atol: float = 0.000001, bounding_box_atol: float = 0.000001, ): - - brep_shape = self._merge_surfaces() tmp_brep_filename = mkstemp(suffix=".brep", prefix="paramak_")[1] @@ -118,7 +116,7 @@ def export_dagmc_h5m_file( ) material_tags_in_brep_order = [] - for (brep_id, shape_id) in brep_and_shape_part_ids: + for brep_id, shape_id in brep_and_shape_part_ids: material_tags_in_brep_order.append(self.material_tags[shape_id - 1]) brep_to_h5m( diff --git a/tests/test_h5m_creation.py b/tests/test_h5m_creation.py index d0e65f3..371b1b9 100644 --- a/tests/test_h5m_creation.py +++ b/tests/test_h5m_creation.py @@ -26,7 +26,6 @@ def test_h5m_with_single_volume_list(): ] for stp_file, h5m_file in zip(stp_files, h5m_files): - my_model = CadToDagmc() my_model.add_stp_file(filename=stp_file, material_tags=["mat1"]) my_model.export_dagmc_h5m_file(filename=h5m_file) @@ -35,7 +34,6 @@ def test_h5m_with_single_volume_list(): def test_h5m_with_multi_volume_not_touching(): - stp_files = [ "tests/two_disconnected_cubes.stp", ] @@ -46,7 +44,6 @@ def test_h5m_with_multi_volume_not_touching(): "tests/two_disconnected_cubes.h5m", ] for stp_file, mat_tags, h5m_file in zip(stp_files, material_tags, h5m_files): - my_model = CadToDagmc() my_model.add_stp_file(filename=stp_file, material_tags=mat_tags) @@ -61,7 +58,6 @@ def test_h5m_with_multi_volume_not_touching(): def test_h5m_with_multi_volume_touching(): - stp_files = [ "tests/multi_volume_cylinders.stp", "tests/two_connected_cubes.stp", @@ -75,7 +71,6 @@ def test_h5m_with_multi_volume_touching(): "tests/two_connected_cubes.h5m", ] for stp_file, mat_tags, h5m_file in zip(stp_files, material_tags, h5m_files): - my_model = CadToDagmc() my_model.add_stp_file(stp_file, material_tags=mat_tags) diff --git a/tests/test_h5m_in_simulation.py b/tests/test_h5m_in_simulation.py index 86effed..0c676df 100644 --- a/tests/test_h5m_in_simulation.py +++ b/tests/test_h5m_in_simulation.py @@ -16,7 +16,6 @@ def transport_particles_on_h5m_geometry( materials = openmc.Materials() for material_tag in material_tags: - # simplified material definitions have been used to keen this example minimal mat_dag_material_tag = openmc.Material(name=material_tag) mat_dag_material_tag.add_element("H", 1, "ao") @@ -101,7 +100,6 @@ def test_h5m_with_single_volume_list(): ] for h5m_file in h5m_files: - transport_particles_on_h5m_geometry( h5m_filename=h5m_file, material_tags=["mat1"], @@ -109,7 +107,6 @@ def test_h5m_with_single_volume_list(): def test_h5m_with_multi_volume_not_touching(): - material_tags = [ ["mat1", "mat2"], ] @@ -117,14 +114,12 @@ def test_h5m_with_multi_volume_not_touching(): "tests/two_disconnected_cubes.h5m", ] for mat_tags, h5m_file in zip(material_tags, h5m_files): - transport_particles_on_h5m_geometry( h5m_filename=h5m_file, material_tags=mat_tags ) def test_h5m_with_multi_volume_touching(): - material_tags = [ ["mat1", "mat2", "mat3", "mat4", "mat5", "mat6"], ["mat1", "mat2"], @@ -134,7 +129,6 @@ def test_h5m_with_multi_volume_touching(): "tests/two_connected_cubes.h5m", ] for mat_tags, h5m_file in zip(material_tags, h5m_files): - transport_particles_on_h5m_geometry( h5m_filename=h5m_file, material_tags=mat_tags )