[fdfd.functional] fix handling of mu in e_full and m2j sign
This commit is contained in:
parent
38a5c1a9aa
commit
593098bf8f
2 changed files with 136 additions and 6 deletions
|
|
@ -41,8 +41,8 @@ def e_full(
|
|||
curls = ch(ce(e))
|
||||
return cfdfield_t(curls - omega ** 2 * epsilon * e)
|
||||
|
||||
def op_mu(e: cfdfield) -> cfdfield_t:
|
||||
curls = ch(mu * ce(e)) # type: ignore # mu = None ok because we don't return the function
|
||||
def op_mu(e: cfdfield_t) -> cfdfield_t:
|
||||
curls = ch(ce(e) / mu) # type: ignore # mu = None ok because we don't return the function
|
||||
return cfdfield_t(curls - omega ** 2 * epsilon * e)
|
||||
|
||||
if mu is None:
|
||||
|
|
@ -138,12 +138,12 @@ def m2j(
|
|||
"""
|
||||
ch = curl_back(dxes[1])
|
||||
|
||||
def m2j_mu(m: cfdfield) -> cfdfield_t:
|
||||
J = ch(m / mu) / (-1j * omega) # type: ignore # mu=None ok
|
||||
def m2j_mu(m: cfdfield_t) -> cfdfield_t:
|
||||
J = ch(m / mu) / (1j * omega) # type: ignore # mu=None ok
|
||||
return cfdfield_t(J)
|
||||
|
||||
def m2j_1(m: cfdfield) -> cfdfield_t:
|
||||
J = ch(m) / (-1j * omega)
|
||||
def m2j_1(m: cfdfield_t) -> cfdfield_t:
|
||||
J = ch(m) / (1j * omega)
|
||||
return cfdfield_t(J)
|
||||
|
||||
if mu is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue