From d387fecfd04427b97a4549252dde531ae642b8ab Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 26 Aug 2020 12:40:30 -0500
Subject: [PATCH] Follow-up fixes for 687a28b in Maxwell

---
 grudge/models/em.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/grudge/models/em.py b/grudge/models/em.py
index 93735bf8..48e0de54 100644
--- a/grudge/models/em.py
+++ b/grudge/models/em.py
@@ -134,13 +134,13 @@ class MaxwellOperator(HyperbolicOperator):
             return flat_obj_array(
                     # flux e,
                     1/2*(
-                        -self.space_cross_h(normal, h.int-h.ext)
+                        -self.space_cross_h(normal, h.ext-h.int)
                         # multiplication by epsilon undoes material divisor below
                         #-max_c*(epsilon*e.int - epsilon*e.ext)
                     ),
                     # flux h
                     1/2*(
-                        self.space_cross_e(normal, e.int-e.ext)
+                        self.space_cross_e(normal, e.ext-e.int)
                         # multiplication by mu undoes material divisor below
                         #-max_c*(mu*h.int - mu*h.ext)
                     ))
@@ -150,14 +150,14 @@ class MaxwellOperator(HyperbolicOperator):
                     # flux e,
                     (
                         -1/(Z_int+Z_ext)*self.space_cross_h(normal,
-                            Z_ext*(h.int-h.ext)
-                            - self.flux_type*self.space_cross_e(normal, e.int-e.ext))
+                            Z_ext*(h.ext-h.int)
+                            - self.flux_type*self.space_cross_e(normal, e.ext-e.int))
                         ),
                     # flux h
                     (
                         1/(Y_int + Y_ext)*self.space_cross_e(normal,
-                            Y_ext*(e.int-e.ext)
-                            + self.flux_type*self.space_cross_h(normal, h.int-h.ext))
+                            Y_ext*(e.ext-e.int)
+                            + self.flux_type*self.space_cross_h(normal, h.ext-h.int))
                         ),
                     )
         else:
-- 
GitLab