Commit 62912f13 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Do not apply the extra Hydrogen reionization energy to inhibited particles

parent 3adbf506
......@@ -31,6 +31,7 @@
#include <time.h>
/* Local includes. */
#include "active.h"
#include "adiabatic_index.h"
#include "chemistry.h"
#include "cooling.h"
......@@ -1121,6 +1122,8 @@ void cooling_Hydrogen_reionization(const struct cooling_function_data *cooling,
struct part *p = &parts[i];
struct xpart *xp = &xparts[i];
if (part_is_inhibited(p, s->e)) continue;
if (xp->sf_data.SFR <= 0.) {
const float old_u = hydro_get_physical_internal_energy(p, xp, cosmo);
const float new_u = old_u + extra_heat;
......
......@@ -31,6 +31,7 @@
#include <time.h>
/* Local includes. */
#include "active.h"
#include "chemistry.h"
#include "cooling.h"
#include "cooling_rates.h"
......@@ -756,6 +757,8 @@ void cooling_Hydrogen_reionization(const struct cooling_function_data *cooling,
struct part *p = &parts[i];
struct xpart *xp = &xparts[i];
if (part_is_inhibited(p, s->e)) continue;
const float old_u = hydro_get_physical_internal_energy(p, xp, cosmo);
const float new_u = old_u + extra_heat;
......
......@@ -31,6 +31,7 @@
#include <time.h>
/* Local includes. */
#include "active.h"
#include "adiabatic_index.h"
#include "chemistry.h"
#include "cooling.h"
......@@ -731,6 +732,8 @@ void cooling_Hydrogen_reionization(const struct cooling_function_data *cooling,
struct part *p = &parts[i];
struct xpart *xp = &xparts[i];
if (part_is_inhibited(p, s->e)) continue;
const float old_u = hydro_get_physical_internal_energy(p, xp, cosmo);
const float new_u = old_u + extra_heat;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment