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
[grackle],
[initialize_chemistry_data],
[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!)],
[$GRACKLE_LIBS $GRACKLE_INCS $FCLIBS]
......
......@@ -497,7 +497,7 @@ __attribute__((always_inline)) INLINE static gr_float cooling_rate(
/* set current time */
code_units units = cooling->units;
if (cooling->redshift == -1)
error("TODO time dependant redshift");
units.a_value = cosmo->a;
else
units.a_value = 1. / (1. + cooling->redshift);
......@@ -535,12 +535,10 @@ __attribute__((always_inline)) INLINE static gr_float cooling_rate(
/* copy to grackle structure */
cooling_copy_to_grackle(data, p, xp, density);
/* solve chemistry with table */
/* solve chemistry */
chemistry_data chemistry_grackle = cooling->chemistry;
chemistry_data_storage my_rates = grackle_rates;
_solve_chemistry(&chemistry_grackle,
int error_code = _solve_chemistry(&chemistry_grackle,
&my_rates,
&units, dt, data.grid_dx,
data.grid_rank, data.grid_dimension,
......@@ -556,6 +554,8 @@ __attribute__((always_inline)) INLINE static gr_float cooling_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,
NULL);
if (error_code == 0)
error("Error in solve_chemistry.");
//if (solve_chemistry(&units, &data, dt) == 0) {
// error("Error in solve_chemistry.");
//}
......
......@@ -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 gpart* gparts = e->s->gparts;
const struct spart* sparts = e->s->sparts;
struct gpart* dmparts = NULL;
FILE* xmfFile = 0;
int periodic = e->s->periodic;
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