Skip to content

Commit

Permalink
Merge branch 'adding_3d_mesh_export_option' of github.com:fusion-ener…
Browse files Browse the repository at this point in the history
…gy/cad_to_dagmc into adding_3d_mesh_export_option
  • Loading branch information
shimwell committed Mar 9, 2024
2 parents ab26a6b + 6418910 commit b94261f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,5 @@
centroids = umesh_from_sp.centroids
mesh_vols = umesh_from_sp.volumes

flux_mean = tally_result.get_values(scores=["flux"], value="mean").reshape(
umesh_from_sp.dimension
)
flux_mean = tally_result.get_values(scores=["flux"], value="mean").reshape(umesh_from_sp.dimension)
umesh_from_sp.write_data_to_vtk(filename="tally.vtk", datasets={"mean": flux_mean})
9 changes: 4 additions & 5 deletions tests/test_python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ def test_max_mesh_size_impacts_file_size():
max_mesh_size=20,
mesh_algorithm=1,
filename="test_10_30.h5m",
material_tags=["m1"]
material_tags=["m1"],
)
c2d.export_dagmc_h5m_file(
min_mesh_size=20,
max_mesh_size=30,
mesh_algorithm=1,
filename="test_20_30.h5m",
material_tags=["m1"]
material_tags=["m1"],
)
c2d.export_dagmc_h5m_file(
min_mesh_size=20,
max_mesh_size=25,
mesh_algorithm=1,
filename="test_20_25.h5m",
material_tags=["m1"]
material_tags=["m1"],
)

assert Path("test_10_30.h5m").is_file()
Expand Down Expand Up @@ -99,8 +99,7 @@ def test_h5m_file_tags():
os.system(f"rm {test_h5m_filename}")

returned_filename = c2d.export_dagmc_h5m_file(
filename=test_h5m_filename,
material_tags=['mat1', 'mat2', 'mat3']
filename=test_h5m_filename, material_tags=["mat1", "mat2", "mat3"]
)

assert Path(test_h5m_filename).is_file()
Expand Down

0 comments on commit b94261f

Please sign in to comment.