Skip to content

Commit

Permalink
[skip ci] Apply formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell authored and github-actions[bot] committed Feb 4, 2023
1 parent 99adddb commit ce82771
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
1 change: 1 addition & 0 deletions examples/curved_cadquery_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 1 addition & 3 deletions src/cad_to_dagmc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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(
Expand Down
5 changes: 0 additions & 5 deletions tests/test_h5m_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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",
]
Expand All @@ -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)

Expand All @@ -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",
Expand All @@ -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)

Expand Down
6 changes: 0 additions & 6 deletions tests/test_h5m_in_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -101,30 +100,26 @@ 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"],
)


def test_h5m_with_multi_volume_not_touching():

material_tags = [
["mat1", "mat2"],
]
h5m_files = [
"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"],
Expand All @@ -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
)

0 comments on commit ce82771

Please sign in to comment.