-
Notifications
You must be signed in to change notification settings - Fork 622
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
Implement proper integration weights in cylindrical coordinates #2467
Comments
@oskooi, i've got a draft for a fix to this. You mentioned you have a test problem. Can you link me to it? |
The test that I had in mind is to demonstrate that the normalized radiated flux To set this up, we can simply modify the tutorial script python/examples/point_dipole_cyl.py. The function meep/python/examples/point_dipole_cyl.py Lines 141 to 149 in b415cbf
The key metric to check would be Note that this test does not use the LDOS feature. |
Also note that in Tutorial/Nonaxisymmetric Dipole Sources, I intentionally used "large" values of the source position ( meep/python/examples/point_dipole_cyl.py Lines 132 to 133 in b415cbf
Hopefully once this bug is fixed, we can modify this tutorial to include point-source locations closer to |
As discussed in #2452, the integration weights in cylindrical coordinates are implemented identically as those in cartesian coordinates (which is incorrect). The procedure to fix this is outlined in the code itself:
meep/src/loop_in_chunks.cpp
Lines 112 to 113 in 1fe3899
but it's not trivial to implement, particularly with cases at or crossing
r=0
(which happens a lot...)Anecdotally, this doesn't seem to be an issue if R is rather large. However, for smaller cells, the error compounds substantially (and doesn't "easily" disappear with resolution).
The text was updated successfully, but these errors were encountered: