Rheolef  7.2
an efficient C++ finite element environment
mosolov_error_yield_surface.cc
Go to the documentation of this file.
1
25#include "rheolef.h"
26using namespace rheolef;
27using namespace std;
29Float delta (Float f, Float g) { return (f*g >= 0) ? 0 : 1; }
30int main(int argc, char**argv) {
31 environment rheolef (argc,argv);
32 Float tol = (argc > 1) ? atof(argv[1]) : 1e-15;
33 Float Bi;
34 field sigma_h;
35 din >> catchmark("Bi") >> Bi
36 >> catchmark("sigma") >> sigma_h;
37 space Th = sigma_h.get_space();
38 geo omega = Th.get_geo();
40 iopt.set_family(integrate_option::gauss);
41 iopt.set_order(4*(Th.degree()+1));
42 Float err_ys_l1 = integrate (omega,
43 compose(delta, norm(sigma_h)-Bi, norm(sigma())-Bi), iopt);
44 dout << "err_ys_l1 = " << err_ys_l1 << endl;
45 return err_ys_l1 < tol ? 0 : 1;
46}
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 catchmark page for the full documentation
Definition: catchmark.h:67
see the environment page for the full documentation
Definition: environment.h:121
see the integrate_option page for the full documentation
void set_family(family_type type)
see the space page for the full documentation
int main(int argc, char **argv)
Float delta(Float f, Float g)
The Mossolov problem for a circular pipe – exact solution.
class rheolef::details::field_expr_v2_nonlinear_node_unary compose
This file is part of Rheolef.
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
T norm(const vec< T, M > &x)
norm(x): see the expression page for the full documentation
Definition: vec.h:387
STL namespace.
rheolef - reference manual
Definition: cavity_dg.h:29
Definition: cavity_dg.h:25