-
Notifications
You must be signed in to change notification settings - Fork 13
Various improvements to Gauss-Chebyshev equations #34
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
Various improvements to Gauss-Chebyshev equations #34
Conversation
|
for abcissas for the third rule at #27 (comment) you have cos^2 whereas here in the code you have plain cos. Otherwise all three lgtm. I like the clearer indexing. |
|
+1 for the clearer indexing, but the bugs were fixed in #32. I'll address @susilehtola 's comments there and get that merged, and we can address the indexing with this PR |
wavefunction91
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, this should take #32 as its base. Also, while were on the topic of indexing, we should address the the problem of ascending vs descending ordering. It needs to be consistent. I know Psi4 does descending, but I'm not a huge fan of that for a number of reasons. I prefer to keep everything ascending to make life easier in the generation of pruned angular quadratures. For some quadratures, this can be done by simply swapping a sign of the point, for others its not so obvious. Probably best to just handle it by indexing redirection.
|
I don't know if you're needing a comment for the Psi4 perspective, but I'm not following what ascending and descending refer to. |
|
@loriab As in having the quadratures stored in increasing (ascending) or decreasing (descending) order - Psi4 assumes the latter, whereas I prefer to work with the former The defaulting ordering is descending: For GC-{1,2}, you can fix the order by just swapping the sign since the quadratures are symmetric. For GC-2-mod and GC-3, it's not so clear due to the change in variables. |
ed603eb to
54c27b7
Compare
|
Rebased on top of #32. Indexing is now consistent, and all rules generate nodes in ascending order. I also added a test for the correct ordering; it turns out that all the rules gave points in the opposite order. |
54c27b7 to
26bbe0d
Compare
|
@susilehtola Update with |
and weights match the mathematical expressions. Moreover, ensure that the nodes are returned in increasing order. Also fix some typos in the comments.
26bbe0d to
6b90097
Compare
Per @loriab comment in #27,
gausscheby1had a wrong equation in the code. This is fixed by this PR.This PR also converts all
gausschebyroutines to use the same indexing. In my opinion, it is best to choose the indexing such that the equations match the mathematical expressions, since this makes checking their correctness easier.The third thing this PR does is to make sure that all Gauss-Chebyshev quadratures generate nodes in ascending order.
(The correctness bugs were already fixed in #32.)