def test_invalid_no_material(self, tmp_path): v = VTK.from_image_data( np.random.randint(5, 10, 3) * 2, np.random.random(3) + 1.0) v.save(tmp_path / 'no_materialpoint.vti', parallel=False) with pytest.raises(ValueError): Grid.load(tmp_path / 'no_materialpoint.vti')
def default(): """Simple VTK.""" cells = np.array([5, 6, 7], int) size = np.array([.6, 1., .5]) return VTK.from_image_data(cells, size)