table of contents
integrate(4rheolef) | rheolef-6.1 | integrate(4rheolef) |
NAME¶
integrate - integrate a functionDESCRIPTION¶
Integrate a function over a domain by using a quadrature formulae.SYNOPSYS¶
template <class T, class M, class Function>
T integrate (const geo_basic<T,M>& g, Function f, quadrature_option_type qopt)
EXAMPLE¶
Float f(const point& x); ... Float value = integrate (omega, f, quadrature_option);An optional argument specifies the quadrature formulae used
for the computation of the integral.
IMPLEMENTATION¶
template <class T, class M, class Function> T integrate (const geo_basic<T,M>& g, Function f, const quadrature_option_type& qopt) { space_basic<T,M> Xh (g, "P0"); field_basic<T,M> int_K_f_dx = riesz (Xh, f, qopt); return dot (1, int_K_f_dx); }
rheolef-6.1 | rheolef-6.1 |