PLUTO
4.4-patch2
|
Collection of handy numerical math tools. More...
#include "pluto.h"
Functions | |
double | GaussQuadrature (double(*func)(double, void *), void *par, double xb, double xe, int nstep, int order) |
This file provides a number of standard numerical routines to achieve simple basic tasks such as
double GaussQuadrature | ( | double(*)(double, void *) | func, |
void * | par, | ||
double | xb, | ||
double | xe, | ||
int | nstep, | ||
int | order | ||
) |
Perform numerical quadrature of the function f(x) between the lower bound xb and upper bound xe by subdividing the interval into 'nstep' steps. A 3 or 5-point Gaussian quadrature rule is used depending on the input variable order (=3 or =5)
[in] | *func | a pointer to the function func(x) (returning double) to be integrated |
[in] | xb | the lower interval bound |
[in] | xe | the upper interval bound |
[in] | nstep | the number of sub-intervals into which the original interval [xb,xe] has to be divided |
[in] | order | the number of Gaussian points (only 3 or 5) |