Dear Bruno, Thank you very much for your hint. I added the extra include but it did not help and I am still getting the same error!
I am wondering what other things I may want to try? Thanks On Friday, May 3, 2019 at 3:24:04 PM UTC-5, bruno....@gmail.com wrote: > > Hi, > > Try to add #include <deal.II/base/symmetric_tensor.templates.h> We cannot > do explicit instantiation for every thing so if you have something that is > less common you need the extra include. > > Best > > Bruno > > On Friday, May 3, 2019 at 4:07:56 PM UTC-4, Hamed Babaei wrote: >> >> Hello, >> >> I am planning to use a symmetric tensor rank-6 for third-order elastic >> constants in a nonlinear elasticity code. The tensor is supposed to be >> symmetric within each three pair indices as well as all possible orders of >> pair permutations. >> Namely, C_ijklmn = C_jiklmn = C_ijlkmn = C_ijklnm = C_klijmn = C_mnijkl >> ,.....This tensor without any material symmetry will have 56 independent >> elements. >> >> The SymmetricTensor class provides the symmetry within the pairs without >> the symmetry obtained by permutation of pairs and it will be totally fine >> and I can take care of the extra symmetry I need by writing the equal >> elements as many times as required. >> >> However, the problem is that I can not even initialize a rank-6 tensor. >> Interestingly it works for rank-4 though. It seems that I am missing >> something in the instruction of the tensor. Only the following simplest >> line of code gives me an error. >> >> $ *SymmetricTensor<6, dim> C; * >> >> >> The error is: >> >> /home/hbabaei/deal.ii-candi/deal.II-v9.0.1/include/deal.II/base/symmetric_tensor.h:563:29: >> >> error: incomplete type >> ‘dealii::internal::SymmetricTensorAccessors::StorageType<6, 3, double>’ >> used in nested name specifier >> static const unsigned int n_independent_components >> ^ >> /home/hbabaei/deal.ii-candi/deal.II-v9.0.1/include/deal.II/base/symmetric_tensor.h:1046:1: >> >> error: size of array is not an integral constant-expression >> SymmetricTensor<rank_,dim,Number>::SymmetricTensor (const Number >> (&array) [n_independent_components]) >> ^ >> /home/hbabaei/deal.ii-candi/deal.II-v9.0.1/include/deal.II/base/symmetric_tensor.h:1046:100: >> >> error: size of array is not an integral constant-expression >> SymmetricTensor<rank_,dim,Number>::SymmetricTensor (const Number >> (&array) [n_independent_components]) >> >> ^ >> /home/hbabaei/deal.ii-candi/deal.II-v9.0.1/include/deal.II/base/symmetric_tensor.h:861:61: >> >> error: invalid use of incomplete type ‘struct >> dealii::internal::SymmetricTensorAccessors::StorageType<6, 3, double>’ >> typedef typename base_tensor_descriptor::base_tensor_type >> base_tensor_type; >> ^ >> /home/hbabaei/deal.ii-candi/deal.II-v9.0.1/include/deal.II/base/symmetric_tensor.h:188:12: >> >> error: declaration of ‘struct >> dealii::internal::SymmetricTensorAccessors::StorageType<6, 3, double>’ >> struct StorageType; >> ^ >> >> It seems that I need to specify n_independent_components, but I do not >> know how and where I can do so. >> >> I appreciate it if you could give me any clue how to implement a rank-6 >> tensor successfully. >> >> Thanks and regards, >> > -- 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.