Can not multiply FunctionSpaces in current version

In the current stable version, mixed spaces are constructed at the element level:

from dolfin import *
mesh = IntervalMesh(99,0,1.)

# Old:
#V = FunctionSpace(mesh, "CG", 1)
#M = V*V

# Current equivalent:
VE = FiniteElement("CG",mesh.ufl_cell(),1)
ME = MixedElement([VE,VE])

# Alternative to calling MixedElement constructor:
#ME = VE*VE

M = FunctionSpace(mesh,ME)
3 Likes