48def convert(tmp_path, monkeypatch, description, split_unknowns):
49 """Convert one patch with 2x2 cells and three unknowns into a vtu file"""
50 monkeypatch.chdir(tmp_path)
51 (tmp_path /
"data.peano-patch-file").write_text(
53 2,
"cell",
"Q", 2, 3, [(1, (0.0, 0.0), (1.0, 1.0))], description=description
57 "data.peano-patch-file", output_directory=
".", split_unknowns=split_unknowns
59 file_name = visualiser.display_single_file()[
"Q"]
60 reader = vtk.vtkXMLUnstructuredGridReader()
61 reader.SetFileName(file_name)
63 return reader.GetOutput().GetCellData()