Skip to content
Snippets Groups Projects
Commit 68d8c237 authored by Thomas Gibson's avatar Thomas Gibson
Browse files

Fix Maxwell operator cavity mode for 2D case

parent 5b6f88c2
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment