|
Packit |
67cb25 |
/* integration/qk15.c
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* This program is free software; you can redistribute it and/or modify
|
|
Packit |
67cb25 |
* it under the terms of the GNU General Public License as published by
|
|
Packit |
67cb25 |
* the Free Software Foundation; either version 3 of the License, or (at
|
|
Packit |
67cb25 |
* your option) any later version.
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* This program is distributed in the hope that it will be useful, but
|
|
Packit |
67cb25 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
67cb25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
67cb25 |
* General Public License for more details.
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* You should have received a copy of the GNU General Public License
|
|
Packit |
67cb25 |
* along with this program; if not, write to the Free Software
|
|
Packit |
67cb25 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
Packit |
67cb25 |
*/
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#include <config.h>
|
|
Packit |
67cb25 |
#include <gsl/gsl_integration.h>
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
/* Gauss quadrature weights and kronrod quadrature abscissae and
|
|
Packit |
67cb25 |
weights as evaluated with 80 decimal digit arithmetic by
|
|
Packit |
67cb25 |
L. W. Fullerton, Bell Labs, Nov. 1981. */
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
static const double xgk[8] = /* abscissae of the 15-point kronrod rule */
|
|
Packit |
67cb25 |
{
|
|
Packit |
67cb25 |
0.991455371120812639206854697526329,
|
|
Packit |
67cb25 |
0.949107912342758524526189684047851,
|
|
Packit |
67cb25 |
0.864864423359769072789712788640926,
|
|
Packit |
67cb25 |
0.741531185599394439863864773280788,
|
|
Packit |
67cb25 |
0.586087235467691130294144838258730,
|
|
Packit |
67cb25 |
0.405845151377397166906606412076961,
|
|
Packit |
67cb25 |
0.207784955007898467600689403773245,
|
|
Packit |
67cb25 |
0.000000000000000000000000000000000
|
|
Packit |
67cb25 |
};
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
/* xgk[1], xgk[3], ... abscissae of the 7-point gauss rule.
|
|
Packit |
67cb25 |
xgk[0], xgk[2], ... abscissae to optimally extend the 7-point gauss rule */
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
static const double wg[4] = /* weights of the 7-point gauss rule */
|
|
Packit |
67cb25 |
{
|
|
Packit |
67cb25 |
0.129484966168869693270611432679082,
|
|
Packit |
67cb25 |
0.279705391489276667901467771423780,
|
|
Packit |
67cb25 |
0.381830050505118944950369775488975,
|
|
Packit |
67cb25 |
0.417959183673469387755102040816327
|
|
Packit |
67cb25 |
};
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
static const double wgk[8] = /* weights of the 15-point kronrod rule */
|
|
Packit |
67cb25 |
{
|
|
Packit |
67cb25 |
0.022935322010529224963732008058970,
|
|
Packit |
67cb25 |
0.063092092629978553290700663189204,
|
|
Packit |
67cb25 |
0.104790010322250183839876322541518,
|
|
Packit |
67cb25 |
0.140653259715525918745189590510238,
|
|
Packit |
67cb25 |
0.169004726639267902826583426598550,
|
|
Packit |
67cb25 |
0.190350578064785409913256402421014,
|
|
Packit |
67cb25 |
0.204432940075298892414161999234649,
|
|
Packit |
67cb25 |
0.209482141084727828012999174891714
|
|
Packit |
67cb25 |
};
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
void
|
|
Packit |
67cb25 |
gsl_integration_qk15 (const gsl_function * f, double a, double b,
|
|
Packit |
67cb25 |
double *result, double *abserr,
|
|
Packit |
67cb25 |
double *resabs, double *resasc)
|
|
Packit |
67cb25 |
{
|
|
Packit |
67cb25 |
double fv1[8], fv2[8];
|
|
Packit |
67cb25 |
gsl_integration_qk (8, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc);
|
|
Packit |
67cb25 |
}
|
|
Packit |
67cb25 |
|