mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
adapted tests
This commit is contained in:
parent
f081b28b1d
commit
0b0265cb59
1 changed files with 2 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ def test_write_data_to_vtk(mesh, tmpdir):
|
|||
# BUILD
|
||||
filename = Path(tmpdir) / "out.vtk"
|
||||
|
||||
data = np.random.random(mesh.dimension[0]*mesh.dimension[1]*mesh.dimension[2])
|
||||
data = np.random.random(mesh.num_mesh_cells)
|
||||
|
||||
# RUN
|
||||
mesh.write_data_to_vtk(filename=filename, datasets={"label1": data, "label2": data})
|
||||
|
|
@ -68,7 +68,7 @@ def test_write_data_to_vtk_size_mismatch(mesh):
|
|||
mesh : openmc.StructuredMesh
|
||||
The mesh to test
|
||||
"""
|
||||
right_size = mesh.dimension[0]*mesh.dimension[1]*mesh.dimension[2]
|
||||
right_size = mesh.num_mesh_cells
|
||||
data = np.random.random(right_size + 1)
|
||||
|
||||
expected_error_msg = "The size of the dataset label should be equal to the number of cells"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue