Skip to content

Commit

Permalink
Update vectors.h
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 1, 2024
1 parent bfff5b5 commit 9de7eca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <array>
#include <cmath>
#include <numeric>
#include <span>
#include <tuple>

#include "constants.h"
Expand Down Expand Up @@ -39,7 +38,7 @@ template <size_t S1, size_t S2>
}

// Get velocity vector of the flow at a position with homologous expansion.
[[nodiscard]] constexpr auto get_velocity(std::span<const double, 3> x, const double t) -> std::array<double, 3> {
[[nodiscard]] constexpr auto get_velocity(const std::array<double, 3> &x, const double t) -> std::array<double, 3> {
return std::array<double, 3>{x[0] / t, x[1] / t, x[2] / t};
}

Expand Down Expand Up @@ -127,7 +126,7 @@ template <size_t S1, size_t S2>
return dopplerfactorsq;
}

[[nodiscard]] constexpr auto doppler_packet_nucmf_on_nurf(const std::span<const double, 3> &pos_rf,
[[nodiscard]] constexpr auto doppler_packet_nucmf_on_nurf(const std::array<double, 3> &pos_rf,
const std::array<double, 3> &dir_rf,
const double prop_time) -> double {
return doppler_nucmf_on_nurf(dir_rf, get_velocity(pos_rf, prop_time));
Expand Down

0 comments on commit 9de7eca

Please sign in to comment.