stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

commit 13b15a9236e5e673075cea69ebc6eb78b741e67b
parent e733b36cc141500a8634a0ecd38cef410ebf54bd
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri,  1 May 2020 11:36:23 +0200

Fix dump of heat paths

Diffstat:
Msrc/stardis-output.c | 22++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/stardis-output.c b/src/stardis-output.c @@ -196,16 +196,7 @@ dump_path fprintf(stream, "%zu", vcount); FOR_EACH(i, 0, vcount) fprintf(stream, " %zu", i); fprintf(stream, "\n"); - fprintf(stream, "POINT_DATA %zu\n", vcount); - /* Write the type of the random walk vertices */ - fprintf(stream, "SCALARS Vertex_Type unsigned_char 1\n"); - fprintf(stream, "LOOKUP_TABLE default\n"); - FOR_EACH(i, 0, vcount) { - struct sdis_heat_vertex vtx; - ERR(sdis_heat_path_get_vertex(path, i, &vtx)); - ASSERT((size_t)vtx.type <= UCHAR_MAX); - fprintf(stream, "%d\n", vtx.type); - } + /* Write path type */ fprintf(stream, "CELL_DATA %d\n", 1); fprintf(stream, "SCALARS Path_Type unsigned_char 1\n"); @@ -216,6 +207,17 @@ dump_path case SDIS_HEAT_PATH_FAILURE: fprintf(stream, "1\n"); break; default: FATAL("Unreachable code.\n"); break; } + + fprintf(stream, "POINT_DATA %zu\n", vcount); + /* Write the type of the random walk vertices */ + fprintf(stream, "SCALARS Vertex_Type unsigned_char 1\n"); + fprintf(stream, "LOOKUP_TABLE default\n"); + FOR_EACH(i, 0, vcount) { + struct sdis_heat_vertex vtx; + ERR(sdis_heat_path_get_vertex(path, i, &vtx)); + ASSERT((size_t)vtx.type <= UCHAR_MAX); + fprintf(stream, "%d\n", vtx.type); + } /* Write the weights of the random walk vertices */ fprintf(stream, "SCALARS Weight double 1\n"); fprintf(stream, "LOOKUP_TABLE default\n");