Rheolef  7.1
an efficient C++ finite element environment
integrate_numeric.icc
Go to the documentation of this file.
1 #ifndef _RHEO_INTEGRATE_INTERNAL_ICC
2 #define _RHEO_INTEGRATE_INTERNAL_ICC
3 #include "rheolef/geo_domain.h"
24 #include "rheolef/integrate.h"
25 namespace rheolef { namespace details{
26 
27 // ----------------------------------------------
28 // numeric integration
29 // ----------------------------------------------
30 
31 template <class T, class M, class Expr>
32 T
33 integrate_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 }
43 template <class T, class M, class Expr>
44 typename rheolef::field_nonlinear_expr<Expr>::scalar_type
45 integrate_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
rheolef::geo_basic
generic mesh with rerefence counting
Definition: geo.h:1089
rheolef::details::integrate_internal
T integrate_internal(const geo_basic< T, M > &omega, const rheolef::field_nonlinear_expr< Expr > &f, const quadrature_option &qopt, const T &)
Definition: integrate_numeric.icc:33
rheolef::integrate
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:202
rheolef::space_basic
the finite element space
Definition: space.h:352
rheolef::dual
rheolef::std enable_if ::type dual const Expr1 expr1, const Expr2 expr2 dual(const Expr1 &expr1, const Expr2 &expr2)
Definition: field_expr.h:260
rheolef::field_basic
Definition: field.h:235
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
test
see the test page for the full documentation
rheolef::scalar_type
typename scalar_traits< value_type >::type scalar_type
Definition: field_expr_recursive.h:500
rheolef::details::integrate_numeric
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)
Definition: integrate_numeric.icc:45
f
Definition: cavity_dg.h:29
rheolef::quadrature_option
integrate_option quadrature_option
Definition: integrate_option.h:186
T
Expr1::float_type T
Definition: field_expr.h:261