TP Intégration Numérique
 All Files Functions
quad.c File Reference

Composite quadrature rules for numerical integration. More...

#include "mesh1D.h"

Go to the source code of this file.

Functions

double quadPM (double(*f)(double), double *X, int N, double h)
 Numerical integration using composite midpoints rules.
 
double quadPMAlloc (double(*f)(double), double a, double b, int N, double *ph)
 Numerical integration using composite midpoints rules.
 

Detailed Description

Composite quadrature rules for numerical integration.

Author
F. Cuvelier
Version
0.1
Date
18th November 2013

Definition in file quad.c.

Function Documentation

double quadPM ( double(*)(double)  f,
double *  X,
int  N,
double  h 
)

Numerical integration using composite midpoints rules.

Parameters
[in]ffunction to integrate
[in]Nnumber of points of the regular dicretization
[in]Xpointer to the regular discretization
[in]hstep value of the discretization.
Returns
the approximation of the integrale over discretization using composite midpoints rules
See Also
DisReg DisRegAlloc

Definition at line 11 of file quad.c.

quadPMAlloc ( double(*)(double)  f,
double  a,
double  b,
int  N,
double *  ph 
)

Numerical integration using composite midpoints rules.

Parameters
[in]ffunction to integrate
[in]alower bound of the interval [a,b]
[in]bupper bound of the interval [a,b]
[in]Nnumber of points of the regular dicretization
[out]*phstep value of the discretization.
Returns
the approximation of the integrale over [a,b] using composite midpoints rules

Definition at line 21 of file quad.c.