From a3a23a9eecca8b701bd7b0bb63f47e5df5e6f278 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl <alexfikl@gmail.com> Date: Thu, 4 Jun 2020 19:52:29 -0500 Subject: [PATCH] flake8 fixes --- grudge/symbolic/primitives.py | 2 +- test/mesh_data.py | 10 +++++----- test/test_grudge.py | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/grudge/symbolic/primitives.py b/grudge/symbolic/primitives.py index fd963eba..ec75087e 100644 --- a/grudge/symbolic/primitives.py +++ b/grudge/symbolic/primitives.py @@ -673,7 +673,7 @@ def inverse_surface_metric_derivative(rst_axis, xyz_axis, else: inv_form1 = inverse_first_fundamental_form(ambient_dim, dim=dim, dd=dd) imd = sum( - inv_form1[rst_axis, d] * forward_metric_derivative(xyz_axis, d, dd=dd) + inv_form1[rst_axis, d]*forward_metric_derivative(xyz_axis, d, dd=dd) for d in range(dim)) return cse(imd, diff --git a/test/mesh_data.py b/test/mesh_data.py index d1d04dac..f508b520 100644 --- a/test/mesh_data.py +++ b/test/mesh_data.py @@ -91,11 +91,11 @@ class SpheroidMeshBuilder(MeshBuilder): def get_mesh(self, resolution, mesh_order): from meshmode.mesh.io import ScriptSource source = ScriptSource(""" - SetFactory("OpenCASCADE"); - Sphere(1) = {{0, 0, 0, {r}}}; - Dilate {{ {{0, 0, 0}}, {{ {r}, {r}, {rr} }} }} {{ Volume{{1}}; }} - """.format(r=self.diameter, rr=self.aspect_ratio * self.diameter), - "geo" + SetFactory("OpenCASCADE"); + Sphere(1) = {{0, 0, 0, {r}}}; + Dilate {{ {{0, 0, 0}}, {{ {r}, {r}, {rr} }} }} {{ Volume{{1}}; }} + """.format(r=self.diameter, rr=self.aspect_ratio * self.diameter), + "geo" ) from meshmode.mesh.io import generate_gmsh diff --git a/test/test_grudge.py b/test/test_grudge.py index e0d08dfc..366494ec 100644 --- a/test/test_grudge.py +++ b/test/test_grudge.py @@ -275,11 +275,9 @@ def test_surface_mass_operator_inverse(ctx_factory, name): if name == "2-1-ellipse": from mesh_data import EllipseMeshBuilder builder = EllipseMeshBuilder(radius=3.1, aspect_ratio=2.0) - surface_area = _ellipse_surface_area(builder.radius, builder.aspect_ratio) elif name == "spheroid": from mesh_data import SpheroidMeshBuilder builder = SpheroidMeshBuilder() - surface_area = _spheroid_surface_area(builder.radius, builder.aspect_ratio) else: raise ValueError("unknown geometry name: %s" % name) @@ -601,7 +599,7 @@ def test_surface_divergence_theorem(ctx_factory, mesh_name, visualize=False): for i, resolution in enumerate(builder.resolutions): from meshmode.mesh.processing import affine_map mesh = builder.get_mesh(resolution, builder.mesh_order) - # mesh = affine_map(mesh, A=mesh_rotation, b=mesh_offset) + mesh = affine_map(mesh, A=mesh_rotation, b=mesh_offset) from meshmode.discretization.poly_element import \ QuadratureSimplexGroupFactory -- GitLab