-
Notifications
You must be signed in to change notification settings - Fork 69
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
Computed velocities and GRGS dialect #2125
Conversation
using quantities::NaN; | ||
using quantities::Speed; | ||
using quantities::si::Deci; | ||
using quantities::si::Kilo; | ||
using quantities::si::Metre; | ||
using quantities::si::Second; | ||
|
||
// Given a trajectory whose velocities are bad or absent (e.g., NaN), uses | ||
// n-point finite difference formulae on the positions to produce a trajectory |
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.
Spelling!
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.
Done.
COMPUTE_VELOCITIES_CASE(7); | ||
COMPUTE_VELOCITIES_CASE(8); | ||
#undef COMPUTE_VELOCITIES_CASE | ||
default: |
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.
This is weird. Why not a normal 9
branch and a LOG(FATAL)
here?
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.
There can be (and most often will be) more than 9 points in the orbit.
The template parameter, being the number of points used by the finite difference formula, must be smaller than or equal to the number of points in the orbit, but cannot be arbitrarily large (we only have coefficients for up to 9-point difference formulæ).
Use the finite differences added in #2123.