From 7de5f0c6324ab3e21d0966a8c865028a7f05edb0 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 16 Aug 2011 12:13:33 +0000 Subject: [PATCH] Avoid compiler error. git-svn-id: https://svn.dealii.org/trunk@24088 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/tensor_base.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deal.II/include/deal.II/base/tensor_base.h b/deal.II/include/deal.II/base/tensor_base.h index ed309aeef7..2aa96ab57b 100644 --- a/deal.II/include/deal.II/base/tensor_base.h +++ b/deal.II/include/deal.II/base/tensor_base.h @@ -887,8 +887,13 @@ inline Tensor<1,dim,Number>::Tensor (const bool initialize) { if (initialize) - for (unsigned int i=0; i!=dim; ++i) - values[i] = 0; + // need to create an object Number(0) to + // initialize to zero to avoid confusion with + // Tensor::operator=(scalar) when using + // something like + // Tensor<1,dim,Tensor<1,dim,Number> >. + for (unsigned int i=0; i