atrstm

Load and structure a combustion gas mixture
git clone git://git.meso-star.fr/atrstm.git
Log | Files | Refs | README | LICENSE

commit ae8c427fdaac180878646e87017394aeb908195a
parent d3c1d9fe5acc1f26afa7c7a8c4067ae485d29c2d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 15 Jan 2021 09:32:58 +0100

Add log messages during octree building

Diffstat:
Msrc/atrstm_build_octrees.c | 11+++++++++++
Msrc/atrstm_optprops.h | 2+-
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/atrstm_build_octrees.c b/src/atrstm_build_octrees.c @@ -27,6 +27,7 @@ #include <star/suvm.h> #include <star/svx.h> +#include <rsys/clock_time.h> #include <rsys/cstr.h> #include <rsys/dynamic_array_size_t.h> #include <rsys/morton.h> @@ -558,7 +559,9 @@ error: res_T build_octrees(struct atrstm* atrstm, const struct build_octrees_args* args) { + char buf[128]; struct atrri_refractive_index refract_id = ATRRI_REFRACTIVE_INDEX_NULL; + struct time t0, t1; struct pool* pools = NULL; size_t i; double wlen; @@ -588,6 +591,10 @@ build_octrees(struct atrstm* atrstm, const struct build_octrees_args* args) } } + log_info(atrstm, + "Evaluating and partitionning the field of optical properties.\n"); + time_current(&t0); + omp_set_nested(1); /* Enable nested threads for voxelize_volumetric_mesh */ #pragma omp parallel sections num_threads(2) { @@ -622,6 +629,10 @@ build_octrees(struct atrstm* atrstm, const struct build_octrees_args* args) } if(res != RES_OK) goto error; + time_sub(&t0, time_current(&t1), &t0); + time_dump(&t0, TIME_ALL, NULL, buf, sizeof(buf)); + log_info(atrstm, "Setup the partitionning data structures in %s\n", buf); + exit: if(pools) { FOR_EACH(i, 0, atrstm->nthreads) pool_release(pools+i); diff --git a/src/atrstm_optprops.h b/src/atrstm_optprops.h @@ -31,7 +31,7 @@ static const struct optprops OPTPROPS_NULL = OPTPROPS_NULL__; struct optprops_compute_args { double lambda; /* wavelength [nm] */ double n; /* Refractive index (real component) */ - double kappa; /* Refractive index (imaginary component */ + double kappa; /* Refractive index (imaginary component) */ double gyration_radius_prefactor; double fractal_dimension; double soot_volumic_fraction; /* In m^3(soot) / m^3 */