From: guido Date: Mon, 18 Mar 2002 13:09:58 +0000 (+0000) Subject: changes for Sun forte X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a507c44612e2fde3ff7aa7df8df02341455da6c;p=dealii-svn.git changes for Sun forte git-svn-id: https://svn.dealii.org/trunk@5572 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/tensor.h b/deal.II/base/include/base/tensor.h index 54bc15843e..3c7436de2b 100644 --- a/deal.II/base/include/base/tensor.h +++ b/deal.II/base/include/base/tensor.h @@ -62,9 +62,16 @@ class Tensor static const unsigned int rank = rank_; /** - * Declare an array type which can - * be used to initialize statically - * an object of this type. + * Type of stored objects. This + * is a tensor of lower rank. + */ + typedef typename Tensor value_type; + + /** + * Declare an array type which + * can be used to initialize an + * object of this type + * statically. */ typedef typename Tensor::array_type array_type[dim]; @@ -229,7 +236,7 @@ Tensor::Tensor (const array_type &initializer) template inline -Tensor & +typename Tensor::value_type& Tensor::operator[] (const unsigned int i) { Assert (i::operator[] (const unsigned int i) template inline -const Tensor & +const typename Tensor::value_type& Tensor::operator[] (const unsigned int i) const { Assert (i */ static const unsigned int rank = 1; + /** + * Type of stored objects. This + * is a double for a rank 1 tensor. + */ + + typedef double value_type; + +//TODO:[WB] Do we need this overflow? Maybe there is use for a zero-size Tensor? /** * Declare an array type which can * be used to initialize statically @@ -95,7 +103,10 @@ class Tensor<1,dim> * to zero if @p{initialize==true}; this * is the default behaviour. */ - explicit Tensor (const bool initialize = true); +#ifndef SUNFORTE + explicit +#endif + Tensor (const bool initialize = true); /** * Copy constructor, where the data is