diff --git a/configure.ac b/configure.ac index bd397308c516b873d545e66e61d2ac16f712d73c..ce3844381556ee99bc4a60915b1cdafffc6a1231 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,6 @@ if test "$enable_ipo" = "yes"; then fi fi - # Check for MPI. Need to do this before characterising the compiler (C99 mode), # as this changes the compiler. # We should consider using AX_PROG_CC_MPI to replace AC_PROG_CC when compiling diff --git a/src/Makefile.am b/src/Makefile.am index 7f555f5e21f8802517e64d1ab7d8a6be441f0b0b..c50c831b3e27ab07ade0c83ccb5cb3b4f78f6724 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Add the debug flag to the whole thing - AM_CFLAGS = $(HDF5_CPPFLAGS) # Assign a "safe" version number diff --git a/src/cooling/grackle/cooling.h b/src/cooling/grackle/cooling.h index a555d8377ac4ab9786e4ca5e5102a80cd80549fc..50700071904be662609e513b34a0215d0ef61d7f 100644 --- a/src/cooling/grackle/cooling.h +++ b/src/cooling/grackle/cooling.h @@ -39,7 +39,6 @@ /* include the grackle wrapper */ #include "grackle_wrapper.h" - /** * @brief Compute the cooling rate * @@ -59,8 +58,7 @@ __attribute__((always_inline)) INLINE static double cooling_rate( const struct cooling_function_data* restrict cooling, struct part* restrict p, float dt) { - if (cooling->GrackleRedshift == -1) - error("TODO time dependant redshift"); + if (cooling->GrackleRedshift == -1) error("TODO time dependant redshift"); /* Get current internal energy (dt=0) */ double u_old = hydro_get_internal_energy(p); @@ -99,8 +97,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part( const struct cooling_function_data* restrict cooling, struct part* restrict p, struct xpart* restrict xp, float dt) { - if (dt == 0.) - return; + if (dt == 0.) return; /* Current du_dt */ const float hydro_du_dt = hydro_get_internal_energy_dt(p); @@ -237,7 +234,7 @@ static INLINE void cooling_print_backend( message("UVbackground = %d", cooling->UVbackground); message("GrackleRedshift = %g", cooling->GrackleRedshift); message("GrackleHSShieldingDensityThreshold = %g atom/cm3", - cooling->GrackleHSShieldingDensityThreshold); + cooling->GrackleHSShieldingDensityThreshold); } #endif /* SWIFT_COOLING_GRACKLE_H */ diff --git a/src/cooling/grackle/grackle_wrapper.c b/src/cooling/grackle/grackle_wrapper.c index 59705174adfbbb25b76f8f1d541ef1583d6b201b..9974717b670c937811cea54349124d9a38bed476 100644 --- a/src/cooling/grackle/grackle_wrapper.c +++ b/src/cooling/grackle/grackle_wrapper.c @@ -165,66 +165,63 @@ int wrap_do_cooling(double rho, double *u, double dt, double Z, double a_now) { return 1; } - void grackle_print_data() { message("Grackle Data:"); message("\t Data file: %s", grackle_data.grackle_data_file); message("\t With grackle: %i", grackle_data.use_grackle); message("\t With radiative cooling: %i", grackle_data.with_radiative_cooling); message("\t With UV background: %i", grackle_data.UVbackground); - message("\t With primordial chemistry: %i", grackle_data.primordial_chemistry); - message("\t Number temperature bins: %i", grackle_data.NumberOfTemperatureBins); - message("\t T = (%g, ..., %g)", - grackle_data.TemperatureStart, - grackle_data.TemperatureEnd); - + message("\t With primordial chemistry: %i", + grackle_data.primordial_chemistry); + message("\t Number temperature bins: %i", + grackle_data.NumberOfTemperatureBins); + message("\t T = (%g, ..., %g)", grackle_data.TemperatureStart, + grackle_data.TemperatureEnd); + message("Primordial Cloudy"); cloudy_print_data(grackle_data.cloudy_primordial, 1); - if (grackle_data.metal_cooling) - { - message("Metal Cooling"); - cloudy_print_data(grackle_data.cloudy_metal, 0); - } - + if (grackle_data.metal_cooling) { + message("Metal Cooling"); + cloudy_print_data(grackle_data.cloudy_metal, 0); + } + message("\t Gamma: %g", grackle_data.Gamma); /* UVB */ - if (grackle_data.UVbackground && - grackle_data.primordial_chemistry != 0) - { - struct UVBtable uvb = grackle_data.UVbackground_table; - long long N = uvb.Nz; - message("\t UV Background"); - message("\t\t Redshift from %g to %g with %lli steps", uvb.zmin, uvb.zmax, N); - message("\t\t z = (%g, ..., %g)", uvb.z[0], uvb.z[N-1]); - } + if (grackle_data.UVbackground && grackle_data.primordial_chemistry != 0) { + struct UVBtable uvb = grackle_data.UVbackground_table; + long long N = uvb.Nz; + message("\t UV Background"); + message("\t\t Redshift from %g to %g with %lli steps", uvb.zmin, uvb.zmax, + N); + message("\t\t z = (%g, ..., %g)", uvb.z[0], uvb.z[N - 1]); + } } -void cloudy_print_data(const cloudy_data c, const int print_mmw) -{ +void cloudy_print_data(const cloudy_data c, const int print_mmw) { long long N = c.data_size; message("\t Data size: %lli", N); message("\t Grid rank: %lli", c.grid_rank); char msg[200] = "\t Dimension: ("; - for (long long i = 0; i < c.grid_rank; i++) - { - char tmp[200] = "%lli%s"; - if (i == c.grid_rank - 1) - sprintf(tmp, tmp, c.grid_dimension[i], ")"); - else - sprintf(tmp, tmp, c.grid_dimension[i], ", "); - - strcat(msg, tmp); - } + for (long long i = 0; i < c.grid_rank; i++) { + char tmp[200] = "%lli%s"; + if (i == c.grid_rank - 1) + sprintf(tmp, tmp, c.grid_dimension[i], ")"); + else + sprintf(tmp, tmp, c.grid_dimension[i], ", "); + + strcat(msg, tmp); + } message("%s", msg); if (c.heating_data) - message("\t Heating: (%g, ..., %g)", c.heating_data[0], c.heating_data[N-1]); + message("\t Heating: (%g, ..., %g)", c.heating_data[0], + c.heating_data[N - 1]); if (c.cooling_data) - message("\t Cooling: (%g, ..., %g)", c.cooling_data[0], c.cooling_data[N-1]); + message("\t Cooling: (%g, ..., %g)", c.cooling_data[0], + c.cooling_data[N - 1]); if (c.mmw_data && print_mmw) - message("\t Mean molecular weigth: (%g, ..., %g)", c.mmw_data[0], c.mmw_data[N-1]); - + message("\t Mean molecular weigth: (%g, ..., %g)", c.mmw_data[0], + c.mmw_data[N - 1]); } - diff --git a/src/cooling/grackle/grackle_wrapper.h b/src/cooling/grackle/grackle_wrapper.h index 5ebae9ead1e95b27ec4109e5e3a7e804ffda66a3..10c8b793ccd7785e899a97b7602cd3995e42bb20 100644 --- a/src/cooling/grackle/grackle_wrapper.h +++ b/src/cooling/grackle/grackle_wrapper.h @@ -16,8 +16,8 @@ #include "config.h" #include "error.h" -#include <grackle.h> #include <chemistry_data.h> +#include <grackle.h> #include <math.h> #include <stdio.h> #include <stdlib.h>