queso
queso copied to clipboard
Change "order" constructor argument in Quadrature to "n_points"
As I'm working on using/updating/testing the quadrature class, this is driving me crazy. Currently the constructors take the "order" which, AFAICT, is just n_points-1, which I don't understand. That "order" has nothing to do with the order of accuracy of polynomials integrated, nor the power of the leading order error term for non-polynomial functions.
I don't think these are widely used (both within QUESO and outside), so I'd like to change the constructor agrument before it starts getting used (which it will by me right away).
Thoughts?
Or alternatively have "order" mean the order of polynomials integrated exactly. Either that or n_points would be much more sensible IMHO. Otherwise, what we have doesn't map to the mathematics.
It sounds like, at present, this is essentially a bug in the documentation.
Sort of. If the user wants a 2-point rule, they have to pass order = 1
to the constructor. The more consistent would change this behavior to either order = 3
(for the 2-point rule, since 2-point rule integrates polynomials of order 3 exactly) or have order
become n_points
in which case this argument would now be n_points = 2
for the 2-point rule.
Either way, it's a change in behavior if someone is using this.
Thanks for the explanation. It's a behaviour change but the behaviour right now doesn't map to the mathematics.
I'm trying to convince myself it's an API change that isn't too serious.