From d4bfd730019ed2590459d52028351bfc8575fe4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Tue, 14 Jan 2020 11:09:44 +0100 Subject: [PATCH] chore: remove unused variables and imports --- psydac/api/ast/utilities.py | 7 ++----- psydac/api/discretization.py | 2 +- psydac/api/grid.py | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/psydac/api/ast/utilities.py b/psydac/api/ast/utilities.py index 442f67a92..32bc149d6 100644 --- a/psydac/api/ast/utilities.py +++ b/psydac/api/ast/utilities.py @@ -674,10 +674,7 @@ def fusion_loops(loops): def compute_boundary_jacobian(parent_namespace, boundary, mapping=None): # Sanity check on arguments - if isinstance(boundary, Boundary): - axis = boundary.axis - ext = boundary.ext - else: + if not isinstance(boundary, Boundary): raise TypeError(boundary) if mapping is None: @@ -686,7 +683,7 @@ def compute_boundary_jacobian(parent_namespace, boundary, mapping=None): else: # Compute metric determinant g on manifold J = SymbolicExpr(mapping.jacobian) - Jm = J[:, [i for i in range(J.shape[1]) if i != axis]] + Jm = J[:, [i for i in range(J.shape[1]) if i != boundary.axis]] g = (Jm.T * Jm).det() # Create statements for computing sqrt(g) diff --git a/psydac/api/discretization.py b/psydac/api/discretization.py index 33b26f2f8..44ee1d18a 100644 --- a/psydac/api/discretization.py +++ b/psydac/api/discretization.py @@ -236,7 +236,7 @@ def solve(self, **kwargs): from sympde.expr import integral from sympde.expr import find - from sympde.topology import element_of, ScalarTestFunction + from sympde.topology import element_of #, ScalarTestFunction # Extract trial functions from model equation u = self.expr.trial_functions diff --git a/psydac/api/grid.py b/psydac/api/grid.py index db41e8d5a..661849bc3 100644 --- a/psydac/api/grid.py +++ b/psydac/api/grid.py @@ -257,7 +257,6 @@ def __init__( self, V, grid, nderiv ): # Modify data for boundary grid if isinstance(grid, BoundaryQuadratureGrid): axis = grid.axis - ext = grid.ext if isinstance(V, ProductFemSpace): for i in range(len(V.spaces)): sp_space = V.spaces[i].spaces[axis]