commit 96c0d9f93955ae7f6fc9953e99799d078661b28c
parent bfdc09d41434d972d7dde47fc2b44322ee58096b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Sat, 13 Apr 2024 12:18:19 +0200
Fix green path output
Commit 764c443 introduces a bug when writing the end of sampled paths
used for green function estimation, optionally displayed after the
binary green function. This commit corrects this problem.
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/stardis-output.c b/src/stardis-output.c
@@ -691,6 +691,9 @@ dump_sample_end(struct sdis_green_path* path, void* ctx)
d__ = sdis_data_get(data);
id = d__->desc_id;
CHK(DESC_IS_T(descs+id) || DESC_IS_H(descs+id));
+ /* End, End ID, X, Y, Z, Elapsed time */
+ fprintf(stream, "%s, %u, %g, %g, %g, %g\n",
+ str_cget(get_description_name(descs + id)), id, SPLIT3(pos), elapsed);
break;
}
case SDIS_GREEN_PATH_END_IN_VOLUME:
@@ -710,12 +713,12 @@ dump_sample_end(struct sdis_green_path* path, void* ctx)
ASSERT(!(*psolid)->is_outside); /* FIXME: what if in external solid? */
id = (*psolid)->desc_id;
}
+ /* End, End ID, X, Y, Z, Elapsed time */
+ fprintf(stream, "%s, %u, %g, %g, %g, %g\n",
+ str_cget(get_description_name(descs + id)), id, SPLIT3(pos), elapsed);
break;
default: FATAL("Unreachable code.\n"); break;
}
- /* End, End ID, X, Y, Z, Elapsed time */
- fprintf(stream, "%s, %u, %g, %g, %g, %g\n",
- str_cget(get_description_name(descs + id)), id, SPLIT3(pos), elapsed);
end:
return res;