star-4v_s

An invariant property of diffuse random walks
git clone git://git.meso-star.fr/star-4v_s.git
Log | Files | Refs | README | LICENSE

commit 599db8933fd4b84e254fd34a7fa99537343c5056
parent 84540b42fb0a9d0106fe58277f70665db3fc6382
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Thu, 21 Apr 2016 12:33:27 +0200

BugFix (reject #realization<=0 and fix auto-cancel detection)

Diffstat:
Msrc/s4vs.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/s4vs.c b/src/s4vs.c @@ -94,7 +94,7 @@ compute_4v_s(struct s3d_scene* scene, const size_t max_steps, const double ks) /* Print the simulation results */ SMC(estimator_get_status(estimator, &estimator_status)); - if(estimator_status.NF >= integrator.max_failures) { + if(estimator_status.NF > integrator.max_failures) { fprintf(stderr, "Too many failures (%lu). The scene might not match the prerequisites:\n" "it must be closed and its normals must point *into* the volume.\n", @@ -177,7 +177,7 @@ main(int argc, char* argv[]) /* Set number of realizations */ if(argc >= 3) { res = cstr_to_ulong(argv[2], &nsteps); - if(res != RES_OK) { + if(nsteps <= 0 || res != RES_OK) { fprintf(stderr, "Invalid number of steps `%s'\n", argv[2]); goto error; }