commit 303c49c7f78ce8d8be28468dc8b77e8079135196
parent f4190330022779ce1a4984e5464ae31a658d1afb
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Thu, 14 Oct 2021 17:47:50 +0200
Remove dead code linked to DESC_BOUND_T_FOR_FLUID removal
Diffstat:
4 files changed, 11 insertions(+), 34 deletions(-)
diff --git a/doc/stardis-output.5.txt b/doc/stardis-output.5.txt
@@ -309,9 +309,6 @@ _______
struct t_boundary {
struct str name;
- double emissivity;
- double specular_fraction;
- double hc;
double imposed_temperature;
unsigned mat_id;
};
@@ -338,7 +335,6 @@ _______
DESC_MAT_FLUID,
DESC_BOUND_H_FOR_FLUID,
DESC_BOUND_H_FOR_SOLID,
- DESC_BOUND_T_FOR_FLUID,
DESC_BOUND_T_FOR_SOLID,
DESC_BOUND_F_FOR_SOLID,
DESC_SOLID_FLUID_CONNECT,
@@ -975,4 +971,4 @@ _______
*stardis*(1),
*stardis-input*(5),
-*htrdr-image*(5)
-\ No newline at end of file
+*htrdr-image*(5)
diff --git a/src/stardis-app.h b/src/stardis-app.h
@@ -75,10 +75,7 @@ enum properties_conflict_t {
BOUND_H_FOR_SOLID_BETWEEN_2_DEFS,
BOUND_H_FOR_SOLID_BETWEEN_2_UNDEFS,
BOUND_H_FOR_SOLID_ENCLOSING_FLUID,
- BOUND_T_FOR_FLUID_BETWEEN_2_DEFS,
- BOUND_T_FOR_FLUID_BETWEEN_2_UNDEFS,
- BOUND_T_FOR_FLUID_ENCLOSING_SOLID,
- BOUND_T_FOR_SOLID_BETWEEN_2_DEFS,
+ BOUND_T_FOR_SOLID_BETWEEN_2_DEFS = 10,
BOUND_T_FOR_SOLID_BETWEEN_2_UNDEFS,
BOUND_T_FOR_SOLID_ENCLOSING_FLUID,
BOUND_F_FOR_SOLID_BETWEEN_2_DEFS,
@@ -254,9 +251,6 @@ cp_h_boundary(struct h_boundary* dst, const struct h_boundary* src)
struct t_boundary {
struct str name;
- double emissivity;
- double specular_fraction;
- double hc;
double imposed_temperature;
unsigned mat_id;
};
@@ -265,9 +259,6 @@ static FINLINE void
init_t(struct mem_allocator* allocator, struct t_boundary* dst)
{
str_init(allocator, &dst->name);
- dst->emissivity = 0;
- dst->specular_fraction = 0;
- dst->hc = 0;
dst->imposed_temperature = -1;
dst->mat_id = UINT_MAX;
}
@@ -281,14 +272,12 @@ release_t_boundary(struct t_boundary* bound)
static res_T
str_print_t_boundary
(struct str* str,
- const struct t_boundary* b,
- const enum description_type type)
+ const struct t_boundary* b)
{
res_T res = RES_OK;
ASSERT(str && b && DESC_IS_T(type));
- STR_APPEND_PRINTF(str, "T boundary for %s '%s': T=%g ",
- ARG3( (type == DESC_BOUND_T_FOR_SOLID ? "solid" : "fluid"),
- str_cget(&b->name), b->imposed_temperature ) );
+ STR_APPEND_PRINTF(str, "T boundary for solid '%s': T=%g ",
+ ARG2( str_cget(&b->name), b->imposed_temperature ) );
STR_APPEND_PRINTF(str, "(using medium %u as external medium)",
ARG1( b->mat_id ) );
@@ -301,9 +290,6 @@ error:
static FINLINE res_T
cp_t_boundary(struct t_boundary* dst, const struct t_boundary* src)
{
- dst->emissivity = src->emissivity;
- dst->specular_fraction = src->specular_fraction;
- dst->hc = src->hc;
dst->imposed_temperature = src->imposed_temperature;
dst->mat_id = src->mat_id;
return str_copy(&dst->name, &src->name);
@@ -534,7 +520,7 @@ str_print_description
ERR(str_print_fluid(str, &desc->d.fluid));
break;
case DESC_BOUND_T_FOR_SOLID:
- ERR(str_print_t_boundary(str, &desc->d.t_boundary, desc->type));
+ ERR(str_print_t_boundary(str, &desc->d.t_boundary));
break;
case DESC_BOUND_H_FOR_SOLID:
case DESC_BOUND_H_FOR_FLUID:
diff --git a/src/stardis-intface.c b/src/stardis-intface.c
@@ -275,13 +275,11 @@ create_intface
/* The imposed T is for the 2 sides (until there is contact resistances) */
interface_shader.front.temperature = interface_get_temperature;
interface_shader.back.temperature = interface_get_temperature;
- if(connect->type == DESC_BOUND_T_FOR_SOLID) {
- /* Set emissivity to 1 to allow radiative paths comming from
- * a possible external fluid to 'see' the imposed T */
- ASSERT(fluid_side_shader);
- fluid_side_shader->emissivity = interface_get_emissivity;
- interface_props->emissivity = 1;
- }
+ /* Set emissivity to 1 to allow radiative paths comming from
+ * a possible external fluid to 'see' the imposed T */
+ ASSERT(fluid_side_shader);
+ fluid_side_shader->emissivity = interface_get_emissivity;
+ interface_props->emissivity = 1;
ASSERT(connect->d.t_boundary.imposed_temperature >= 0);
interface_props->imposed_temperature
= connect->d.t_boundary.imposed_temperature;
diff --git a/src/stardis-output.c b/src/stardis-output.c
@@ -982,8 +982,6 @@ dump_green_ascii
FOR_EACH(i, 0, szd) {
const struct description* desc = descs + i;
const struct t_boundary* bd;
- if(desc->type != DESC_BOUND_T_FOR_SOLID)
- continue;
bd = &desc->d.t_boundary;
fprintf(stream, "%u\t%s\t%g\n",
i, str_cget(&bd->name), bd->imposed_temperature);