예제 #1
0
def test_scalar_field_shape():
    mesh = CuboidMesh(1, 1, 1, 2, 3, 4)
    expected_nb_cells = 2 * 3 * 4
    expected_shape_for_scalar_field = (expected_nb_cells, 1)
    assert mesh.scalar_shape() == expected_shape_for_scalar_field
    f = np.zeros(mesh.scalar_shape())  # usage example