CCIntegr.hpp File Reference

Quadrature of integrals of type $ \int_\Omega f(x, u(x)) dx$, where $\Omega = [0, 1]^d$ and $u$ is given by a cell-centered grid function. $u$ is considered to be constant over every cell. In every cell, the product gaussian quadrature is used. More...

#include "gaussweights.hpp"
#include "MultiArray.hpp"
#include "SGrid.hpp"

Include dependency graph for CCIntegr.hpp:


Classes

class  CC_Integral< T, Integrand >
 Integration as an interpolation class (for the sparse grids). More...

Functions

template<typename T, class Integrand>
CC_Gauss_Integrate (Integrand &kernel, int index, MultiIndex &I, double *xi, MultiArray< T > &u, int n_points)
 The auxiliary recursive function.
template<typename T, class Integrand>
CC_Gauss_Integrate (Integrand &kernel, MultiArray< T > &u, int n_points=1)
 Integration of a scalar function.

Detailed Description

Quadrature of integrals of type $ \int_\Omega f(x, u(x)) dx$, where $\Omega = [0, 1]^d$ and $u$ is given by a cell-centered grid function. $u$ is considered to be constant over every cell. In every cell, the product gaussian quadrature is used.

Date:
Nov. 16, 2005 - created

Function Documentation

template<typename T, class Integrand>
T CC_Gauss_Integrate ( Integrand &  kernel,
MultiArray< T > &  u,
int  n_points = 1 
) [inline]

Integration of a scalar function.

The quadrature procedure is implemented as template depending on the class 'Integrand' that specifies 'f'. If possible, 'f' should be implemented as an inline function. The class should contain the following fields:

Note:
Note that dim may be less than the dimensionality of 'u'. Then 'f' depends on the vector (or the subgridfunction) indexed by the first dim indices in 'u'. But 'f' must return a scalar value of the type 'T'.
Parameters:
[in] kernel The integrand
[in] u The grid function to integrate
[in] n_points Number of the gaussian points in every direction

template<typename T, class Integrand>
T CC_Gauss_Integrate ( Integrand &  kernel,
int  index,
MultiIndex I,
double *  xi,
MultiArray< T > &  u,
int  n_points 
) [inline]

The auxiliary recursive function.

Parameters:
[in] kernel The integrand
[in] index Number of the index
[in] I The multi-index of the cell
[in] xi The coordinates of the 'lower left' corner of the cell
[in] u The grid function to integrate
[in] n_points Number of the gaussian points in every direction


Generated on Fri Sep 21 12:32:56 2007 for SG2 by  doxygen 1.5.2