Creating a 3x3 Tensor Function Space on a 2D mesh

Hi,

I was wondering is there is a way to define a 3x3 Tensor Function Space on a 2D mesh. Any help would be much appreciated.

Best

1 Like

Try this:

from dolfin import *
mesh = UnitSquareMesh(2, 16, "left/right")
V = TensorFunctionSpace(mesh, "CG", 1, shape=(3, 3))
u = Function(V)
print(u.ufl_shape)
1 Like