From ac02c1befd2363fd19efbaf445d21beaebf7368e Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@math.fu-berlin.de> Date: Thu, 13 Nov 2014 16:39:50 +0100 Subject: [PATCH] Initialize using the correct type --- dune/elasticity/common/elasticityhelpers.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dune/elasticity/common/elasticityhelpers.hh b/dune/elasticity/common/elasticityhelpers.hh index ab17fed..fb28dab 100644 --- a/dune/elasticity/common/elasticityhelpers.hh +++ b/dune/elasticity/common/elasticityhelpers.hh @@ -18,7 +18,7 @@ namespace Dune { */ template <int dim, class field_type=double> void computeNonlinearStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, SymmetricTensor<dim,field_type>& strain) { - strain = 0; + strain = field_type(0); for (int i=0; i<dim ; ++i) { strain(i,i) +=grad[i][i]; -- GitLab