]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added support for vectorization in Physics::Elasticity::Kinematics
authorMathias Mentler <mathiasmentler@web.de>
Fri, 3 Mar 2017 09:38:02 +0000 (10:38 +0100)
committerMathias Mentler <mathiasmentler@web.de>
Fri, 3 Mar 2017 09:38:02 +0000 (10:38 +0100)
include/deal.II/physics/elasticity/kinematics.h

index bc7913b537b6fe5e7e3e30086011ec0c96e4e531..9c80108f8c3d48efcb435604b5481875b5bfe6ce 100644 (file)
@@ -300,7 +300,7 @@ inline
 SymmetricTensor<2, dim, Number>
 Physics::Elasticity::Kinematics::F_vol (const Tensor<2, dim, Number> &F)
 {
-  return NumberType<Number>::value(std::pow(determinant(F),1.0/dim))*static_cast< SymmetricTensor<2,dim,Number> >(unit_symmetric_tensor<dim>());
+  return internal::NumberType<Number>::value(std::pow(determinant(F),1.0/dim))*static_cast< SymmetricTensor<2,dim,Number> >(unit_symmetric_tensor<dim>());
 }
 
 
@@ -330,7 +330,7 @@ inline
 SymmetricTensor<2, dim, Number>
 Physics::Elasticity::Kinematics::E (const Tensor<2, dim, Number> &F)
 {
-  return NumberType<Number>::value(0.5)*(C(F) - static_cast<SymmetricTensor<2,dim,Number> >(StandardTensors<dim>::I));
+  return internal::NumberType<Number>::value(0.5)*(C(F) - static_cast<SymmetricTensor<2,dim,Number> >(StandardTensors<dim>::I));
 }
 
 
@@ -352,7 +352,7 @@ SymmetricTensor<2, dim, Number>
 Physics::Elasticity::Kinematics::e (const Tensor<2, dim, Number> &F)
 {
   const Tensor<2, dim, Number> F_inv = invert(F);
-  return NumberType<Number>::value(0.5)*symmetrize(static_cast<SymmetricTensor<2,dim,Number> >(StandardTensors<dim>::I) - transpose(F_inv)*F_inv);
+  return internal::NumberType<Number>::value(0.5)*symmetrize(static_cast<SymmetricTensor<2,dim,Number> >(StandardTensors<dim>::I) - transpose(F_inv)*F_inv);
 }
 
 
@@ -391,7 +391,7 @@ Physics::Elasticity::Kinematics::w (
   // This could be implemented as w = l-d, but that would mean computing "l"
   // a second time.
   const Tensor<2,dim> grad_v = l(F,dF_dt);
-  return NumberType<Number>::value*(grad_v - transpose(grad_v)) ;
+  return internal::NumberType<Number>::value(0.5)*(grad_v - transpose(grad_v));
 }
 
 #endif // DOXYGEN

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.