diff --git a/src/star_formation/EAGLE/star_formation_iact.h b/src/star_formation/EAGLE/star_formation_iact.h index 84fbad9f230284d5679cc7dd304fd0dd376796a7..ab917cbe7aa67cad93a92a4b24212c5f1dcf3aeb 100644 --- a/src/star_formation/EAGLE/star_formation_iact.h +++ b/src/star_formation/EAGLE/star_formation_iact.h @@ -1,4 +1,6 @@ /******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published diff --git a/src/star_formation/GEAR/star_formation_iact.h b/src/star_formation/GEAR/star_formation_iact.h index ef4747001545e459380bed572ffb89848b649e5e..749b608068650a27cbe4c9a0ca4126d2740337f3 100644 --- a/src/star_formation/GEAR/star_formation_iact.h +++ b/src/star_formation/GEAR/star_formation_iact.h @@ -1,4 +1,6 @@ /******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2019 Loic Hausammann (loic.hausammann@epfl.ch) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published diff --git a/src/stars/Default/stars_iact.h b/src/stars/Default/stars_iact.h index 994ff98d01920124081598d7e6758c929c6d0b2f..cbf3065f1db09d60215f6e9a02783de958418ab5 100644 --- a/src/stars/Default/stars_iact.h +++ b/src/stars/Default/stars_iact.h @@ -1,3 +1,25 @@ +/******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk) + * Loic Hausammann (loic.hausammann@epfl.ch) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ******************************************************************************/ +#ifndef SWIFT_DEFAULT_STARS_IACT_H +#define SWIFT_DEFAULT_STARS_IACT_H + /** * @brief Density interaction between two particles (non-symmetric). * @@ -58,7 +80,7 @@ runner_iact_nonsym_stars_feedback(float r2, const float *dx, float hi, float hj, struct spart *restrict si, struct part *restrict pj, float a, float H) { - const float mj = pj->mass; + const float mj = hydro_get_mass(pj); const float rhoj = pj->rho; const float r = sqrtf(r2); const float ri = 1.f / r; @@ -87,3 +109,5 @@ runner_iact_nonsym_stars_feedback(float r2, const float *dx, float hi, float hj, ++si->num_ngb_force; #endif } + +#endif /* SWIFT_DEFAULT_STARS_IACT_H */ diff --git a/src/stars/EAGLE/stars_iact.h b/src/stars/EAGLE/stars_iact.h index 5c4d94c2060ec42633a5eec472d844ca919b56eb..aad611f50424a5ff8965835d4a2363d49406eb1c 100644 --- a/src/stars/EAGLE/stars_iact.h +++ b/src/stars/EAGLE/stars_iact.h @@ -1,3 +1,24 @@ +/******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ******************************************************************************/ +#ifndef SWIFT_EAGLE_STARS_IACT_H +#define SWIFT_EAGLE_STARS_IACT_H + /** * @brief Density interaction between two particles (non-symmetric). * @@ -17,7 +38,7 @@ runner_iact_nonsym_stars_density(float r2, const float *dx, float hi, float hj, float H) { /* Get the gas mass. */ - const float mj = pj->mass; + const float mj = hydro_get_mass(pj); float wi, wi_dx; @@ -61,3 +82,5 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_stars_feedback(float r2, const float *dx, float hi, float hj, struct spart *restrict si, struct part *restrict pj, float a, float H) {} + +#endif /* SWIFT_EAGLE_STARS_IACT_H */