From 76ee7b6982d2a15873d9e11e748f723de8d0157d Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@mi.fu-berlin.de> Date: Thu, 16 Jan 2014 11:08:21 +0000 Subject: [PATCH] Adjust to new template parameter of SymmetricTensor [[Imported from SVN: r12665]] --- dune/elasticity/common/elasticityhelpers.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dune/elasticity/common/elasticityhelpers.hh b/dune/elasticity/common/elasticityhelpers.hh index 329ad77..ab17fed 100644 --- a/dune/elasticity/common/elasticityhelpers.hh +++ b/dune/elasticity/common/elasticityhelpers.hh @@ -16,8 +16,8 @@ namespace Dune { * \param grad The gradient of the direction in which the linearisation is computed. * \param strain The tensor to store the strain in. */ - template <int dim> - void computeNonlinearStrain(const Dune::FieldMatrix<double, dim, dim>& grad, SymmetricTensor<dim>& strain) { + template <int dim, class field_type=double> + void computeNonlinearStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, SymmetricTensor<dim,field_type>& strain) { strain = 0; for (int i=0; i<dim ; ++i) { strain(i,i) +=grad[i][i]; @@ -38,8 +38,8 @@ namespace Dune { * \param grad The gradient of the direction in which the linearisation is computed. * \param strain The tensor to store the strain in. */ - template <int dim> - void computeLinearisedStrain(const Dune::FieldMatrix<double, dim, dim>& grad, SymmetricTensor<dim>& strain) { + template <int dim, class field_type=double> + void computeLinearisedStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, SymmetricTensor<dim,field_type>& strain) { for (int i=0; i<dim ; ++i) { strain(i,i) = grad[i][i]; @@ -55,9 +55,9 @@ namespace Dune { * \param conf The deformation gradient(!) of the configuration at which the linearisation is evaluated. * \param strain The tensor to store the strain in. */ - template <int dim> - void computeLinearisedStrain(const Dune::FieldMatrix<double, dim, dim>& grad, const Dune::FieldMatrix<double, dim, dim>& conf, - SymmetricTensor<dim>& strain) { + template <int dim, class field_type=double> + void computeLinearisedStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, const Dune::FieldMatrix<field_type, dim, dim>& conf, + SymmetricTensor<dim,field_type>& strain) { strain = 0; for (int i=0;i<dim; i++) for (int j=i;j<dim;j++) -- GitLab