diff --git a/docker/Dockerfile.firedrake b/docker/Dockerfile.firedrake index cd5252eb989352c820e8abe822d28f6861d3d20a..c8c83a83cbb2444c2a1d4b0cac37de80b6a276a7 100644 --- a/docker/Dockerfile.firedrake +++ b/docker/Dockerfile.firedrake @@ -30,3 +30,5 @@ RUN bash -c "source ~/firedrake/bin/activate; cd volumential/contrib/meshgen11_d RUN bash -c "source ~/firedrake/bin/activate; cd volumential; pip install -r requirements.txt" COPY docker/to_loopyy.sh . RUN bash -c "source ~/firedrake/bin/activate; sh to_loopyy.sh" + +WORKDIR /home/firedrake/ diff --git a/test/test_interpolation.py b/test/test_interpolation.py index 9135c2109d0c48c392f2fb7a503912094bf2cae1..8d2ae6ca533ba28a6a97f2334afafb28d5cb38fa 100644 --- a/test/test_interpolation.py +++ b/test/test_interpolation.py @@ -51,9 +51,11 @@ def random_polynomial_func(dim, degree, seed=None): npts = pts.shape[1] res = np.zeros(npts) for deg in np.ndindex(coefs.shape): + if sum(deg) > degree: + continue mono = np.ones(npts) for iaxis in range(dim): - mono += pts[iaxis, :]**deg[iaxis] + mono *= pts[iaxis, :]**deg[iaxis] res += coefs[deg] * mono return res