stardis

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

commit ad9c3229096cb3d789b9915ea53b203a8ac104f5
parent c4b9db7759b49a0a21d16a4ccd37bffee8219f3f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed,  5 Apr 2023 09:16:44 +0200

Assign default values when defining device arguments

The arguments for creating the device are grouped in a structure that
was not initialized when it was defined; each of its member variables
was explicitly defined one by one by Stardis. Therefore, an update to
this structure that would add new member variables would lead to the
creation of a Stardis-Solver device using uninitialized data. This
commit corrects this problem by initializing the input arguments to the
device creation with the constant SDIS_DEVICE_CREATE_ARGS_DEFAULT.

Diffstat:
Msrc/stardis-app.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stardis-app.c b/src/stardis-app.c @@ -217,7 +217,7 @@ stardis_init struct str str; unsigned i, vcount, tcount, ocount, count; int is_for_compute; - struct sdis_device_create_args dev_args; + struct sdis_device_create_args dev_args = SDIS_DEVICE_CREATE_ARGS_DEFAULT; ASSERT(args && logger && allocator && stardis);