-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper update_fields
interpolation scheme
#1794
Comments
update_fields
interpolation scheme
I think I see what's happening... Even though we are indexing meep/src/anisotropic_averaging.cpp Lines 238 to 253 in 3eabcef
So hopefully |
Awesome, thanks! For (my own) reference, this is the method we need to use to properly recombine the forward and adjoint fields. |
The subpixel smoothing paper describes the update equation using the following figure:
which is interpolation method 26(c) in the original Werner and Cary paper.
This method performs an interpolation, then the
chi1inv
multiplication, followed by another interpolation step. What's important is that this particularchi1inv
component does not seem to be located on a typical grid point that it's originally stored (i.e. in the figure, the fields are interpolated to a "node" that doesn't store ε⁻¹ₓy).The code, however, seems to just grab two ε points, one from a "leading corner" for each side that is being interpolated:
meep/src/step_generic.cpp
Lines 381 to 382 in b6166b1
Note that
u[i]
aligns withg[i]
andu[i + s]
aligns withu[i + s]
, leavingg[i-sx]
andg[i-isx+s]
"unbalanced". (Note that multiplying each point by it's correspondingchi1inv
component is a different interpolation scheme altogether and not always stable).These two operations don't seem to be the same to me, but maybe I'm missing something with how
chi1inv
is stored (I thought an entire row of the tensor was stored at each corresponding yee point).The text was updated successfully, but these errors were encountered: