Hi,

I am attempting to compute the divergence of a 3-tensor A_{ijk} which resides in HDivDiv^3, so it is symmetric in the first two indices. This comes from considering the HHJ method in a full 3d problem, with the 3-tensor approximating the gradient of the strain tensor in a mixed method.

The definition of divergence I would expect, i.e. returning the matrix B_{ij} = ∂_1 A_{ij1} + ∂_2 A_{ij2} + ∂_3 A_{ij3} , does not appear to be what is happening under the hood.

For example, a tensor with A_{111} = x, A_{112}= y, A_{113} = z, with all others zero, I would expect the divergence to return a matrix with B_{11} = 3, all others zero. Instead, I get back B_{11} = 1. I am not sure how to get the behaviour I want.

I have attached the following file illustrating the above case.

testing.ipynb (2.9 KB)

I would expect that `HDivDiv**3`

would yield a 3-tensor of the form

A_{ijk} =

[

A_{111}, A_{121}, A_{131},

A_{211}, A_{221}, A_{231},

A_{311}, A_{321}, A_{331},…

]

clearly giving us the symmetry in the first two arguments as each block of 9 would be in HDivDiv, which is symmetric.

Thanks.