From 0aaf5b8a16725b6f8e92097df879e99b9f0d5013 Mon Sep 17 00:00:00 2001 From: Mathias Mentler Date: Fri, 3 Mar 2017 10:38:02 +0100 Subject: [PATCH] Added support for vectorization in Physics::Elasticity::Kinematics --- include/deal.II/physics/elasticity/kinematics.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/deal.II/physics/elasticity/kinematics.h b/include/deal.II/physics/elasticity/kinematics.h index bc7913b537..9c80108f8c 100644 --- a/include/deal.II/physics/elasticity/kinematics.h +++ b/include/deal.II/physics/elasticity/kinematics.h @@ -300,7 +300,7 @@ inline SymmetricTensor<2, dim, Number> Physics::Elasticity::Kinematics::F_vol (const Tensor<2, dim, Number> &F) { - return NumberType::value(std::pow(determinant(F),1.0/dim))*static_cast< SymmetricTensor<2,dim,Number> >(unit_symmetric_tensor()); + return internal::NumberType::value(std::pow(determinant(F),1.0/dim))*static_cast< SymmetricTensor<2,dim,Number> >(unit_symmetric_tensor()); } @@ -330,7 +330,7 @@ inline SymmetricTensor<2, dim, Number> Physics::Elasticity::Kinematics::E (const Tensor<2, dim, Number> &F) { - return NumberType::value(0.5)*(C(F) - static_cast >(StandardTensors::I)); + return internal::NumberType::value(0.5)*(C(F) - static_cast >(StandardTensors::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::value(0.5)*symmetrize(static_cast >(StandardTensors::I) - transpose(F_inv)*F_inv); + return internal::NumberType::value(0.5)*symmetrize(static_cast >(StandardTensors::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::value*(grad_v - transpose(grad_v)) ; + return internal::NumberType::value(0.5)*(grad_v - transpose(grad_v)); } #endif // DOXYGEN -- 2.39.5