Skip to content
Snippets Groups Projects
Commit aad9e43b authored by lhausamm's avatar lhausamm Committed by Loic Hausammann
Browse files

Bug fix, log_all now update last_offset

parent 6f8fe075
No related branches found
No related tags found
1 merge request!502Logger
......@@ -177,17 +177,18 @@ int logger_size(unsigned int mask) {
/**
* @brief log all particles
*
* This function update the last_offset in #part
*
* @param p List of all the #part to log
* @param Np Number of particle to log
* @param dump The #dump in which to log the particle data
*/
void logger_log_all(const struct part *p, const long long Np, struct dump *dump) {
void logger_log_all(struct part *p, const long long Np, struct dump *dump) {
const unsigned int mask = logger_mask_x | logger_mask_v | logger_mask_a |
logger_mask_u | logger_mask_h | logger_mask_rho |
logger_mask_consts;
for(long long i=0; i < Np; i++) {
size_t offset = p[i].last_offset;
logger_log_part(&p[i], mask, &offset, dump);
logger_log_part(&p[i], mask, &p[i].last_offset, dump);
}
}
......
......@@ -120,7 +120,7 @@ extern const unsigned int logger_data_size[];
/* Function prototypes. */
int logger_size(unsigned int mask);
void logger_log_all(const struct part *p,
void logger_log_all(struct part *p,
const long long Np, struct dump *dump);
void logger_log_part(const struct part *p, const unsigned int mask, size_t *offset,
struct dump *dump);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment