Rheolef  7.2
an efficient C++ finite element environment
stokes_dirichlet_dg.icc
Go to the documentation of this file.
1 void stokes_dirichlet_dg (const space& Xh, const space& Qh,
26  form& a, form& b, form& c, form& mp, field& lh, field& kh,
27  integrate_option iopt = integrate_option())
28 {
29  size_t k = Xh.degree();
30  size_t d = Xh.get_geo().dimension();
31  Float beta = (k+1)*(k+d)/Float(d);
32  trial u (Xh), p (Qh);
33  test v (Xh), q (Qh);
34  a = integrate (2*ddot(Dh(u),Dh(v)), iopt)
35  + integrate ("sides", beta*penalty()*dot(jump(u),jump(v))
36  - 2*dot(jump(u),average(Dh(v)*normal()))
37  - 2*dot(jump(v),average(Dh(u)*normal())), iopt);
38  lh = integrate (dot(f(),v), iopt)
39  + integrate ("boundary", beta*penalty()*dot(g(),v)
40  - 2*dot(g(),Dh(v)*normal()), iopt);
41  b = integrate (dot(u,grad_h(q)), iopt)
42  + integrate ("internal_sides", - dot(average(u),normal())*jump(q), iopt);
43  kh = integrate ("boundary", dot(g(),normal())*q, iopt);
44  c = integrate ("internal_sides", h_local()*jump(p)*jump(q), iopt);
45  mp = integrate (p*q, iopt);
46 }
u_exact g
field lh(Float epsilon, Float t, const test &v)
see the Float page for the full documentation
see the field page for the full documentation
see the form page for the full documentation
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
point u(const point &x)
rheolef::details::is_vec dot
details::field_expr_v2_nonlinear_terminal_function< details::h_local_pseudo_function< Float > > h_local()
h_local: see the expression page for the full documentation
std::enable_if< details::has_field_rdof_interface< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::gradient >>::type Dh(const Expr &expr)
Dh(uh): see the expression page for the full documentation.
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
std::enable_if< details::has_field_rdof_interface< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::gradient >>::type grad_h(const Expr &expr)
grad_h(uh): see the expression page for the full documentation
T ddot(const tensor_basic< T > &a, const tensor_basic< T > &b)
ddot(x,y): see the expression page for the full documentation
Definition: tensor.cc:278
details::field_expr_v2_nonlinear_terminal_function< details::penalty_pseudo_function< Float > > penalty()
penalty(): see the expression page for the full documentation
details::field_expr_v2_nonlinear_terminal_function< details::normal_pseudo_function< Float > > normal()
normal: see the expression page for the full documentation
Float beta[][pmax+1]
void stokes_dirichlet_dg(const space &Xh, const space &Qh, form &a, form &b, form &c, form &mp, field &lh, field &kh, integrate_option iopt=integrate_option())
Definition: sphere.icc:25
Definition: leveque.h:25