stardis-solver

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

commit b938696bb35be14e90c748a2bb5935c9a62c9d40
parent 8dd5763566836e2fcadb949f49f44eab39e428e1
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  8 Mar 2019 10:48:41 +0100

Upd the POWER_TERM_NULL and FLUX_TERM_NULL constants

Diffstat:
Msrc/sdis_green.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/sdis_green.c b/src/sdis_green.c @@ -37,14 +37,14 @@ struct power_term { unsigned id; /* Identifier of the medium of the term */ }; -#define POWER_TERM_NULL__ {INF, UINT_MAX} +#define POWER_TERM_NULL__ {DBL_MAX, UINT_MAX} +static const struct power_term POWER_TERM_NULL = POWER_TERM_NULL__; static INLINE void power_term_init(struct mem_allocator* allocator, struct power_term* term) { - struct power_term power_term_null = POWER_TERM_NULL__; ASSERT(term); (void)allocator; - *term = power_term_null; + *term = POWER_TERM_NULL; } /* Generate the dynamic array of power terms */ @@ -58,14 +58,14 @@ struct flux_term { unsigned id; /* Id of the interface of the flux term */ enum sdis_side side; }; -#define FLUX_TERM_NULL__ {INF, UINT_MAX, SDIS_SIDE_NULL__} +#define FLUX_TERM_NULL__ {DBL_MAX, UINT_MAX, SDIS_SIDE_NULL__} +static const struct flux_term FLUX_TERM_NULL = FLUX_TERM_NULL__; static INLINE void flux_term_init(struct mem_allocator* allocator, struct flux_term* term) { - const struct flux_term flux_term_null = FLUX_TERM_NULL__; ASSERT(term); (void)allocator; - *term = flux_term_null; + *term = FLUX_TERM_NULL; } /* Generate the dynamic array of flux terms */