-
Notifications
You must be signed in to change notification settings - Fork 116
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
Updating fields #11
Comments
No, when adding an object to the grid, the inverse_permittivity at the location of the object is set to zero: Line 86 in 73afcb8
This means that effectively, only the second update equation is used at the location of the object. |
Hi flaport, |
That's a fair point and in fact nothing is stopping you to do exactly that... Just do an in-place index replacement within inverse_epsilon... The reason that I chose the Object route is that back in the day I was working on simulating photo-refractive crystals in which I was also modeling the electro-optic effect. Moreover those objects required non-diagonal epsilon elements which is a much more expensive update. Going the object-route allowed me to just have those expensive update equations in a localized component and still use the quick update equations everywhere else in the grid. That said, for normal use cases a replacement in the grid is a much better approach and I agree we should probably make that the default. |
Here you update E for the whole grid. Then you update E inside the objects, changing E in-place, locally.
Aren't you doing it twice?
The text was updated successfully, but these errors were encountered: