stardis-solver

Solve coupled heat transfers
git clone git://git.meso-star.fr/stardis-solver.git
Log | Files | Refs | README | LICENSE

commit b1eb2d77703a47936c389217f0fb56fa3a9cef4d
parent 2ee2022a912bf5dcbb642afc4ae9a2ba9581dd17
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 29 Jun 2020 15:59:40 +0200

Fix an invalid memory read

Diffstat:
Msrc/sdis_realisation_Xd.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/sdis_realisation_Xd.h b/src/sdis_realisation_Xd.h @@ -81,10 +81,10 @@ XD(compute_temperature) * boundary. Indeed, one knows the "right" type of the first vertex only * after the boundary_path execution that defines the sub path to resolve * from the submitted boundary position. Note that if the boundary - * temperature is know, the type is let as it. */ - if(heat_vtx && !T->done) { - if(heat_path_get_last_vertex(ctx->heat_path) != heat_vtx) { - /* Path was reinjected into a solid */ + * temperature is known, the type is let as it. */ + if(heat_vtx && !T->done && T->func != XD(boundary_path)) { + heat_vtx = heat_path_get_last_vertex(ctx->heat_path); + if(T->func == XD(conductive_path)) { heat_vtx->type = SDIS_HEAT_VERTEX_CONDUCTION; } else if(T->func == XD(convective_path)) { heat_vtx->type = SDIS_HEAT_VERTEX_CONVECTION;