mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Merge branch 'cylindermesh_to_vtk' of https://github.com/RemDelaporteMathurin/openmc into cylindermesh_to_vtk
This commit is contained in:
commit
ee2e2d27a8
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ spherical_mesh.theta_grid = np.linspace(0, np.pi / 2, num=30)
|
|||
@pytest.mark.parametrize("mesh", [cylinder_mesh, regular_mesh, rectilinear_mesh, spherical_mesh])
|
||||
def test_write_data_to_vtk(mesh, tmpdir):
|
||||
# BUILD
|
||||
filename = tmpdir / "out.vtk"
|
||||
filename = Path(tmpdir) / "out.vtk"
|
||||
|
||||
data = np.random.random(mesh.num_mesh_cells)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ def test_write_data_to_vtk(mesh, tmpdir):
|
|||
mesh.write_data_to_vtk(filename=filename, datasets={"label1": data, "label2": data})
|
||||
|
||||
# TEST
|
||||
assert exists(filename)
|
||||
assert filename.is_file()
|
||||
|
||||
# read file
|
||||
reader = vtk.vtkStructuredGridReader()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue