Rheolef
7.1
an efficient C++ finite element environment
mosolov_error_yield_surface.cc
The Mossolov problem for a circular pipe – error analysis for the yield surface
#include "
rheolef.h
"
using namespace
rheolef
;
using namespace
std
;
#include "
mosolov_exact_circle.h
"
Float
delta
(
Float
f
,
Float
g
) {
return
(
f
*
g
>= 0) ? 0 : 1; }
int
main
(
int
argc,
char
**argv) {
environment
rheolef
(argc,argv);
Float
tol = (argc > 1) ? atof(argv[1]) : 1e-15;
Float
Bi;
field
sigma_h;
din
>>
catchmark
(
"Bi"
) >> Bi
>>
catchmark
(
"sigma"
) >> sigma_h;
space
Th = sigma_h.get_space();
geo
omega = Th.get_geo();
integrate_option
iopt;
iopt.
set_family
(
integrate_option::gauss
);
iopt.
set_order
(4*(Th.degree()+1));
Float
err_ys_l1 =
integrate
(omega,
compose
(
delta
,
norm
(sigma_h)-Bi,
norm
(
sigma
())-Bi), iopt);
dout
<<
"err_ys_l1 = "
<< err_ys_l1 << endl;
return
err_ys_l1 < tol ? 0 : 1;
}
rheolef::catchmark
see the catchmark page for the full documentation
Definition:
catchmark.h:67
rheolef::integrate_option::set_order
void set_order(size_t r)
Definition:
integrate_option.h:254
field
see the field page for the full documentation
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
space
see the space page for the full documentation
rheolef::norm
T norm(const vec< T, M > &x)
norm(x): see the expression page for the full documentation
Definition:
vec.h:387
rheolef.h
rheolef - reference manual
rheolef::integrate_option
see the integrate_option page for the full documentation
Definition:
integrate_option.h:125
rheolef::integrate_option::gauss
@ gauss
Definition:
integrate_option.h:132
rheolef::din
idiststream din
see the diststream page for the full documentation
Definition:
diststream.h:427
rheolef::environment
see the environment page for the full documentation
Definition:
environment.h:115
sigma
Definition:
mosolov_exact_circle.h:40
rheolef
This file is part of Rheolef.
Definition:
compiler_eigen.h:37
Float
see the Float page for the full documentation
rheolef::integrate_option::set_family
void set_family(family_type type)
Definition:
integrate_option.h:260
rheolef::compose
details::field_expr_v2_nonlinear_node_nary< typename details::function_traits< Function >::functor_type,typename details::field_expr_v2_nonlinear_terminal_wrapper_traits< Exprs >::type... > ::type compose(const Function &f, const Exprs &... exprs)
see the compose page for the full documentation
Definition:
compose.h:246
g
Definition:
cavity_dg.h:25
main
int main(int argc, char **argv)
Definition:
mosolov_error_yield_surface.cc:30
rheolef::dout
odiststream dout(cout)
see the diststream page for the full documentation
Definition:
diststream.h:430
mosolov_exact_circle.h
The Mossolov problem for a circular pipe – exact solution.
f
Definition:
cavity_dg.h:29
rheolef::std
Definition:
vec_expr_v2.h:391
geo
see the geo page for the full documentation
delta
Float delta(Float f, Float g)
Definition:
mosolov_error_yield_surface.cc:29