forked from jan/fdfd_tools
Return real part of the gradient
This commit is contained in:
parent
39979edc44
commit
f312d73503
1 changed files with 1 additions and 1 deletions
|
|
@ -400,7 +400,7 @@ def eigsolve(num_modes: int,
|
||||||
df_dy = scipy_iop @ (AzU - zU @ zTAzU)
|
df_dy = scipy_iop @ (AzU - zU @ zTAzU)
|
||||||
else:
|
else:
|
||||||
df_dy = (AzU - zU @ zTAzU)
|
df_dy = (AzU - zU @ zTAzU)
|
||||||
return numpy.abs(f), numpy.sign(f) * df_dy.ravel()
|
return numpy.abs(f), numpy.sign(f) * numpy.real(df_dy).ravel()
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Use the conjugate gradient method and the approximate gradient calculation to
|
Use the conjugate gradient method and the approximate gradient calculation to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue