tClean up syntax and generalize zbrent error message - cngf-pf - continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
 (HTM) git clone git://src.adamsgaard.dk/cngf-pf
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d3dd6416013640e619858fa52b4d8199d21b2cda
 (DIR) parent 0ba336be66e2f93501bf13a1b054d07fc48c3889
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Thu,  2 Apr 2020 08:22:52 +0000
       
       Clean up syntax and generalize zbrent error message
       
       Diffstat:
         M max_depth_simple_shear.c            |       7 ++++---
       
       1 file changed, 4 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/max_depth_simple_shear.c b/max_depth_simple_shear.c
       t@@ -76,14 +76,15 @@ double zbrent(double d_s,
                int iter;
                double a, b, c, d, e, min1, min2, fa, fb, fc, p, q, r, s, tol1, xm;
        
       -        e = NAN;
       -        a = x1; b=x2; c=x2;
       +        a = x1;
       +        b = x2;
       +        c = x2;
                fa = (*f)(d_s, a);
                fb = (*f)(d_s, b);
        
                if ((fa > 0.0 && fb > 0.0) || (fa < 0.0 && fb < 0.0)) {
                        fprintf(stderr,
       -                                "error: %s: no root of stress gradient in range %g,%g m\n",
       +                                "error: %s: no root in range %g,%g m\n",
                                        __func__, x1, x2);
                        exit(1);
                }