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

Documentation and formatting

parent 50d7590b
......@@ -521,19 +521,20 @@ int main(int argc, char *argv[]) {
int count = 0;
for (int l = 0; l < e.sched.nr_tasks; l++)
if (!e.sched.tasks[l].skip && !e.sched.tasks[l].implicit) {
fprintf(file_thread, " %03i %i %i %i %i %lli %lli %i %i %i %i %i\n",
myrank, e.sched.tasks[l].last_rid, e.sched.tasks[l].type,
e.sched.tasks[l].subtype, (e.sched.tasks[l].cj == NULL),
e.sched.tasks[l].tic, e.sched.tasks[l].toc,
(e.sched.tasks[l].ci != NULL) ? e.sched.tasks[l].ci->count
: 0,
(e.sched.tasks[l].cj != NULL) ? e.sched.tasks[l].cj->count
: 0,
(e.sched.tasks[l].ci != NULL) ? e.sched.tasks[l].ci->gcount
: 0,
(e.sched.tasks[l].cj != NULL) ? e.sched.tasks[l].cj->gcount
: 0,
e.sched.tasks[l].flags);
fprintf(
file_thread, " %03i %i %i %i %i %lli %lli %i %i %i %i %i\n",
myrank, e.sched.tasks[l].last_rid, e.sched.tasks[l].type,
e.sched.tasks[l].subtype, (e.sched.tasks[l].cj == NULL),
e.sched.tasks[l].tic, e.sched.tasks[l].toc,
(e.sched.tasks[l].ci != NULL) ? e.sched.tasks[l].ci->count
: 0,
(e.sched.tasks[l].cj != NULL) ? e.sched.tasks[l].cj->count
: 0,
(e.sched.tasks[l].ci != NULL) ? e.sched.tasks[l].ci->gcount
: 0,
(e.sched.tasks[l].cj != NULL) ? e.sched.tasks[l].cj->gcount
: 0,
e.sched.tasks[l].flags);
fflush(stdout);
count++;
}
......@@ -552,8 +553,8 @@ int main(int argc, char *argv[]) {
FILE *file_thread;
file_thread = fopen(dumpfile, "w");
/* Add some information to help with the plots */
fprintf(file_thread, " %i %i %i %i %lli %lli %i %i %i %lli\n", -2, -1, -1, 1,
e.tic_step, e.toc_step, 0, 0, 0, cpufreq);
fprintf(file_thread, " %i %i %i %i %lli %lli %i %i %i %lli\n", -2, -1, -1,
1, e.tic_step, e.toc_step, 0, 0, 0, cpufreq);
for (int l = 0; l < e.sched.nr_tasks; l++)
if (!e.sched.tasks[l].skip && !e.sched.tasks[l].implicit)
fprintf(
......
......@@ -35,11 +35,8 @@
* @param ti_old Integer start of time-step
* @param ti_current Integer end of time-step
*/
__attribute__((always_inline)) INLINE static void drift_gpart(struct gpart* gp,
float dt,
double timeBase,
int ti_old,
int ti_current) {
__attribute__((always_inline)) INLINE static void drift_gpart(
struct gpart* gp, float dt, double timeBase, int ti_old, int ti_current) {
/* Drift... */
gp->x[0] += gp->v_full[0] * dt;
gp->x[1] += gp->v_full[1] * dt;
......@@ -61,12 +58,9 @@ __attribute__((always_inline)) INLINE static void drift_gpart(struct gpart* gp,
* @param ti_old Integer start of time-step
* @param ti_current Integer end of time-step
*/
__attribute__((always_inline)) INLINE static void drift_part(struct part* p,
struct xpart* xp,
float dt,
double timeBase,
int ti_old,
int ti_current) {
__attribute__((always_inline))
INLINE static void drift_part(struct part* p, struct xpart* xp, float dt,
double timeBase, int ti_old, int ti_current) {
/* Useful quantity */
const float h_inv = 1.0f / p->h;
......
......@@ -1840,7 +1840,7 @@ void engine_collect_kick(struct cell *c) {
* @brief Collects the next time-step by making each super-cell recurse
* to collect the minimal of ti_end and the number of updated particles.
*
* @param The #engine.
* @param e The #engine.
*/
void engine_collect_timestep(struct engine *e) {
......
......@@ -83,8 +83,8 @@ __attribute__((always_inline)) INLINE static void hydro_write_particles(
writeArray(h_grp, fileName, xmfFile, partTypeGroupName, "SmoothingLength",
FLOAT, N, 1, parts, N_total, mpi_rank, offset, h, us,
UNIT_CONV_LENGTH);
writeArray(h_grp, fileName, xmfFile, partTypeGroupName, "Entropy",
FLOAT, N, 1, parts, N_total, mpi_rank, offset, entropy, us,
writeArray(h_grp, fileName, xmfFile, partTypeGroupName, "Entropy", FLOAT, N,
1, parts, N_total, mpi_rank, offset, entropy, us,
UNIT_CONV_ENTROPY_PER_UNIT_MASS);
writeArray(h_grp, fileName, xmfFile, partTypeGroupName, "ParticleIDs",
ULONGLONG, N, 1, parts, N_total, mpi_rank, offset, id, us,
......
......@@ -301,7 +301,8 @@ int main(int argc, char *argv[]) {
/* Help users... */
message("Smoothing length: h = %f", h * size);
message("Kernel: %s", kernel_name);
message("Neighbour target: N = %f", h * h * h * 4.0 * M_PI * kernel_gamma3 / 3.0);
message("Neighbour target: N = %f",
h * h * h * 4.0 * M_PI * kernel_gamma3 / 3.0);
message("Density target: rho = %f", rho);
message("div_v target: div = %f", vel == 2 ? 3.f : 0.f);
message("curl_v target: curl = [0., 0., %f]", vel == 3 ? -2.f : 0.f);
......
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