Skip to content

Benchmark the physics DLL #1701

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

Merged
merged 5 commits into from
Feb 1, 2018

Conversation

eggrobin
Copy link
Member

No description provided.

Verified

This commit was signed with the committer’s verified signature.
vcunat Vladimír Čunát

Verified

This commit was signed with the committer’s verified signature.
vcunat Vladimír Čunát

Verified

This commit was signed with the committer’s verified signature.
vcunat Vladimír Čunát

Verified

This commit was signed with the committer’s verified signature.
vcunat Vladimír Čunát
@@ -85,14 +85,16 @@ void FillLinearTrajectory(Position<F> const& initial,
}

// This code is derived from Plugin::RenderTrajectory.
std::vector<std::pair<Position<ICRFJ2000Equator>,
Position<ICRFJ2000Equator>>> ApplyDynamicFrame(
std::vector<std::pair<Position<ksp_plugin::Barycentric>,
Copy link
Member

Choose a reason for hiding this comment

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

I'd invest in a using ksp_plugin::Barycentric. This would massively reduce the amount of reformatting.

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.

Instant const& t,
Ephemeris<ICRFJ2000Equator>& ephemeris);
using Flow = void(
not_null<DiscreteTrajectory<ksp_plugin::Barycentric>*> const trajectory,
Copy link
Member

Choose a reason for hiding this comment

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

Same 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.

Done.

@@ -32,11 +35,13 @@ class SolarSystem final {
// format for SolarSystemFile protocol buffers.
SolarSystem(
std::experimental::filesystem::path const& gravity_model_filename,
std::experimental::filesystem::path const& initial_state_filename);
std::experimental::filesystem::path const& initial_state_filename,
bool ignore_frame = false);
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to avoid the defaulted parameter by having both a 2- and a 3-argument constructor, one delegating to the other.

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed, leaving as-is.

@@ -84,6 +84,10 @@ class SolarSystemFactory : not_constructible {
AllBodiesAndOblateness,
};

template<typename Frame>
Copy link
Member

Choose a reason for hiding this comment

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

It's odd/tasteless that only this method is parameterized by the Frame. Shouldn't the entire class be templated?

Copy link
Member Author

Choose a reason for hiding this comment

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

The other methods really should return an ICRFJ2000Equator system, ignore_frame is a bit of a hack that I'd like to keep in one place.

Verified

This commit was signed with the committer’s verified signature.
vcunat Vladimír Čunát
@eggrobin
Copy link
Member Author

retest this please

@eggrobin
Copy link
Member Author

retest this please (we need to do something about the flakiness induced by races when copying the DLL...)

Sorry, something went wrong.

@pleroy pleroy added the LGTM label Jan 31, 2018
@pleroy pleroy merged commit 11561b5 into mockingbirdnest:master Feb 1, 2018
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