The cosinus product function – post-treatment with the discontinuous Galerkin method.
The cosinus product function – post-treatment with the discontinuous Galerkin method
int main(
int argc,
char**argv) {
space Xh = uh.get_space();
geo omega = Xh.get_geo();
size_t k = Xh.degree();
size_t d = omega.dimension();
space Vh (omega,
"P"+to_string(k));
Vh.block("boundary");
space Wh (omega[
"boundary"],
"P"+to_string(k));
space Xh1 (omega,
"P"+to_string(k+1)+
"d");
field eta_h = eh_star - eh;
Float err_linf = eh.max_abs();
Float err_star_linf = eh_star.max_abs();
Float eta_linf = eta_h.max_abs();
space G0h (omega,
"P0",
"vector");
space G1h (omega,
"P1",
"vector");
G1h.block("boundary");
field grad_eh_p1 (G1h, 0);
pm1v.solve(l1h, grad_eh_p1);
field grad_eta_h_p1 (G1h, 0);
pm1v.solve(l2h, grad_eta_h_p1);
derr << "err_l2 = " << err_l2 << endl
<< "eta_l2 = " << eta_l2 << endl
<< "err_star_l2 = " << err_star_l2 << endl
<< "err_linf = " << err_linf << endl
<< "eta_linf = " << eta_linf << endl
<< "err_star_linf = " << err_star_linf << endl
<< "err_h1 = " << err_h1 << endl
<< "eta_h1 = " << eta_h1 << endl
<< "err_star_h1 = " << err_star_h1 << endl;
dout <<
catchmark (
"grad_eta_h") << grad_eta_h_p1
;
}
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 geo page for the full documentation
see the problem page for the full documentation
see the catchmark page for the full documentation
see the environment page for the full documentation
see the integrate_option page for the full documentation
void set_family(family_type type)
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
The cosinus product function.
The cosinus product function – its gradient.
int main(int argc, char **argv)
rheolef::details::is_vec dot
This file is part of Rheolef.
std::enable_if< details::has_field_rdof_interface< Expr >::value, details::field_expr_v2_nonlinear_terminal_field< typenameExpr::scalar_type, typenameExpr::memory_type, details::differentiate_option::gradient > >::type grad(const Expr &expr)
grad(uh): see the expression page for the full documentation
field_basic< T, M > lazy_interpolate(const space_basic< T, M > &X2h, const field_basic< T, M > &u1h)
see the interpolate page for the full documentation
T norm2(const vec< T, M > &x)
norm2(x): 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< typenameExpr::scalar_type, typenameExpr::memory_type, details::differentiate_option::gradient > >::type grad_h(const Expr &expr)
grad_h(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
rheolef - reference manual