From 68d8c237f23229e13a0a637b04031c793cc8eaa4 Mon Sep 17 00:00:00 2001 From: Thomas Gibson <gibsonthomas1120@hotmail.com> Date: Wed, 2 Jun 2021 14:25:25 -0500 Subject: [PATCH] Fix Maxwell operator cavity mode for 2D case --- grudge/models/em.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grudge/models/em.py b/grudge/models/em.py index c77d82db..f56ca991 100644 --- a/grudge/models/em.py +++ b/grudge/models/em.py @@ -344,7 +344,7 @@ class MaxwellOperator(HyperbolicOperator): return op.nodal_max(self.dcoll, "vol", 1 / actx.np.sqrt(self.epsilon * self.mu)) - def max_eigenvalue(self, t, fields=None, dcoll=None, context=None): + def max_eigenvalue(self, t, fields=None, discr=None, context=None): if context is None: context = {} if self.fixed_material: @@ -469,11 +469,11 @@ def get_rectangular_cavity_mode(actx, nodes, t, E_0, mode_indices): # noqa: N80 result = flat_obj_array( zeros, zeros, - actx.np.sin(kx * x) * actx.np.sin(ky * y) * actx.np.cos(tfac), # ez + actx.np.sin(kx * x) * actx.np.sin(ky * y) * numpy.cos(tfac), # ez (-ky * actx.np.sin(kx * x) * actx.np.cos(ky * y) - * actx.np.sin(tfac) / omega), # hx + * numpy.sin(tfac) / omega), # hx (kx * actx.np.cos(kx * x) * actx.np.sin(ky * y) - * actx.np.sin(tfac) / omega), # hy + * numpy.sin(tfac) / omega), # hy zeros, ) else: -- GitLab