Hi Anup,

What version of deal.II are you using? In the documentation for version 
8.4.0 such a function certainly exists 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classTensor.html#a0923600f30b498c743cbef3d2eab4993>
.

Anyway, in this case its probably unnecessary to explicitly specify the 
contraction indices. Since its just the inner indices that are summed over, 
you can use the * operator 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classTensor.html#acff14b5a87224a20eb287ed06017c80f>
.
Tensor<2, dim> A = Tensor<2, dim>(B)*Tensor<2, dim>(C);
or, if you think its sensible,
SymmetricTensor<2, dim> A = symmetrize(Tensor<2, dim>(B)*Tensor<2, dim>(C));

J-P

On Sunday, June 12, 2016 at 10:59:30 PM UTC+2, Anup Basak wrote:
>
> Hello all,
>
> I am trying to calculate the following tensor multiplication (I am using 
> dealii 8.3.0. and installed in February, 2016):
>
> A_{ij} =  B_{ik} C_{kj}
>
> where B and C are both symmetric tensors.  Since using  B*C would lead to 
> a scalar, I am trying to calculate using
> 'contract' command. For that I have at first cast the tensors B and C into 
> Tensor<2,dim>. The command I have used
> is the following:
>
> Tensor<2, dim> A = contract<1, 0>(Tensor<2, dim>(B), Tensor<2, dim>(C));
>
> However, I get the following error massage (in blue)
>
> no matching function for call to ‘contract(dealii::Tensor<2, 3, double>, 
> dealii::Tensor<2, 3, double>)’
>         Tensor<2, dim> A = contract<1, 0>(Tensor<2, dim>(B), Tensor<2, 
> dim>(C));
>
> Can anyone tell me 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.

Reply via email to