From d894d528e61cdad5bfc72bd6c3e7b95b84e72675 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 31 Jan 2019 17:20:05 -0600 Subject: [PATCH 1/2] Better error messsages when asking about orientation of non-volume meshes --- meshmode/mesh/io.py | 3 +++ meshmode/mesh/processing.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/meshmode/mesh/io.py b/meshmode/mesh/io.py index e4adf7ce..49e816f8 100644 --- a/meshmode/mesh/io.py +++ b/meshmode/mesh/io.py @@ -375,6 +375,9 @@ def from_vertices_and_simplices(vertices, simplices, order=1, fix_orientation=Fa grp = make_group_from_vertices(vertices, simplices, order) if fix_orientation: + if grp.dim != vertices.shape[0]: + raise ValueError("can only fix orientation of volume meshes") + from meshmode.mesh.processing import ( find_volume_mesh_element_group_orientation, flip_simplex_element_group) diff --git a/meshmode/mesh/processing.py b/meshmode/mesh/processing.py index 2094c99b..9cb71a1a 100644 --- a/meshmode/mesh/processing.py +++ b/meshmode/mesh/processing.py @@ -289,6 +289,9 @@ def find_volume_mesh_element_group_orientation(vertices, grp): ambient_dim = spanning_vectors.shape[0] nspan_vectors = spanning_vectors.shape[-1] + if ambient_dim != grp.dim: + raise ValueError("can only find orientation of volume meshes") + spanning_object_array = np.empty( (nspan_vectors, ambient_dim), dtype=np.object) -- GitLab From 8aff4a6d03b1af6f373e60db6946f2780e555440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Fri, 1 Feb 2019 00:25:54 +0100 Subject: [PATCH 2/2] Remove specific py3 versions from CI config --- .gitlab-ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b68dc3fe..3f331f0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,15 +15,15 @@ Python 2.7 POCL: reports: junit: test/pytest.xml -Python 3.6 Nvidia K40: +Python 3 Nvidia K40: script: - - export PY_EXE=python3.6 + - export PY_EXE=python3 - export PYOPENCL_TEST=nvi:k40 - export EXTRA_INSTALL="pybind11 numpy mako" - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - - python3.6 + - python3 - nvidia-k40 except: - tags @@ -31,15 +31,15 @@ Python 3.6 Nvidia K40: reports: junit: test/pytest.xml -Python 3.6 POCL: +Python 3 POCL: script: - - export PY_EXE=python3.6 + - export PY_EXE=python3 - export PYOPENCL_TEST=portable - export EXTRA_INSTALL="pybind11 numpy mako mpi4py" - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - - python3.6 + - python3 - pocl - mpi except: @@ -48,15 +48,15 @@ Python 3.6 POCL: reports: junit: test/pytest.xml -Python 3.7 POCL: +Python 3 POCL: script: - - export PY_EXE=python3.7 + - export PY_EXE=python3 - export PYOPENCL_TEST=portable - export EXTRA_INSTALL="pybind11 numpy mako mpi4py" - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - - python3.7 + - python3 - pocl - mpi except: @@ -71,7 +71,7 @@ Documentation: - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-docs.sh - ". ./build-docs.sh" tags: - - python3.5 + - python3 only: - master @@ -80,6 +80,6 @@ Flake8: - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh - ". ./prepare-and-run-flake8.sh meshmode test" tags: - - python3.5 + - python3 except: - tags -- GitLab