Tensor operation in dolfinx

Dear FEniCSx staff and users,

I am new to FEniCSx and currently working on handling tensors ranging from rank 2 to rank 6 in my bilinear form. However, I am finding it challenging to use operators like np.tensordot and np.einsum within UFL. (Tensor operation between different rank tensors) Are there any recommended methods or alternatives for implementing these tensor operations?

Thank you very much for your assistance.

You shouldn’t use nimoy tensor operations with ufl.
Please consider the ufl documentation of tensor operations, and in particular:

https://docs.fenicsproject.org/ufl/2024.2.0/manual/form_language.html#implicit-summation

https://docs.fenicsproject.org/ufl/2024.2.0/manual/form_language.html#tensor-algebra-operators