diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cf6fff80d..1fd428d0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,28 +49,32 @@ Python 3 POCL Examples: except: - tags -Python 3 POCL Firedrake: - tags: - - "docker-runner" - image: "firedrakeproject/firedrake" - script: - - . .ci/install-for-firedrake.sh - - cd test - - python -m pytest --tb=native --junitxml=pytest.xml -rxsw test_firedrake_interop.py - artifacts: - reports: - junit: test/pytest.xml - -Python 3 POCL Firedrake Examples: - tags: - - "docker-runner" - image: "firedrakeproject/firedrake" - script: - - . .ci/install-for-firedrake.sh - - . ./.ci/run_firedrake_examples.sh - artifacts: - reports: - junit: test/pytest.xml +# The machine shop is too old for the Firedrake container. +# Lawrence Mitchell says that they likely build PETSc with -march=native +# on something like Skylake. +# +# Python 3 POCL Firedrake: +# tags: +# - "docker-runner" +# image: "firedrakeproject/firedrake" +# script: +# - . .ci/install-for-firedrake.sh +# - cd test +# - python -m pytest --tb=native --junitxml=pytest.xml -rxsw test_firedrake_interop.py +# artifacts: +# reports: +# junit: test/pytest.xml +# +# Python 3 POCL Firedrake Examples: +# tags: +# - "docker-runner" +# image: "firedrakeproject/firedrake" +# script: +# - . .ci/install-for-firedrake.sh +# - . ./.ci/run_firedrake_examples.sh +# artifacts: +# reports: +# junit: test/pytest.xml Python 3 Conda: script: | diff --git a/meshmode/mesh/__init__.py b/meshmode/mesh/__init__.py index 2cbaa608c..01e45c57d 100644 --- a/meshmode/mesh/__init__.py +++ b/meshmode/mesh/__init__.py @@ -330,7 +330,7 @@ def copy(self, **kwargs: Any) -> "MeshElementGroup": def __eq__(self, other): return ( - type(self) == type(other) + type(self) is type(other) and self.order == other.order and np.array_equal(self.vertex_indices, other.vertex_indices) and np.array_equal(self.nodes, other.nodes) @@ -556,7 +556,7 @@ def copy(self, **kwargs: Any) -> "NodalAdjacency": def __eq__(self, other): return ( - type(self) == type(other) + type(self) is type(other) and np.array_equal(self.neighbors_starts, other.neighbors_starts) and np.array_equal(self.neighbors, other.neighbors)) @@ -612,7 +612,7 @@ def copy(self, **kwargs: Any) -> "FacialAdjacencyGroup": def __eq__(self, other): return ( - type(self) == type(other) + type(self) is type(other) and self.igroup == other.igroup) def __ne__(self, other): @@ -629,7 +629,7 @@ def as_python(self) -> str: :returns: a string that can be evaluated to reconstruct the class. """ - if type(self) != FacialAdjacencyGroup: + if type(self) is not FacialAdjacencyGroup: raise NotImplementedError( f"Not implemented for '{type(self).__name__}'.") @@ -703,7 +703,7 @@ def __eq__(self, other): and self.aff_map == other.aff_map) def as_python(self): - if type(self) != InteriorAdjacencyGroup: + if type(self) is not InteriorAdjacencyGroup: raise NotImplementedError(f"Not implemented for {type(self)}.") return self._as_python( @@ -755,7 +755,7 @@ def __eq__(self, other): and np.array_equal(self.element_faces, other.element_faces)) def as_python(self): - if type(self) != BoundaryAdjacencyGroup: + if type(self) is not BoundaryAdjacencyGroup: raise NotImplementedError(f"Not implemented for {type(self)}.") return self._as_python( @@ -837,7 +837,7 @@ def __eq__(self, other): and self.aff_map == other.aff_map) def as_python(self): - if type(self) != InterPartAdjacencyGroup: + if type(self) is not InterPartAdjacencyGroup: raise NotImplementedError(f"Not implemented for {type(self)}.") return self._as_python( @@ -1177,7 +1177,7 @@ def facial_adjacency_groups(self) -> Sequence[Sequence[FacialAdjacencyGroup]]: def __eq__(self, other): return ( - type(self) == type(other) + type(self) is type(other) and np.array_equal(self.vertices, other.vertices) and self.groups == other.groups and self.vertex_id_dtype == other.vertex_id_dtype diff --git a/meshmode/mesh/processing.py b/meshmode/mesh/processing.py index b96aef0f7..a7e5c0792 100644 --- a/meshmode/mesh/processing.py +++ b/meshmode/mesh/processing.py @@ -848,7 +848,7 @@ def merge_disjoint_meshes( ref_group = single_valued( [group for mesh in meshes for group in mesh.groups], lambda x, y: ( - type(x) == type(y) + type(x) is type(y) and x.order == y.order and np.array_equal(x.unit_nodes, y.unit_nodes) )) diff --git a/test/test_partition.py b/test/test_partition.py index c80ac5b12..b8a4e1830 100644 --- a/test/test_partition.py +++ b/test/test_partition.py @@ -333,12 +333,12 @@ def test_partition_mesh(mesh_size, num_parts, num_groups, dim, scramble_parts): for idx in range(len(adj.elements)): if (p_elem == adj.elements[idx] and face == adj.element_faces[idx]): - assert p_n_elem == adj.neighbors[idx],\ + assert p_n_elem == adj.neighbors[idx], \ "Tag does not give correct neighbor" - assert n_face == adj.neighbor_faces[idx],\ + assert n_face == adj.neighbor_faces[idx], \ "Tag does not give correct neighbor" - assert ipagrp_count > 0 or not has_cross_rank_adj,\ + assert ipagrp_count > 0 or not has_cross_rank_adj, \ "expected at least one InterPartAdjacencyGroup" for i_remote_part in range(num_parts): @@ -347,7 +347,7 @@ def test_partition_mesh(mesh_size, num_parts, num_groups, dim, scramble_parts): if (i_local_part, i_remote_part) in connected_parts: tag_sum += count_tags( part_meshes[i_local_part], BTAG_PARTITION(i_remote_part)) - assert num_tags[i_remote_part] == tag_sum,\ + assert num_tags[i_remote_part] == tag_sum, \ "part_mesh has the wrong number of BTAG_PARTITION boundaries"