summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2017-09-29 09:34:52 +0100
committerDominic Steinitz <dominic@steinitz.org>2017-09-29 09:34:52 +0100
commit9b2ba8469df6158713c960d5b971508d8144d5b3 (patch)
treeef2d135ad840a1d872f3bf96034f40c7f5b3f8cd /packages
parent1000d04cccec05a4db2323e9c4ee2700dfb03dda (diff)
Print errors to stderr
Diffstat (limited to 'packages')
-rw-r--r--packages/gsl/src/Numeric/GSL/gsl-ode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/gsl/src/Numeric/GSL/gsl-ode.c b/packages/gsl/src/Numeric/GSL/gsl-ode.c
index 72c8617..4e24cb6 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
@@ -180,11 +180,11 @@ int ode(int method, int control, double h,
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 printf ("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 }