From: Jean-Paul Pelteret Date: Mon, 23 Apr 2018 07:54:45 +0000 (+0200) Subject: Use function from Physics module instead of hardcoded equivalent X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27dafa185b81eeddebf58a0ea3ae93b59a109437;p=code-gallery.git Use function from Physics module instead of hardcoded equivalent Since the addition of fixes to the AD number support, all of the functions in the Physics module now work with all of our supported AD number types. Previously, this line would not compile for nested Sacado Rad-DFad types. --- diff --git a/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc b/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc index 54a5d7a..59de4a4 100644 --- a/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc +++ b/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc @@ -1896,8 +1896,7 @@ Point grid_y_transform (const Point &pt_in) const Tensor<2,dim,ADNumberType> &grad_u = scratch.solution_grads_u_total[q_point]; const Tensor<2,dim,ADNumberType> F = Physics::Elasticity::Kinematics::F(grad_u); const ADNumberType det_F = determinant(F); -// const Tensor<2,dim,ADNumberType> F_bar = Physics::Elasticity::Kinematics::F_iso(F); - const Tensor<2,dim,ADNumberType> F_bar = ADNumberType(std::pow(determinant(F),-1.0/dim))*F; + const Tensor<2,dim,ADNumberType> F_bar = Physics::Elasticity::Kinematics::F_iso(F); const SymmetricTensor<2,dim,ADNumberType> b_bar = Physics::Elasticity::Kinematics::b(F_bar); const Tensor<2,dim,ADNumberType> F_inv = invert(F); Assert(det_F > ADNumberType(0.0), ExcInternalError());