I am trying to initilialise a symmetric TensorFunctionSpace,
>>> from dolfin import *
>>> mesh = RectangleMesh(Point(0.,0.),Point(2.,1.),20,10)
>>> T = interpolate(Constant(((3.,1.),(1.,4.))), TensorFunctionSpace(mesh,'CG',1,symmetry=True))
>>> print (T.vector().array()==4).sum()
0
>>> T = interpolate(Constant(((3.,1.),(4.,1.))), TensorFunctionSpace(mesh,'CG',1,symmetry=True))
>>> print (T.vector().array()==4).sum()
231
Is this behaviour expected? Should FEniCS not read the last diagonal component as the fourth element of the Constant?
EDIT: To follow up, plotting looks OK, but evaluation worries me:
>>> T(0.5,0.5)
array([ 3., 1., 4., 0.])
>>> plot(T[0,0])
>>> plot(T[0,1])
>>> plot(T[1,0])
>>> plot(T[1,1])
>>> interactive()