Rheolef  7.2
an efficient C++ finite element environment
elasticity_criterion.icc
Go to the documentation of this file.
26  string grad_approx = "P" + to_string(uh.get_space().degree()-1) + "d";
27  space Xh (uh.get_geo(), grad_approx);
28  if (grad_approx == "P0d") return lazy_interpolate (Xh, norm(uh));
29  space T0h (uh.get_geo(), grad_approx);
30  size_t d = uh.get_geo().dimension();
31  tensor I = tensor::eye (d);
32  return lazy_interpolate (T0h, sqrt(2*norm2(D(uh)) + lambda*sqr(div(uh))));
33 }
see the Float page for the full documentation
see the field page for the full documentation
see the space page for the full documentation
see the tensor page for the full documentation
field elasticity_criterion(Float lambda, const field &uh)
solver_basic< Float > eye()
see the eye page for the full documentation
Definition: eye.h:74
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
Definition: field.h:871
T norm(const vec< T, M > &x)
norm(x): see the expression page for the full documentation
Definition: vec.h:387
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 D(const Expr &expr)
D(uh): 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::divergence >>::type div(const Expr &expr)
div(uh): see the expression page for the full documentation
T norm2(const vec< T, M > &x)
norm2(x): see the expression page for the full documentation
Definition: vec.h:379