stardis

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

commit 6457a43f42b7387fcca95a30269eb8156daa5b12
parent 40881d3cef159030137df9bb704b1b6fd51e898b
Author: Benjamin Piaud <benjamin.piaud@meso-star.com>
Date:   Wed,  9 May 2018 12:55:30 +0200

bug : ajout d'un fluide par défaut systématique

Diffstat:
Msrc/stardis-compute.c | 16+++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/stardis-compute.c b/src/stardis-compute.c @@ -432,16 +432,14 @@ stardis_compute(struct stardis* stardis, enum stardis_mode mode) /* create fluid for each hc boundary */ for (i=0; i<stardis->geometry.boundary_count; ++i){ + SDIS(data_create(dev, sizeof(struct fluid), ALIGNOF(struct fluid), NULL, &data)); + fluid_props = sdis_data_get(data); /* Fetch the allocated memory space */ + fluid_props->cp = 0; + fluid_props->rho = 0; + fluid_props->temperature = stardis->boundary[i].T; + SDIS(fluid_create(dev, &fluid_shader, data, sa_add(fluid_medium, 1))); + SDIS(data_ref_put(data)); if (stardis->boundary[i].hc > -1) { - - SDIS(data_create(dev, sizeof(struct fluid), ALIGNOF(struct fluid), NULL, &data)); - fluid_props = sdis_data_get(data); /* Fetch the allocated memory space */ - fluid_props->cp = 0; - fluid_props->rho = 0; - fluid_props->temperature = stardis->boundary[i].T; - SDIS(fluid_create(dev, &fluid_shader, data, sa_add(fluid_medium, 1))); - SDIS(data_ref_put(data)); - sa_push(bound2fluid, sa_size(fluid_medium)-1); } else { sa_push(bound2fluid, 0);