Skip to content
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

Increase initial number of grid points used in phi quadrature for near-to-far field transformation in cylindrical coordinates #2766

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Jan 20, 2024

Closes #2764.

Rather than make the number of grid points in the $\phi$ quadrature a user parameter in get_farfields, it is simpler just to increase the hard-coded value for N0 set internally in greencyl. The impact of integrating over a larger number of grid points should be insignificant when compared to the accuracy improvements enabled by this modification as this integral converges exponentially fast.

…r-to-far field transformation in cylindrical coordinates
@stevengj
Copy link
Collaborator

stevengj commented Jan 22, 2024

128 might be a little on the large side for e.g. m=0?

Probably it should increase proportional to m.

Would e.g. 16 + int(4*abs(m)) be sufficient here?

@oskooi
Copy link
Collaborator Author

oskooi commented Jan 23, 2024

Would e.g. 16 + int(4*abs(m)) be sufficient here?

Verified that this produces nearly the same results in #2726 (comment) as N0 = 128.

@stevengj stevengj merged commit 744484c into NanoComp:master Jan 23, 2024
5 checks passed
@oskooi oskooi deleted the phi_integral_near2far_cyl branch January 23, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants