commit 1fd853b0f9f9dc59e81c03394c66713d7a7cb8a7
parent 9e5615fd9013e87f183c234ccb3f6b8bea166d7a
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Thu, 24 Sep 2020 16:23:50 +0200
Manage time range and add it to outputs
Diffstat:
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/green-input.c b/src/green-input.c
@@ -107,6 +107,9 @@ read_green_function
FR(&green->ambient_temp, 1);
FR(&green->ref_temp, 1);
+ /* Read time range */
+ FR(&green->time_range, 2);
+
/* Read samples*/
green->samples = MEM_CALLOC(green->allocator, green->counts.ok_count,
sizeof(*green->samples));
diff --git a/src/green-output.c b/src/green-output.c
@@ -251,8 +251,14 @@ dump_green_info
fprintf(stream, "<h2>Formula of the Monte-Carlo estimate</h2>\n");
- fprintf(stream, "<p>The Monte-Carlo estimate of the Green function of the "
- "system is as follows:</p>\n");
+ if(green->time_range[0] == green->time_range[1])
+ fprintf(stream, "<p>The Monte-Carlo estimate of the Green function of the "
+ "system at t=%g is as follows:</p>\n",
+ green->time_range[0]);
+ else
+ fprintf(stream, "<p>The Monte-Carlo estimate of the Green function of the "
+ "system with t in [%g %g] is as follows:</p>\n",
+ SPLIT2(green->time_range));
/* Print result */
fst = 1;
diff --git a/src/green-types.h b/src/green-types.h
@@ -266,6 +266,7 @@ struct green {
char* names_pool;
struct description* descriptions;
double ambient_temp, ref_temp;
+ double time_range[2];
struct table_elt* table;
struct sample* samples;
int references_checked, unused_variables, unknown_variables;