[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Integration routine qawc
From: |
Silke Diedenhofen |
Subject: |
[Help-gsl] Integration routine qawc |
Date: |
Thu, 10 Nov 2005 10:13:47 +0100 |
Hello!
I have another problem using the integration routine qawc:
gsl: ../integration/qawc.c:213: ERROR: maximum number of subdivisions reached
Default GSL error handler invoked.
abnormal program termination
and this is the part of the sourcecode, where the integration is performed:
double f (double y, void * params) {
double Wg = *(double *) params;
double omega_0 = *(double *) params;
double h_quer = *(double *) params;
double theta_1 = *(double *) params;
double tmp_7 = *(double *) params;
double tmp_6_1 = *(double *) params;
double tmp_6_2 = *(double *) params;
double theta_2 = *(double *) params;
double f = (tmp_7/sqrt(y))*(tmp_6_1*(sqrt(theta_1) *
(pow(gsl_sf_airy_Ai_deriv((Wg-h_quer*sqrt(y))/(h_quer * theta_1),
GSL_PREC_DOUBLE), 2)- (Wg-(h_quer*sqrt(y)))/(h_quer * theta_1) *
pow(gsl_sf_airy_Ai((Wg-(h_quer*sqrt(y)))/(h_quer * theta_1),
GSL_PREC_DOUBLE),2))-sqrt(sqrt(y)-(2*PI*C/0.00000087))/PI) + tmp_6_2 *
(sqrt(theta_2)*(pow(gsl_sf_airy_Ai_deriv((Wg-(h_quer*sqrt(y)))/(h_quer *
theta_2), GSL_PREC_DOUBLE), 2)- (Wg-(h_quer*sqrt(y)))/(h_quer * theta_2) *
pow(gsl_sf_airy_Ai((Wg-(h_quer*sqrt(y)))/(h_quer * theta_2),
GSL_PREC_DOUBLE),2))-sqrt(sqrt(y)-(2*PI*C/0.00000087))/PI));
return f; }
gsl_integration_workspace * w = gsl_integration_workspace_alloc (100000);
gsl_function F;
F.function = &f;
F.params = &Wg, &omega_0, &h_quer, &theta_1, &tmp_7, &tmp_6_1,
&tmp_6_2, &theta_2;
gsl_integration_qawc (&F, omega_g, 7.24e30, omega_0, 0, 1e-3, 10000, w,
&result, &error);
What do I have to change to do this integration?
Thank you!
Silke