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

Test the solver in a number of uncomfortably exciting cases #2355

Merged
merged 11 commits into from
Oct 13, 2019

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Oct 12, 2019

No description provided.

n_ = G² * G² / (B₂₁² * B₂₃²);
ψ_Π_offset_ = (-ν_ + n_ * std::log(n_ * Sinh(-ν_) - Cosh(-ν_)) * Radian);
ψ_Π_multiplier_ = Δ₂ / (λ_ * I₂ * G_ * (1 - n_ * n_));
// Δ₂ shows up in the multiplier, so things simplify tremendously.
Copy link
Member

Choose a reason for hiding this comment

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

Check that B₂₁² * B₂₃² is nonzero and maybe that λ is finite..

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, added a comment.

physics/euler_solver_test.cpp Outdated Show resolved Hide resolved
// principal axis.
{
Solver::AngularMomentumBivector const initial_angular_momentum(
{std::numeric_limits<double>::min() * SIUnit<AngularMomentum>(),
Copy link
Member

Choose a reason for hiding this comment

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

Does this go through the ṁ_is_zero path or the normal one? What happens with denorm_min?

Copy link
Member Author

Choose a reason for hiding this comment

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

It goes through the ṁ_is_zero path. is actually not 0, but NormalizeOrZero is not safe in the face of underflows. The same, of course, happens with denorm_min.

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.

Added a test that exercises the check.

Sorry, something went wrong.

physics/euler_solver_test.cpp Outdated Show resolved Hide resolved
@eggrobin eggrobin added the LGTM label Oct 13, 2019
@pleroy pleroy merged commit b98ee38 into mockingbirdnest:master Oct 13, 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.

2 participants