]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Use function from Physics module instead of hardcoded equivalent
authorJean-Paul Pelteret <jppelteret@gmail.com>
Mon, 23 Apr 2018 07:54:45 +0000 (09:54 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Mon, 23 Apr 2018 08:02:19 +0000 (10:02 +0200)
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.

Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc

index 54a5d7aee6df315291b5d3ecb403c72da0775bb0..59de4a47a1fd8fb76f93397612337e1397f3cb75 100644 (file)
@@ -1896,8 +1896,7 @@ Point<dim> grid_y_transform (const Point<dim> &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());

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.