diff --git a/src/const.h b/src/const.h index b5485f22e3f5fdf2f06b73184fb4ab0b05256190..6d97634360a1fd5fcbbc2ef329bef926971d3768 100644 --- a/src/const.h +++ b/src/const.h @@ -36,8 +36,7 @@ /* Time integration constants. */ #define const_max_u_change 0.1f -/* Thermal energy per unit mass to use as a constant when using an isothermal - * EoS */ +/* Thermal energy per unit mass used as a constant for the isothermal EoS */ #define const_isothermal_internal_energy 20.2615290634f /* Dimensionality of the problem */ @@ -51,8 +50,8 @@ //#define HYDRO_GAMMA_2_1 /* Equation of state choice */ -//#define EOS_IDEAL_GAS -#define EOS_ISOTHERMAL_GAS +#define EOS_IDEAL_GAS +//#define EOS_ISOTHERMAL_GAS /* Kernel function to use */ #define CUBIC_SPLINE_KERNEL @@ -74,9 +73,9 @@ #define const_gravity_eta 0.025f /* External gravity properties */ -//#define EXTERNAL_POTENTIAL_POINTMASS +#define EXTERNAL_POTENTIAL_POINTMASS //#define EXTERNAL_POTENTIAL_ISOTHERMALPOTENTIAL -#define EXTERNAL_POTENTIAL_DISK_PATCH +//#define EXTERNAL_POTENTIAL_DISK_PATCH /* Add viscuous force to gas particles to speed-up glass making for disk-patch * ICs */ //#define EXTERNAL_POTENTIAL_DISK_PATCH_ICS diff --git a/src/gravity/Default/gravity.h b/src/gravity/Default/gravity.h index 59acac991c3d7bc8f8f70e99253c941720e0e8f8..d9326579f4dff88677ce8c53f0b95f5f0ca03462 100644 --- a/src/gravity/Default/gravity.h +++ b/src/gravity/Default/gravity.h @@ -129,12 +129,13 @@ __attribute__((always_inline)) INLINE static void gravity_end_force( * * This function only branches towards the potential chosen by the user. * + * @param time The current time in internal units. * @param potential The properties of the external potential. * @param phys_const The physical constants in internal units. * @param gp The particle to act upon. */ __attribute__((always_inline)) INLINE static void external_gravity( - const double time, const struct external_potential* potential, + double time, const struct external_potential* potential, const struct phys_const* const phys_const, struct gpart* gp) { #ifdef EXTERNAL_POTENTIAL_POINTMASS diff --git a/src/potentials.c b/src/potentials.c index 7be7d48bc046f11179a683705a60a21e017c8a90..0f656ed544f59e875f149b4a552671c29c2f4c7c 100644 --- a/src/potentials.c +++ b/src/potentials.c @@ -29,12 +29,13 @@ * of units. * * @param parameter_file The parsed parameter file + * @param phys_const Physical constants in internal units * @param us The current internal system of units * @param potential The external potential properties to initialize */ void potential_init(const struct swift_params* parameter_file, - const struct phys_const* const phys_const, - struct UnitSystem* us, + const struct phys_const* phys_const, + const struct UnitSystem* us, struct external_potential* potential) { #ifdef EXTERNAL_POTENTIAL_POINTMASS diff --git a/src/potentials.h b/src/potentials.h index dc3bdac3d0f150d662de3d3dd20993ae4abd6813..cfc8b52ee245c8c0038514b5e3c96d09b6d2c99b 100644 --- a/src/potentials.h +++ b/src/potentials.h @@ -162,9 +162,6 @@ external_gravity_disk_patch_potential( G_newton; /* returned acceleraton is multiplied by G later on */ if (dz < 0) g->a_grav[2] += z_accel / G_newton; - if (abs(g->id_or_neg_offset) == 1) - message(" time= %e, rf= %e, az= %e", time, reduction_factor, g->a_grav[2]); - #ifdef EXTERNAL_POTENTIAL_DISK_PATCH_ICS /* TT: add viscous drag */ g->a_grav[0] -= g->v_full[0] / (2 * t_dyn) / G_newton; @@ -179,7 +176,8 @@ external_gravity_disk_patch_potential( #ifdef EXTERNAL_POTENTIAL_ISOTHERMALPOTENTIAL /** - * @brief Computes the time-step due to the acceleration from a point mass + * @brief Computes the time-step due to the acceleration from an isothermal + * potential. * * @param potential The #external_potential used in the run. * @param phys_const The physical constants in internal units. @@ -213,9 +211,7 @@ external_gravity_isothermalpotential_timestep( } /** - * @brief Computes the gravitational acceleration of a particle due to a - * point - * mass + * @brief Computes the gravitational acceleration from an isothermal potential. * * Note that the accelerations are multiplied by Newton's G constant * later on. @@ -315,8 +311,8 @@ __attribute__((always_inline)) INLINE static void external_gravity_pointmass( /* Now, some generic functions, defined in the source file */ void potential_init(const struct swift_params* parameter_file, - const struct phys_const* const phys_const, - struct UnitSystem* us, + const struct phys_const* phys_const, + const struct UnitSystem* us, struct external_potential* potential); void potential_print(const struct external_potential* potential);