25int main(
int argc,
char**argv) {
27 Float tol = (argc > 1) ? atof(argv[1]) : 1e-10;
32 const space& Xh = uh.get_space();
33 const geo& omega = Xh.get_geo();
34 space Qh (omega,
"P1");
41 field m_ru = a*uh + b.trans_mult(ph);
44 m_ru[
"top"] = 0; m_ru[
"bottom"] = 0;
46 if (Xh.get_geo().dimension() == 3) {
47 m_ru[1][
"left"] = 0; m_ru[1][
"right"] = 0;
48 m_ru[
"front"] = 0; m_ru[
"back"] = 0;
50 m_ru[
"left"] = 0; m_ru[
"right"] = 0;
55 Float res_u = m_ru.u().max_abs();
56 Float res_p = sqrt(mp(rp,rp));
57 Float res = max(res_u, res_p);
59 derr <<
"check: residue(uh) = " << res_u << endl
60 <<
"check: residue(ph) = " << res_p << endl
61 <<
"check: residue = " << res << endl
62 <<
"m(p,1) = " << p_constant << endl;
63 return (res <= tol) ? 0 : 1;
The driven cavity benchmark: 2D boundary conditions.
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 space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
#define warning_macro(message)
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 D(const Expr &expr)
D(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
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::divergence > >::type div(const Expr &expr)
div(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