Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
integrate_numeric.icc
Go to the documentation of this file.
1#ifndef _RHEO_INTEGRATE_INTERNAL_ICC
2#define _RHEO_INTEGRATE_INTERNAL_ICC
23#include "rheolef/geo_domain.h"
24#include "rheolef/integrate.h"
25namespace rheolef { namespace details{
26
27// ----------------------------------------------
28// numeric integration
29// ----------------------------------------------
30
31template <class T, class M, class Expr>
32T
33integrate_internal (const geo_basic<T,M>& omega, const rheolef::field_nonlinear_expr<Expr>& f, const quadrature_option& qopt, const T&)
34{
35 if (omega.map_dimension() < omega.get_background_geo().map_dimension()) {
36 omega.get_background_geo().neighbour_guard();
37 }
38 space_basic<T,M> Xh (omega, "P0");
39 test v (Xh);
40 field_basic<T,M> lh = integrate (omega, f*v, qopt);
41 return dual (1, lh);
42}
43template <class T, class M, class Expr>
44typename rheolef::field_nonlinear_expr<Expr>::scalar_type
45integrate_numeric (const geo_basic<T,M>& omega, const rheolef::field_nonlinear_expr<Expr>& f, const quadrature_option& qopt)
46{
47 typedef typename rheolef::field_nonlinear_expr<Expr>::scalar_type scalar_type;
48 return integrate_internal (omega, f, qopt, scalar_type());
49}
50
51}}// namespace rheolef::details
52#endif // _RHEO_INTEGRATE_INTERNAL_ICC
field lh(Float epsilon, Float t, const test &v)
generic mesh with rerefence counting
Definition geo.h:1089
the finite element space
Definition space.h:382
see the test page for the full documentation
Expr1::float_type T
Definition field_expr.h:230
rheolef::field_nonlinear_expr< Expr >::scalar_type integrate_numeric(const geo_basic< T, M > &omega, const rheolef::field_nonlinear_expr< Expr > &f, const quadrature_option &qopt)
T integrate_internal(const geo_basic< T, M > &omega, const rheolef::field_nonlinear_expr< Expr > &f, const quadrature_option &qopt, const T &)
This file is part of Rheolef.
rheolef::std enable_if ::type dual const Expr1 expr1, const Expr2 expr2 dual(const Expr1 &expr1, const Expr2 &expr2)
Definition field_expr.h:229
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&!is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition integrate.h:211
Definition cavity_dg.h:29