Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e1f4c521281d
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 773e6fbad7f9
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 6, 2018

  1. do not try ordering NaN

    eggrobin committed Dec 6, 2018
    Copy the full SHA
    1f03cb4 View commit details
  2. ()

    eggrobin committed Dec 6, 2018
    Copy the full SHA
    d9f36a8 View commit details
  3. Merge pull request #2017 from eggrobin/nan-norm

    Do not try ordering NaN
    pleroy authored Dec 6, 2018
    Copy the full SHA
    773e6fb View commit details
Showing with 6 additions and 0 deletions.
  1. +6 −0 physics/geopotential_body.hpp
6 changes: 6 additions & 0 deletions physics/geopotential_body.hpp
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ using quantities::ArcTan;
using quantities::Cos;
using quantities::Derivative;
using quantities::Length;
using quantities::NaN;
using quantities::Pow;
using quantities::Sqrt;
using quantities::Sin;
@@ -594,6 +595,11 @@ Geopotential<Frame>::GeneralSphericalHarmonicsAcceleration(
Length const& r_norm,
Square<Length> const& r²,
Exponentiation<Length, -3> const& one_over_r³) const {
if (r_norm != r_norm) {
// Short-circuit NaN, to avoid having to deal with an unordered
// |r_norm| when finding the partition point below.
return NaN<ReducedAcceleration>() * Vector<double, Frame>{};
}
// |limiting_degree| is the first degree such that
// |r_norm >= degree_damping_[limiting_degree].outer_threshold()|, or is
// |degree_damping_.size()| if |r_norm| is below all thresholds.