Skip to content

Commit

Permalink
boundary_distance() pass by const ref
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 1, 2024
1 parent 52bc2e0 commit 06b793e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,7 @@ auto get_totmassradionuclide(const int z, const int a) -> double {

// compute distance to a cell boundary.
[[nodiscard]] __host__ __device__ auto boundary_distance(
const std::array<double, 3> dir, const std::array<double, 3> pos, const double tstart, const int cellindex,
const std::array<double, 3> &dir, const std::array<double, 3> &pos, const double tstart, const int cellindex,
enum cell_boundary *pkt_last_cross) -> std::tuple<double, int> {
if constexpr (FORCE_SPHERICAL_ESCAPE_SURFACE) {
if (get_cell_r_inner(cellindex) > globals::vmax * globals::tmin) {
Expand Down
4 changes: 2 additions & 2 deletions grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ void write_grid_restart_data(int timestep);
[[nodiscard]] auto get_ndo(int rank) -> int;
[[nodiscard]] auto get_ndo_nonempty(int rank) -> int;
[[nodiscard]] auto get_totmassradionuclide(int z, int a) -> double;
[[nodiscard]] auto boundary_distance(std::array<double, 3> dir, std::array<double, 3> pos, double tstart, int cellindex,
enum cell_boundary *pkt_last_cross) -> std::tuple<double, int>;
[[nodiscard]] auto boundary_distance(const std::array<double, 3> &dir, const std::array<double, 3> &pos, double tstart,
int cellindex, enum cell_boundary *pkt_last_cross) -> std::tuple<double, int>;

[[nodiscard]] inline auto get_elem_abundance(int modelgridindex, int element) -> float
// mass fraction of an element (all isotopes combined)
Expand Down

0 comments on commit 06b793e

Please sign in to comment.