-
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
Test the solver in a number of uncomfortably exciting cases #2355
Conversation
physics/euler_solver_body.hpp
Outdated
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. |
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.
Check that B₂₁² * B₂₃²
is nonzero and maybe that λ is finite..
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.
As discussed, added a comment.
physics/euler_solver_test.cpp
Outdated
// principal axis. | ||
{ | ||
Solver::AngularMomentumBivector const initial_angular_momentum( | ||
{std::numeric_limits<double>::min() * SIUnit<AngularMomentum>(), |
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.
Does this go through the ṁ_is_zero
path or the normal one? What happens with denorm_min
?
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.
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
.
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.
Added a test that exercises the check.
EXPECT_THAT(actual_attitude(e1), AlmostEquals(expected_attitude(e1), 29)); | ||
EXPECT_THAT(actual_attitude(e2), AlmostEquals(expected_attitude(e2), 68)); | ||
EXPECT_THAT(actual_attitude(e3), AlmostEquals(expected_attitude(e3), 6)); | ||
} |
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.
Add a test with m
somewhere in the 2-3 plane (in the 2 or 3 direction) for I2=I3.
No description provided.