def test_vector_field_shape(): mesh = CuboidMesh(1, 1, 1, 2, 3, 4) expected_nb_cells = 2 * 3 * 4 expected_shape_for_vector_field = (expected_nb_cells, 3) assert mesh.vector_shape() == expected_shape_for_vector_field m = np.zeros(mesh.vector_shape()) # usage example