Commit 79563c51 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Applied code formatting script.

parent 2f5943e8
...@@ -2683,7 +2683,8 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs, ...@@ -2683,7 +2683,8 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs,
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
/* Mark the first time step in the particle logger file. */ /* Mark the first time step in the particle logger file. */
logger_log_timestamp(e->logger, e->ti_current, e->time, &e->logger->timestamp_offset); logger_log_timestamp(e->logger, e->ti_current, e->time,
&e->logger->timestamp_offset);
/* Make sure that we have enough space in the particle logger file /* Make sure that we have enough space in the particle logger file
* to store the particles in current time step. */ * to store the particles in current time step. */
logger_ensure_size(e->logger, e->total_nr_parts, e->total_nr_gparts, 0); logger_ensure_size(e->logger, e->total_nr_parts, e->total_nr_gparts, 0);
...@@ -2940,7 +2941,8 @@ void engine_step(struct engine *e) { ...@@ -2940,7 +2941,8 @@ void engine_step(struct engine *e) {
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
/* Mark the current time step in the particle logger file. */ /* Mark the current time step in the particle logger file. */
logger_log_timestamp(e->logger, e->ti_current, e->time, &e->logger->timestamp_offset); logger_log_timestamp(e->logger, e->ti_current, e->time,
&e->logger->timestamp_offset);
/* Make sure that we have enough space in the particle logger file /* Make sure that we have enough space in the particle logger file
* to store the particles in current time step. */ * to store the particles in current time step. */
logger_ensure_size(e->logger, e->total_nr_parts, e->total_nr_gparts, 0); logger_ensure_size(e->logger, e->total_nr_parts, e->total_nr_gparts, 0);
......
...@@ -375,7 +375,7 @@ void logger_log_gpart(struct logger *log, const struct gpart *p, ...@@ -375,7 +375,7 @@ void logger_log_gpart(struct logger *log, const struct gpart *p,
* (return) offset of this log. * (return) offset of this log.
*/ */
void logger_log_timestamp(struct logger *log, integertime_t timestamp, void logger_log_timestamp(struct logger *log, integertime_t timestamp,
double time, size_t *offset) { double time, size_t *offset) {
struct dump *dump = log->dump; struct dump *dump = log->dump;
/* Start by computing the size of the message. */ /* Start by computing the size of the message. */
...@@ -830,8 +830,8 @@ int logger_read_gpart(struct gpart *p, size_t *offset, const char *buff) { ...@@ -830,8 +830,8 @@ int logger_read_gpart(struct gpart *p, size_t *offset, const char *buff) {
* *
* @return The mask containing the values read. * @return The mask containing the values read.
*/ */
int logger_read_timestamp(unsigned long long int *t, double *time, size_t *offset, int logger_read_timestamp(unsigned long long int *t, double *time,
const char *buff) { size_t *offset, const char *buff) {
/* Jump to the offset. */ /* Jump to the offset. */
buff = &buff[*offset]; buff = &buff[*offset];
......
...@@ -172,15 +172,16 @@ void logger_log_gpart(struct logger *log, const struct gpart *p, ...@@ -172,15 +172,16 @@ void logger_log_gpart(struct logger *log, const struct gpart *p,
unsigned int mask, size_t *offset); unsigned int mask, size_t *offset);
void logger_init(struct logger *log, struct swift_params *params); void logger_init(struct logger *log, struct swift_params *params);
void logger_clean(struct logger *log); void logger_clean(struct logger *log);
void logger_log_timestamp(struct logger *log, integertime_t t, double time, size_t *offset); void logger_log_timestamp(struct logger *log, integertime_t t, double time,
size_t *offset);
void logger_ensure_size(struct logger *log, size_t total_nr_parts, void logger_ensure_size(struct logger *log, size_t total_nr_parts,
size_t total_nr_gparts, size_t total_nr_sparts); size_t total_nr_gparts, size_t total_nr_sparts);
void logger_write_file_header(struct logger *log, const struct engine *e); void logger_write_file_header(struct logger *log, const struct engine *e);
int logger_read_part(struct part *p, size_t *offset, const char *buff); int logger_read_part(struct part *p, size_t *offset, const char *buff);
int logger_read_gpart(struct gpart *p, size_t *offset, const char *buff); int logger_read_gpart(struct gpart *p, size_t *offset, const char *buff);
int logger_read_timestamp(unsigned long long int *t, double *time, size_t *offset, int logger_read_timestamp(unsigned long long int *t, double *time,
const char *buff); size_t *offset, const char *buff);
void logger_parameters_init(struct logger_parameters *log_params); void logger_parameters_init(struct logger_parameters *log_params);
void logger_parameters_clean(struct logger_parameters *log_params); void logger_parameters_clean(struct logger_parameters *log_params);
......
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