Divergence of 3-tensor in HDivDiv^3

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.

Hi horep,

HDivDiv^3 gives you a tensor A_{ijk}, whose last two arguments are symmetric. The first index corresponds to [*]^3. You can test this in your code using

mycf = CF(tuple([i+1 for i in range(27)]))

The divergence is (div A)_{ij} = d_k A_{ijk}.

Best,
Michael

Hi,

Right, so there is a mismatch between what I want from the divergence, and what I want from the 3-tensor in terms of symmetries. Essentially, I need that either:

  1. The symmetry occurs in the first two arguments, and the divergence acts on the third.

  2. The divergence acts on the first index, and the symmetry occurs in the last two arguments.

In either case, the first part is wrong, and the second part is correct. Is there a way to achieve either of these within ngsolve?

Hi,

If you use HDivDiv then the divergence will always act on one of the symmetric indices.

Maybe you can create the space you need by putting together scalar H1 spaces in terms of product spaces and then define the divergence operator taking components of gradients?

Best,
Michael