diff --git a/src/black_holes/EAGLE/black_holes_iact.h b/src/black_holes/EAGLE/black_holes_iact.h index ec17af8cbb9a4a1acf5af257cf68e4eb85032136..78d62dc71fb24f3f0ee984489723a813dd60a8bc 100644 --- a/src/black_holes/EAGLE/black_holes_iact.h +++ b/src/black_holes/EAGLE/black_holes_iact.h @@ -208,7 +208,7 @@ runner_iact_nonsym_bh_feedback(const float r2, const float *dx, const float hi, hydro_set_drifted_physical_internal_energy(pj, cosmo, u_new); /* Impose maximal viscosity */ - hydro_set_viscosity_alpha_max_feedback(pj); + hydro_diffusive_feedback_reset(pj); /* message( */ /* "We did some AGN heating! id %llu BH id %llu probability " */ diff --git a/src/feedback/EAGLE/feedback_iact.h b/src/feedback/EAGLE/feedback_iact.h index 05d8ff43d446ba19fcd8f514cdb657e8119c323c..fa5507df74777077ebcbf9cab6de0750768460eb 100644 --- a/src/feedback/EAGLE/feedback_iact.h +++ b/src/feedback/EAGLE/feedback_iact.h @@ -301,7 +301,7 @@ runner_iact_nonsym_feedback_apply(const float r2, const float *dx, hydro_set_drifted_physical_internal_energy(pj, cosmo, u_new); /* Impose maximal viscosity */ - hydro_set_viscosity_alpha_max_feedback(pj); + hydro_diffusive_feedback_reset(pj); /* message( */ /* "We did some heating! id %llu star id %llu probability %.5e " */ diff --git a/src/hydro/AnarchyDU/hydro.h b/src/hydro/AnarchyDU/hydro.h index 8f14e583f6841ffaf73840b8c04bc6bc5ec96ddf..53c66e316136b172f7610dd6f066c6e841421ced 100644 --- a/src/hydro/AnarchyDU/hydro.h +++ b/src/hydro/AnarchyDU/hydro.h @@ -423,15 +423,18 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { + /* Set the viscosity to the max, and the diffusion to the min */ hydro_set_viscosity_alpha(p, hydro_props_default_viscosity_alpha_feedback_reset); + + p->diffusion.alpha = hydro_props_default_diffusion_alpha_feedback_reset; } /** diff --git a/src/hydro/AnarchyDU/hydro_parameters.h b/src/hydro/AnarchyDU/hydro_parameters.h index d2ce2167cb5cf02a1189bbbf8a6327ed5f5bff04..63af6503145066e757f3a3827db0f71d9f841770 100644 --- a/src/hydro/AnarchyDU/hydro_parameters.h +++ b/src/hydro/AnarchyDU/hydro_parameters.h @@ -76,6 +76,14 @@ * sets the decay length for the diffusion. */ #define hydro_props_default_viscosity_length 0.25f +/* Diffusion parameters -- FIXED -- MUST BE DEFINED AT COMPILE-TIME */ + +/*! The diffusion that the particles are reset to after being hit by a + * feedback event. This should be set to the same value as the + * hydro_props_default_diffusion_alpha in fixed schemes, and likely + * to hydro_props_default_diffusion_alpha_min in variable schemes. */ +#define hydro_props_default_diffusion_alpha_feedback_reset 0.0f + /* Diffusion parameters -- Defaults; can be changed at run-time */ /*! The "initial" diffusion, or the fixed value for non-variable diff --git a/src/hydro/AnarchyPU/hydro.h b/src/hydro/AnarchyPU/hydro.h index 460461d06af954f9058e254fcdf2e9a8ced21d14..9ba58828dd84df205539550c221746dfac37ed21 100644 --- a/src/hydro/AnarchyPU/hydro.h +++ b/src/hydro/AnarchyPU/hydro.h @@ -431,15 +431,18 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { + /* Set the viscosity to the max, and the diffusion to the min */ hydro_set_viscosity_alpha(p, hydro_props_default_viscosity_alpha_feedback_reset); + + p->diffusion.alpha = hydro_props_default_diffusion_alpha_feedback_reset; } /** diff --git a/src/hydro/AnarchyPU/hydro_parameters.h b/src/hydro/AnarchyPU/hydro_parameters.h index ec316abbaa0bbe579d56c216736ccd8a0c3c2e21..1f1e1c2de1c02a1c0f1969eb00244dfc50a0ecc3 100644 --- a/src/hydro/AnarchyPU/hydro_parameters.h +++ b/src/hydro/AnarchyPU/hydro_parameters.h @@ -76,6 +76,14 @@ * sets the decay length for the diffusion. */ #define hydro_props_default_viscosity_length 0.25f +/* Diffusion parameters -- FIXED -- MUST BE DEFINED AT COMPILE-TIME */ + +/*! The diffusion that the particles are reset to after being hit by a + * feedback event. This should be set to the same value as the + * hydro_props_default_diffusion_alpha in fixed schemes, and likely + * to hydro_props_default_diffusion_alpha_min in variable schemes. */ +#define hydro_props_default_diffusion_alpha_feedback_reset 0.0f + /* Diffusion parameters -- Defaults; can be changed at run-time */ /* The "initial" diffusion, or the fixed value for non-variable diff --git a/src/hydro/Default/hydro.h b/src/hydro/Default/hydro.h index 694441c8b02f1071119d41df9b70999efd75be1f..558143f88d07225f5e6bfe5666d345a7891a7534 100644 --- a/src/hydro/Default/hydro.h +++ b/src/hydro/Default/hydro.h @@ -423,13 +423,13 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { hydro_set_viscosity_alpha(p, hydro_props_default_viscosity_alpha_feedback_reset); } diff --git a/src/hydro/Gadget2/hydro.h b/src/hydro/Gadget2/hydro.h index c6367ec7b46076d97f5637d360d946dc056d7bd4..afc9c17d5b6ed691685bf42df2562ecb6f4409d8 100644 --- a/src/hydro/Gadget2/hydro.h +++ b/src/hydro/Gadget2/hydro.h @@ -413,13 +413,13 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { /* This scheme has fixed alpha */ } diff --git a/src/hydro/GizmoMFM/hydro.h b/src/hydro/GizmoMFM/hydro.h index 8c47d529dd4696331b9afbb3e402639116bd06f1..eb3d9044baecadeaba9165061fae33c816446042 100644 --- a/src/hydro/GizmoMFM/hydro.h +++ b/src/hydro/GizmoMFM/hydro.h @@ -1048,7 +1048,7 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part* restrict p) { +hydro_diffusive_feedback_reset(struct part* restrict p) { /* Purposefully left empty */ } diff --git a/src/hydro/GizmoMFV/hydro.h b/src/hydro/GizmoMFV/hydro.h index dc11bcece94bbd0622f4eb48ca2b14d1fcd9d235..e6a87b9a86fc7ec03a4bfe055e151ee8c7c580e4 100644 --- a/src/hydro/GizmoMFV/hydro.h +++ b/src/hydro/GizmoMFV/hydro.h @@ -1119,7 +1119,7 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part* restrict p) { +hydro_diffusive_feedback_reset(struct part* restrict p) { /* Purposefully left empty */ } diff --git a/src/hydro/Minimal/hydro.h b/src/hydro/Minimal/hydro.h index 33e01a783c4bf854707d7cf72a67c437e4f3ba0e..0cac1de40f258ff9921ea98ddd59a848d4bb7a67 100644 --- a/src/hydro/Minimal/hydro.h +++ b/src/hydro/Minimal/hydro.h @@ -408,13 +408,13 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { /* This scheme has fixed alpha */ } diff --git a/src/hydro/Planetary/hydro.h b/src/hydro/Planetary/hydro.h index 7a6d0861cbe0b22f8e687f9781db0a4585c8b569..7139f811a6e868d9eafdbbf4628b03c156aa459e 100644 --- a/src/hydro/Planetary/hydro.h +++ b/src/hydro/Planetary/hydro.h @@ -432,13 +432,13 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { /* This scheme has fixed alpha */ } diff --git a/src/hydro/PressureEnergy/hydro.h b/src/hydro/PressureEnergy/hydro.h index 1691781a12e3c4c2299a08a4aac08bc83c1d123d..e3a4f98160150717e50651760d8af68af2a70662 100644 --- a/src/hydro/PressureEnergy/hydro.h +++ b/src/hydro/PressureEnergy/hydro.h @@ -433,13 +433,13 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { /* This scheme has fixed alpha */ } diff --git a/src/hydro/PressureEnergyMorrisMonaghanAV/hydro.h b/src/hydro/PressureEnergyMorrisMonaghanAV/hydro.h index e477c9f96b2daaf1d786dfc58070da8fd89a7f88..c23b3467fd0dee575aacf92c108508be7d44ad32 100644 --- a/src/hydro/PressureEnergyMorrisMonaghanAV/hydro.h +++ b/src/hydro/PressureEnergyMorrisMonaghanAV/hydro.h @@ -430,13 +430,13 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { hydro_set_viscosity_alpha(p, hydro_props_default_viscosity_alpha_feedback_reset); } diff --git a/src/hydro/PressureEntropy/hydro.h b/src/hydro/PressureEntropy/hydro.h index a381011069c9a5f0717f1a26ffef1c4bd7eeb817..66b8e186c82ab1646ffb862ff2d401f0362886c3 100644 --- a/src/hydro/PressureEntropy/hydro.h +++ b/src/hydro/PressureEntropy/hydro.h @@ -195,13 +195,13 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( } /** - * @brief Update the value of the viscosity alpha to the + * @brief Update the value of the diffusive coefficients to the * feedback reset value for the scheme. * * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part *restrict p) { +hydro_diffusive_feedback_reset(struct part *restrict p) { /* This scheme has fixed alpha */ } diff --git a/src/hydro/Shadowswift/hydro.h b/src/hydro/Shadowswift/hydro.h index a6b3b41c9c08e6f83ed4d989bd57176507221797..955a3db1d4480c43dd2fd57c6d976689d36a5652 100644 --- a/src/hydro/Shadowswift/hydro.h +++ b/src/hydro/Shadowswift/hydro.h @@ -892,7 +892,7 @@ __attribute__((always_inline)) INLINE static void hydro_set_viscosity_alpha( * @param p the particle of interest */ __attribute__((always_inline)) INLINE static void -hydro_set_viscosity_alpha_max_feedback(struct part* restrict p) { +hydro_diffusive_feedback_reset(struct part* restrict p) { /* Purposefully left empty */ }