Commit f849e58a authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Documentation fixes and restored default configuration file.

parent f22a6a40
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
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