From 061dbf59d163f7089ad76c30adccba3dc81f1e35 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 27 Oct 2019 16:12:48 -0700 Subject: [PATCH] formatting fixes --- meanas/fdfd/functional.py | 1 - meanas/fdfd/waveguide.py | 8 ++++---- meanas/fdtd/boundaries.py | 7 ++----- meanas/fdtd/pml.py | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/meanas/fdfd/functional.py b/meanas/fdfd/functional.py index 326f38b..bd31192 100644 --- a/meanas/fdfd/functional.py +++ b/meanas/fdfd/functional.py @@ -219,4 +219,3 @@ def poynting_e_cross_h(dxes: dx_lists_t): s[2] = numpy.roll(ex, -1, axis=2) * hy - numpy.roll(ey, -1, axis=2) * hx return s return exh - diff --git a/meanas/fdfd/waveguide.py b/meanas/fdfd/waveguide.py index 14e3502..c24a471 100644 --- a/meanas/fdfd/waveguide.py +++ b/meanas/fdfd/waveguide.py @@ -32,10 +32,10 @@ __author__ = 'Jan Petykiewicz' def operator_e(omega: complex, - dxes: dx_lists_t, - epsilon: vfield_t, - mu: vfield_t = None, - ) -> sparse.spmatrix: + dxes: dx_lists_t, + epsilon: vfield_t, + mu: vfield_t = None, + ) -> sparse.spmatrix: if numpy.any(numpy.equal(mu, None)): mu = numpy.ones_like(epsilon) diff --git a/meanas/fdtd/boundaries.py b/meanas/fdtd/boundaries.py index 34a8d4a..cba1797 100644 --- a/meanas/fdtd/boundaries.py +++ b/meanas/fdtd/boundaries.py @@ -37,7 +37,7 @@ def conducting_boundary(direction: int, return en, hn - elif polarity > 0: + if polarity > 0: boundary_slice = [slice(None)] * 3 shifted1_slice = [slice(None)] * 3 shifted2_slice = [slice(None)] * 3 @@ -62,7 +62,4 @@ def conducting_boundary(direction: int, return ep, hp - else: - raise Exception('Bad polarity: {}'.format(polarity)) - - + raise Exception('Bad polarity: {}'.format(polarity)) diff --git a/meanas/fdtd/pml.py b/meanas/fdtd/pml.py index 3e10aa6..7d73e38 100644 --- a/meanas/fdtd/pml.py +++ b/meanas/fdtd/pml.py @@ -13,7 +13,7 @@ from .. import dx_lists_t, field_t, field_updater __author__ = 'Jan Petykiewicz' -def cpml(direction:int, +def cpml(direction: int, polarity: int, dt: float, epsilon: field_t,