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: 5396f5839659
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 50663002197a
Choose a head ref
  • 5 commits
  • 14 files changed
  • 1 contributor

Commits on Sep 27, 2020

  1. Copy the full SHA
    b8cf25a View commit details

Commits on Sep 30, 2020

  1. Copy the full SHA
    c33e027 View commit details
  2. Append _ to the parameters.

    pleroy committed Sep 30, 2020
    Copy the full SHA
    a5fd892 View commit details
  3. More clients to fix.

    pleroy committed Sep 30, 2020
    Copy the full SHA
    0d681e5 View commit details
  4. Merge pull request #2744 from pleroy/Polycleanup

    Cleanups for the polynomials
    pleroy authored Sep 30, 2020
    Copy the full SHA
    5066300 View commit details
2 changes: 1 addition & 1 deletion astronomy/orbit_analysis_test.cpp
Original file line number Diff line number Diff line change
@@ -225,7 +225,7 @@ class OrbitAnalysisTest : public ::testing::Test {
*earth_centred_trajectory,
earth_,
{{/*epoch=*/J2000,
/*mean_longitude_at_epoch=*/newcomb_mean_longitude.Evaluate(J2000),
/*mean_longitude_at_epoch=*/newcomb_mean_longitude(J2000),
/*year*/ 2 * π * Radian /
newcomb_mean_longitude.EvaluateDerivative(J2000)}});
return {elements, recurrence, ground_track};
2 changes: 1 addition & 1 deletion benchmarks/polynomial.cpp
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ void EvaluatePolynomialInMonomialBasis(benchmark::State& state) {

while (state.KeepRunning()) {
for (int i = 0; i < evaluations_per_iteration; ++i) {
result += p.Evaluate(argument);
result += p(argument);
argument += Δargument;
}
}
Original file line number Diff line number Diff line change
@@ -134,10 +134,10 @@ TEST_F(EmbeddedExplicitGeneralizedRungeKuttaNyströmIntegratorTest, Legendre) {
for (ODE::SystemState const& state : solution) {
double const x = (state.time.value - t_initial) / (1 * Second);
double const error =
AbsoluteError(LegendrePolynomial<degree, EstrinEvaluator>().Evaluate(x),
AbsoluteError(LegendrePolynomial<degree, EstrinEvaluator>()(x),
state.positions[0].value);
Variation<double> const derivative_error = AbsoluteError(
LegendrePolynomial<degree, EstrinEvaluator>().Derivative().Evaluate(x) /
LegendrePolynomial<degree, EstrinEvaluator>().Derivative()(x) /
(1 * Second),
state.velocities[0].value);
max_error = std::max(max_error, error);
8 changes: 4 additions & 4 deletions numerics/elliptic_functions.cpp
Original file line number Diff line number Diff line change
@@ -78,17 +78,17 @@ void JacobiSNCNDNReduced(Angle const& u,
u₀ = 0.5 * u₀;
}

double const b₀1 = fukushima_b₀_maclaurin_m_1.Evaluate(m);
double const b₀2 = fukushima_b₀_maclaurin_m_2.Evaluate(m);
double const b₀3 = fukushima_b₀_maclaurin_m_3.Evaluate(m);
double const b₀1 = fukushima_b₀_maclaurin_m_1(m);
double const b₀2 = fukushima_b₀_maclaurin_m_2(m);
double const b₀3 = fukushima_b₀_maclaurin_m_3(m);
PolynomialInMonomialBasis<double, double, 3, HornerEvaluator>
fukushima_b₀_maclaurin_u₀²_3(std::make_tuple(0.0, b₀1, b₀2, b₀3));
double const u₀² = (u₀ * u₀) / Pow<2>(Radian);

// We use the subscript i to indicate variables that are computed as part of
// the iteration (Fukushima uses subscripts n and N). This avoids confusion
// between c (the result) and cᵢ (the intermediate numerator of c).
double bᵢ = fukushima_b₀_maclaurin_u₀²_3.Evaluate(u₀²);
double bᵢ = fukushima_b₀_maclaurin_u₀²_3(u₀²);

Angle const uA = (1.76269 + 1.16357 * mc) * Radian;
bool const may_have_cancellation = u > uA;
Loading