From 0e0a7409ad102b1c2ef36420e26089c4a0ba191b Mon Sep 17 00:00:00 2001 From: xywei Date: Fri, 13 Nov 2020 11:20:23 -0600 Subject: [PATCH 1/2] Set proper workdir for container users --- docker/Dockerfile.firedrake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/Dockerfile.firedrake b/docker/Dockerfile.firedrake index cd5252e..c8c83a8 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/ -- GitLab From af97fd58a01d93ab292aea3304e404d1dee650a8 Mon Sep 17 00:00:00 2001 From: xywei Date: Fri, 13 Nov 2020 11:37:53 -0600 Subject: [PATCH 2/2] Fix random poly generation in the interpolation tests --- test/test_interpolation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_interpolation.py b/test/test_interpolation.py index 9135c21..8d2ae6c 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 -- GitLab