chiark / gitweb /
added nlopt_force_stop termination
[nlopt.git] / luksan / pssubs.c
index 2096c198bd963fcee2b525e7caa8ea8ee7a8259e..cf7b1dbcb645d306bf313e029e814d8488103e3f 100644 (file)
@@ -894,6 +894,10 @@ void luksan_pyfut1__(int *n, double *f, double *fo, double *umax,
        d__1 = sqrt((fabs(*f))), d__2 = fabs(*f) / 10.;
        *fo = *f + min(d__1,d__2);
     }
+    if (nlopt_stop_forced(stop)) {
+       *iterm = -999;
+       return;
+    }
     if (*f <= stop->minf_max /* *tolb */) {
        *iterm = 3;
        return;