Commit f1860215 authored by lhausamm's avatar lhausamm

Small fixes + clean merge request

parent 80ec719d
...@@ -533,7 +533,7 @@ if test "x$with_grackle" != "xno"; then ...@@ -533,7 +533,7 @@ if test "x$with_grackle" != "xno"; then
[grackle], [grackle],
[initialize_chemistry_data], [initialize_chemistry_data],
[AC_DEFINE([HAVE_GRACKLE],1,[The GRACKLE library appears to be present.]) [AC_DEFINE([HAVE_GRACKLE],1,[The GRACKLE library appears to be present.])
AC_DEFINE([CONFIG_BFLOAT_8],1,[Use double in grackle]) AC_DEFINE([CONFIG_BFLOAT_8],1,[Use doubles in grackle])
], ],
[AC_MSG_ERROR(Cannot find grackle library!)], [AC_MSG_ERROR(Cannot find grackle library!)],
[$GRACKLE_LIBS $GRACKLE_INCS $FCLIBS] [$GRACKLE_LIBS $GRACKLE_INCS $FCLIBS]
......
...@@ -497,7 +497,7 @@ __attribute__((always_inline)) INLINE static gr_float cooling_rate( ...@@ -497,7 +497,7 @@ __attribute__((always_inline)) INLINE static gr_float cooling_rate(
/* set current time */ /* set current time */
code_units units = cooling->units; code_units units = cooling->units;
if (cooling->redshift == -1) if (cooling->redshift == -1)
error("TODO time dependant redshift"); units.a_value = cosmo->a;
else else
units.a_value = 1. / (1. + cooling->redshift); units.a_value = 1. / (1. + cooling->redshift);
...@@ -535,27 +535,27 @@ __attribute__((always_inline)) INLINE static gr_float cooling_rate( ...@@ -535,27 +535,27 @@ __attribute__((always_inline)) INLINE static gr_float cooling_rate(
/* copy to grackle structure */ /* copy to grackle structure */
cooling_copy_to_grackle(data, p, xp, density); cooling_copy_to_grackle(data, p, xp, density);
/* solve chemistry with table */ /* solve chemistry */
chemistry_data chemistry_grackle = cooling->chemistry; chemistry_data chemistry_grackle = cooling->chemistry;
chemistry_data_storage my_rates = grackle_rates; chemistry_data_storage my_rates = grackle_rates;
_solve_chemistry(&chemistry_grackle, int error_code = _solve_chemistry(&chemistry_grackle,
&my_rates, &my_rates,
&units, dt, data.grid_dx, &units, dt, data.grid_dx,
data.grid_rank, data.grid_dimension, data.grid_rank, data.grid_dimension,
data.grid_start, data.grid_end, data.grid_start, data.grid_end,
data.density, data.internal_energy, data.density, data.internal_energy,
data.x_velocity, data.y_velocity, data.z_velocity, data.x_velocity, data.y_velocity, data.z_velocity,
data.HI_density, data.HII_density, data.HM_density, data.HI_density, data.HII_density, data.HM_density,
data.HeI_density, data.HeII_density, data.HeIII_density, data.HeI_density, data.HeII_density, data.HeIII_density,
data.H2I_density, data.H2II_density, data.H2I_density, data.H2II_density,
data.DI_density, data.DII_density, data.HDI_density, data.DI_density, data.DII_density, data.HDI_density,
data.e_density, data.metal_density, data.e_density, data.metal_density,
data.volumetric_heating_rate, data.specific_heating_rate, data.volumetric_heating_rate, data.specific_heating_rate,
data.RT_heating_rate, data.RT_HI_ionization_rate, data.RT_HeI_ionization_rate, data.RT_heating_rate, data.RT_HI_ionization_rate, data.RT_HeI_ionization_rate,
data.RT_HeII_ionization_rate, data.RT_H2_dissociation_rate, data.RT_HeII_ionization_rate, data.RT_H2_dissociation_rate,
NULL); NULL);
if (error_code == 0)
error("Error in solve_chemistry.");
//if (solve_chemistry(&units, &data, dt) == 0) { //if (solve_chemistry(&units, &data, dt) == 0) {
// error("Error in solve_chemistry."); // error("Error in solve_chemistry.");
//} //}
......
...@@ -856,7 +856,6 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6], ...@@ -856,7 +856,6 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
const struct xpart* xparts = e->s->xparts; const struct xpart* xparts = e->s->xparts;
const struct gpart* gparts = e->s->gparts; const struct gpart* gparts = e->s->gparts;
const struct spart* sparts = e->s->sparts; const struct spart* sparts = e->s->sparts;
struct gpart* dmparts = NULL;
FILE* xmfFile = 0; FILE* xmfFile = 0;
int periodic = e->s->periodic; int periodic = e->s->periodic;
int numFiles = 1; int numFiles = 1;
......
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