PLUTO
|
Collection of handy numerical math tools. More...
#include "pluto.h"
Go to the source code of this file.
Functions | |
double | GaussQuadrature (double(*func)(double), double xb, double xe, int nstep, int order) |
Collection of handy numerical math tools.
This file provides a number of standard numerical routines to achieve simple basic tasks such as
Definition in file math_quadrature.c.
double GaussQuadrature | ( | double(*)(double) | func, |
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) |
Definition at line 20 of file math_quadrature.c.