diff options
author | Alberto Ruiz <aruiz@um.es> | 2017-09-29 15:39:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 15:39:13 +0200 |
commit | d4a9e39ba919ec2c0c04f02d4cc511c9dd900ca7 (patch) | |
tree | c490aef1cbaecd484d81f4d25ff04310f14778e9 /packages/gsl | |
parent | 1000d04cccec05a4db2323e9c4ee2700dfb03dda (diff) | |
parent | 4fa4dd4c80f7fcd94f31ae1bb82bef7d1b3bb0f8 (diff) |
Merge pull request #240 from idontgetoutmuch/alberto
Print errors to stderr
Diffstat (limited to 'packages/gsl')
-rw-r--r-- | packages/gsl/src/Numeric/GSL/gsl-ode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/gsl/src/Numeric/GSL/gsl-ode.c b/packages/gsl/src/Numeric/GSL/gsl-ode.c index 72c8617..84626d9 100644 --- a/packages/gsl/src/Numeric/GSL/gsl-ode.c +++ b/packages/gsl/src/Numeric/GSL/gsl-ode.c | |||
@@ -40,9 +40,9 @@ int ode(int method, int control, double h, | |||
40 | case 5 : {T = gsl_odeiv_step_rk2imp; break; } | 40 | case 5 : {T = gsl_odeiv_step_rk2imp; break; } |
41 | case 6 : {T = gsl_odeiv_step_rk4imp; break; } | 41 | case 6 : {T = gsl_odeiv_step_rk4imp; break; } |
42 | case 7 : {T = gsl_odeiv_step_bsimp; break; } | 42 | case 7 : {T = gsl_odeiv_step_bsimp; break; } |
43 | case 8 : { printf("Sorry: ODE rk1imp not available in this GSL version\n"); exit(0); } | 43 | case 8 : { fprintf(stderr, "Sorry: ODE rk1imp not available in this GSL version\n"); exit(0); } |
44 | case 9 : { printf("Sorry: ODE msadams not available in this GSL version\n"); exit(0); } | 44 | case 9 : { fprintf(stderr, "Sorry: ODE msadams not available in this GSL version\n"); exit(0); } |
45 | case 10: { printf("Sorry: ODE msbdf not available in this GSL version\n"); exit(0); } | 45 | case 10: { fprintf(stderr, "Sorry: ODE msbdf not available in this GSL version\n"); exit(0); } |
46 | default: ERROR(BAD_CODE); | 46 | default: ERROR(BAD_CODE); |
47 | } | 47 | } |
48 | 48 | ||
@@ -179,12 +179,12 @@ int ode(int method, int control, double h, | |||
179 | 179 | ||
180 | if (status != GSL_SUCCESS) { | 180 | if (status != GSL_SUCCESS) { |
181 | int k; | 181 | int k; |
182 | printf ("error in ode, return value=%d\n", status); | 182 | fprintf(stderr, "error in ode, return value=%d\n", status); |
183 | printf("last successful values are:\n"); | 183 | fprintf(stderr, "last successful values are:\n"); |
184 | printf("t = %.5e\n", t); | 184 | fprintf(stderr, "t = %.5e\n", t); |
185 | for (k=0; k < xin; k++) | 185 | for (k=0; k < xin; k++) |
186 | { | 186 | { |
187 | printf("y[%d] = %.5e\n", k, y[k]); | 187 | fprintf(stderr, "y[%d] = %.5e\n", k, y[k]); |
188 | } | 188 | } |
189 | break; | 189 | break; |
190 | } | 190 | } |