Dear Nan, To try to offer some help, I will take a crack at trying to answer this and hopefully get some correction or clarity from the benevolent gurus. I believe that the Tensor class is defined recursively as indicated in the web page
http://www.dealii.org/developer/doxygen/deal.II/classTensor.html To me this means that when you define say a Tensor of rank 3 and you are working in 3 dimensions, then you are asking for an array having 27 elements (3-by-3-by3). It looks like deal.ii is doing this by instantiating a rank 2 (dimension 3) tensor array. I am not sure if this is right or if I have even answered your question, and hope that someone else can help. Hope this helps. Dan On Mon, Jun 11, 2012 at 12:42 PM, Zhang, Nan <[email protected]> wrote: > Hi there, > > I find a definition in > > template <int rank_, int dim, typename Number> > class Tensor > { > ... > typedef typename Tensor<rank_-1,dim,Number>::array_type array_type[dim]; > ... > > } > > I do not understand this definition. The array_type only appears once here > without any other definition in this template. How is it used to define > array_type[dim]? > Anyone can tell me how does this definition work? > > > -- > Dr. Nan Zhang > Postdoctoral Research Associate > Department of Geological Science > Brown University > 324 Brook Street > Box 1846 > Providence, RI 02912 > HomePage: http://anquetil.colorado.edu/~nzhang/NanZhangHome.html > > > _______________________________________________ > dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii > >
_______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
