Merge branch 'cylindermesh_to_vtk' of https://github.com/RemDelaporteMathurin/openmc into cylindermesh_to_vtk

This commit is contained in:
RemDelaporteMathurin 2022-06-29 14:21:19 +02:00
commit 8027b1622f
2 changed files with 2 additions and 2 deletions

View file

@ -690,7 +690,7 @@ class RegularMesh(StructuredMesh):
# write the .vtk file
writer = vtk.vtkStructuredGridWriter()
writer.SetFileName(filename)
writer.SetFileName(str(filename))
writer.SetInputData(vtk_grid)
writer.Write()

View file

@ -33,7 +33,7 @@ def test_write_data_to_vtk(mesh, tmpdir):
# BUILD
filename = 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})