Unsupported Operand for FunctionSpace Type

It seems like you want to define a mixed function space. Here is the right way to do it:

Element1 = FiniteElement("CG", mesh.ufl_cell(), 1)
Element2 = FiniteElement("CG", mesh.ufl_cell(), 1)

# Define the mixed element
W_elem = MixedElement([Element1, Element2])

# Define the mixed function space
W = FunctionSpace(mesh, W_elem)
1 Like