Commit d0236bd7 authored by lhausamm's avatar lhausamm
Browse files

Removing compilation errors

parent f3520640
......@@ -431,6 +431,7 @@ AC_ARG_WITH([grackle],
[with_grackle="no"]
)
if test "x$with_grackle" != "xno"; then
AC_PROG_FC
AC_FC_LIBRARY_LDFLAGS
if test "x$with_grackle" != "xyes" -a "x$with_grackle" != "x"; then
GRACKLE_LIBS="-L$with_grackle/lib -lgrackle $FCLIBS"
......
......@@ -116,6 +116,8 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h
cooling/none/cooling.h cooling/none/cooling_struct.h \
cooling/const_du/cooling.h cooling/const_du/cooling_struct.h \
cooling/const_lambda/cooling.h cooling/const_lambda/cooling_struct.h \
cooling/grackle/cooling.h cooling/grackle/cooling_struct.h \
cooling/grackle/grackle_wrapper.h \
memswap.h dump.h logger.h
......
......@@ -47,7 +47,7 @@
* between step t0 and t1.
*/
static INLINE double DoCooling_GRACKLE(double energy, double density, double dtime, double *ne, double Z, double a_now)
static INLINE double do_cooling_grackle(double energy, double density, double dtime, double *ne, double Z, double a_now)
{
......@@ -57,7 +57,7 @@ static INLINE double DoCooling_GRACKLE(double energy, double density, double dti
*********************************************************************/
if (wrap_do_cooling(density, &energy, dtime,Z, a_now) == 0) {
fprintf(stderr, "Error in do_cooling.\n");
error("Error in do_cooling.\n");
return 0;
}
......@@ -68,10 +68,6 @@ static INLINE double DoCooling_GRACKLE(double energy, double density, double dti
}
/**
* @brief Apply the cooling function to a particle.
*
......@@ -85,7 +81,7 @@ static INLINE double DoCooling_GRACKLE(double energy, double density, double dti
*/
__attribute__((always_inline)) INLINE static void cooling_cool_part(
const struct phys_const* restrict phys_const,
const struct UnitSystem* restrict us,
const struct unit_system* restrict us,
const struct cooling_function_data* restrict cooling,
struct part* restrict p, struct xpart* restrict xp, float dt) {
......@@ -93,7 +89,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
/* Get current internal energy (dt=0) */
const float u_old = hydro_get_internal_energy(p, 0.f);
const float u_old = hydro_get_internal_energy(p);
/* Get current density */
const float rho = hydro_get_density(p);
/* Actual scaling fractor */
......@@ -108,7 +104,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
float u_new;
float delta_u;
u_new = DoCooling_GRACKLE(u_old, rho, dt, &ne, Z, a_now);
u_new = do_cooling_grackle(u_old, rho, dt, &ne, Z, a_now);
//u_new = u_old * 0.99;
......@@ -129,11 +125,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
/* Update the internal energy */
hydro_set_internal_energy(p, u_new);
hydro_set_internal_energy_dt(p, delta_u / dt);
}
......@@ -150,7 +142,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
__attribute__((always_inline)) INLINE static float cooling_timestep(
const struct cooling_function_data* restrict cooling,
const struct phys_const* restrict phys_const,
const struct UnitSystem* restrict us, const struct part* restrict p) {
const struct unit_system* restrict us, const struct part* restrict p) {
return FLT_MAX;
}
......@@ -188,7 +180,8 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
* @param cooling The cooling properties to initialize
*/
static INLINE void cooling_init_backend(
const struct swift_params* parameter_file, const struct UnitSystem* us,
const struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {
......
......@@ -45,9 +45,6 @@ struct xpart {
/* Velocity at the last full step. */
float v_full[3];
/* Radiated energy */
float e_radcool;
/* Entropy at the last full step. */
float entropy_full;
......
Supports Markdown
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