Hi Anup, It looks like there's no constructor from which one can create a rank 4 tensor from a rank 4 symmetric tensor, nor an assignment operator. I've opened up an issue on GitHub here <https://github.com/dealii/dealii/issues/2679>. It looks like you'll just have to copy out the entries manually for now.
J-P On Tuesday, June 14, 2016 at 1:07:56 AM UTC+2, Anup Basak wrote: > > Hello all, > > I want to cast a 4th order SymmetricTensor<4, dim> to a Tensor<4, dim> and > have used the following command: > > Tensor<4, dim> tens = Tensor<4, dim>(StandardTensors<dim>::II); > > where StandardTensors<dim>::II is the fourth order symmetric unit tensor > defined in > StandardTensors class (same as that defined in Step 44). However, I get > error saying that > > cannot convert ‘const value_type {aka const dealii::Tensor<1, 6, double>}’ > to ‘double’ in assignment > t[d][d] = data[d]; > > I shall be thankful if someone can point out where it is going wrong. > > Thanks and regards, > Anup. > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.