commit c55239be13b18fd224915c5f18ad54a010948f24
parent 328f21a1dbdc39944358681151e5fcfa23464bfa
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 26 Mar 2024 16:35:47 +0100
Correct test on initial condition
Since commit 938eb33c, time can be negative, but some tests still check
that it is positive. This commit corrects these old checks.
Diffstat:
1 file changed, 0 insertions(+), 30 deletions(-)
diff --git a/src/sdis_medium_c.h b/src/sdis_medium_c.h
@@ -111,16 +111,6 @@ DEFINE_MDM_CHK_PROP_FUNC(fluid, calorific_capacity, 0, INF, 0, 1)
DEFINE_MDM_CHK_PROP_FUNC(fluid, volumic_mass, 0, INF, 0, 1)
DEFINE_MDM_CHK_PROP_FUNC(fluid, temperature, 0, INF, 1, 1)
-static INLINE res_T
-fluid_check_t0(struct sdis_device* dev, const double t0)
-{
- if(t0 < 0) {
- log_err(dev, "invalid negative initial time '%g'.\n", t0);
- return RES_BAD_ARG;
- }
- return RES_OK;
-}
-
DEFINE_MDM_GET_PROP_FUNC(fluid, calorific_capacity)
DEFINE_MDM_GET_PROP_FUNC(fluid, volumic_mass)
DEFINE_MDM_GET_PROP_FUNC(fluid, temperature)
@@ -151,12 +141,6 @@ fluid_check_properties
CHK_PROP(calorific_capacity, props->cp);
#undef CHK_PROP
- /* Do not check the temperature. An invalid temperature means that the
- * temperature is unknown */
-
- res = fluid_check_t0(dev, props->t0);
- if(res != RES_OK) return res;
-
return RES_OK;
}
@@ -183,16 +167,6 @@ DEFINE_MDM_CHK_PROP_FUNC(solid, delta, 0, INF, 0, 1)
DEFINE_MDM_CHK_PROP_FUNC(solid, volumic_power, -INF, INF, 1, 1)
DEFINE_MDM_CHK_PROP_FUNC(solid, temperature, 0, INF, 1, 1)
-static INLINE res_T
-solid_check_t0(struct sdis_device* dev, const double t0)
-{
- if(t0 < 0) {
- log_err(dev, "invalid negative initial time '%g'.\n", t0);
- return RES_BAD_ARG;
- }
- return RES_OK;
-}
-
DEFINE_MDM_GET_PROP_FUNC(solid, calorific_capacity)
DEFINE_MDM_GET_PROP_FUNC(solid, thermal_conductivity)
DEFINE_MDM_GET_PROP_FUNC(solid, volumic_mass)
@@ -214,7 +188,6 @@ static INLINE double
solid_get_t0(const struct sdis_medium* mdm)
{
ASSERT(mdm && mdm->type == SDIS_SOLID);
- ASSERT(0 <= mdm->shader.solid.t0 && mdm->shader.solid.t0 < INF);
return mdm->shader.solid.t0;
}
@@ -242,9 +215,6 @@ solid_check_properties
/* Do not check the temperature. An invalid temperature means that the
* temperature is unknown */
- res = solid_check_t0(dev, props->t0);
- if(res != RES_OK) return res;
-
return RES_OK;
}