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

Computed velocities and GRGS dialect #2125

Merged
merged 13 commits into from
Apr 8, 2019
Merged

Conversation

eggrobin
Copy link
Member

@eggrobin eggrobin commented Apr 7, 2019

Use the finite differences added in #2123.

for (int k = 0; k < n - 1; ++k) {
times[k] = times[k + 1];
positions[k] = positions[k + 1];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the 3-argument std::move.

Sorry, something went wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sorry, something went wrong.

COMPUTE_VELOCITIES_CASE(7);
COMPUTE_VELOCITIES_CASE(8);
#undef COMPUTE_VELOCITIES_CASE
default:
Copy link
Member

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?

Copy link
Member Author

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æ).

@pleroy pleroy added the LGTM label Apr 8, 2019
@pleroy pleroy merged commit 72923f5 into mockingbirdnest:master Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants