stardis-solver

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

commit b23ec1cb998c44e4cc63ab453eba9ca9f72eae66
parent 24ef62e51ac0f268ae4333da1b8045b1f1404564
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Wed, 16 May 2018 16:02:58 +0200

Workaround a VC bug

Diffstat:
Msrc/test_sdis_conducto_radiative.c | 18+++++++++---------
Msrc/test_sdis_conducto_radiative_2d.c | 20++++++++++----------
2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/test_sdis_conducto_radiative.c b/src/test_sdis_conducto_radiative.c @@ -179,7 +179,7 @@ solid_get_delta_boundary /******************************************************************************* * Interface ******************************************************************************/ -struct interface { +struct interfac { double temperature; double convection_coef; double emissivity; @@ -191,7 +191,7 @@ interface_get_temperature (const struct sdis_interface_fragment* frag, struct sdis_data* data) { CHK(data != NULL && frag != NULL); - return ((const struct interface*)sdis_data_cget(data))->temperature; + return ((const struct interfac*)sdis_data_cget(data))->temperature; } static double @@ -199,7 +199,7 @@ interface_get_convection_coef (const struct sdis_interface_fragment* frag, struct sdis_data* data) { CHK(data != NULL && frag != NULL); - return ((const struct interface*)sdis_data_cget(data))->convection_coef; + return ((const struct interfac*)sdis_data_cget(data))->convection_coef; } static double @@ -207,7 +207,7 @@ interface_get_emissivity (const struct sdis_interface_fragment* frag, struct sdis_data* data) { CHK(data != NULL && frag != NULL); - return ((const struct interface*)sdis_data_cget(data))->emissivity; + return ((const struct interfac*)sdis_data_cget(data))->emissivity; } static double @@ -215,7 +215,7 @@ interface_get_specular_fraction (const struct sdis_interface_fragment* frag, struct sdis_data* data) { CHK(data != NULL && frag != NULL); - return ((const struct interface*)sdis_data_cget(data))->specular_fraction; + return ((const struct interfac*)sdis_data_cget(data))->specular_fraction; } /******************************************************************************* @@ -226,7 +226,7 @@ create_interface (struct sdis_device* dev, struct sdis_medium* front, struct sdis_medium* back, - const struct interface* interf, + const struct interfac* interf, struct sdis_interface** out_interf) { struct sdis_interface_shader shader = SDIS_INTERFACE_SHADER_NULL; @@ -248,9 +248,9 @@ create_interface shader.back.specular_fraction = interface_get_specular_fraction; } - CHK(sdis_data_create(dev, sizeof(struct interface), ALIGNOF(struct interface), + CHK(sdis_data_create(dev, sizeof(struct interfac), ALIGNOF(struct interfac), NULL, &data) == RES_OK); - *((struct interface*)sdis_data_get(data)) = *interf; + *((struct interfac*)sdis_data_get(data)) = *interf; CHK(sdis_interface_create(dev, front, back, &shader, data, out_interf) == RES_OK); CHK(sdis_data_ref_put(data) == RES_OK); @@ -263,7 +263,7 @@ int main(int argc, char** argv) { struct mem_allocator allocator; - struct interface interf; + struct interfac interf; struct geometry geom; struct sdis_data* data = NULL; struct sdis_device* dev = NULL; diff --git a/src/test_sdis_conducto_radiative_2d.c b/src/test_sdis_conducto_radiative_2d.c @@ -160,7 +160,7 @@ solid_get_delta_boundary /******************************************************************************* * Interface ******************************************************************************/ -struct interface { +struct interfac { double convection_coef; struct { double temperature; @@ -169,7 +169,7 @@ struct interface { } front, back; }; -static const struct interface INTERFACE_NULL = { +static const struct interfac INTERFACE_NULL = { 0, {-1, -1, -1}, {-1, -1, -1} }; @@ -177,7 +177,7 @@ static double interface_get_temperature (const struct sdis_interface_fragment* frag, struct sdis_data* data) { - const struct interface* interf; + const struct interfac* interf; double T = -1; CHK(data != NULL && frag != NULL); interf = sdis_data_cget(data); @@ -193,7 +193,7 @@ static double interface_get_convection_coef (const struct sdis_interface_fragment* frag, struct sdis_data* data) { - const struct interface* interf; + const struct interfac* interf; CHK(data != NULL && frag != NULL); interf = sdis_data_cget(data); return interf->convection_coef; @@ -203,7 +203,7 @@ static double interface_get_emissivity (const struct sdis_interface_fragment* frag, struct sdis_data* data) { - const struct interface* interf; + const struct interfac* interf; double e = -1; CHK(data != NULL && frag != NULL); interf = sdis_data_cget(data); @@ -219,7 +219,7 @@ static double interface_get_specular_fraction (const struct sdis_interface_fragment* frag, struct sdis_data* data) { - const struct interface* interf; + const struct interfac* interf; double f = -1; CHK(data != NULL && frag != NULL); interf = sdis_data_cget(data); @@ -239,7 +239,7 @@ create_interface (struct sdis_device* dev, struct sdis_medium* front, struct sdis_medium* back, - const struct interface* interf, + const struct interfac* interf, struct sdis_interface** out_interf) { struct sdis_interface_shader shader = SDIS_INTERFACE_SHADER_NULL; @@ -263,9 +263,9 @@ create_interface shader.back.emissivity = interface_get_emissivity; shader.back.specular_fraction = interface_get_specular_fraction; } - CHK(sdis_data_create(dev, sizeof(struct interface), ALIGNOF(struct interface), + CHK(sdis_data_create(dev, sizeof(struct interfac), ALIGNOF(struct interfac), NULL, &data) == RES_OK); - *((struct interface*)sdis_data_get(data)) = *interf; + *((struct interfac*)sdis_data_get(data)) = *interf; CHK(sdis_interface_create(dev, front, back, &shader, data, out_interf) == RES_OK); CHK(sdis_data_ref_put(data) == RES_OK); @@ -278,7 +278,7 @@ int main(int argc, char** argv) { struct mem_allocator allocator; - struct interface interf; + struct interfac interf; struct geometry geom; struct ssp_rng* rng = NULL; struct sdis_scene* scn = NULL;