How to use FiniteElement

Hi, I want to create a one-dimensional mesh for a TrialFunction with 2 components: U = (U1(x), U2(x)). To do this I found the example:

P1 = FiniteElement(’P’, triangle, 1)
element = MixedElement([P1, P1, P1])
V = FunctionSpace(mesh, element)

but I need some like:

P = FiniteElement(#what suppose I must to put here?)
element = MixedElement([P, P])
V = FunctionSpace(mesh, element)

with

mesh = IntervalMesh(N, a, b)

You can use

P = FiniteElement('P', interval, 1)

or

mesh = IntervalMesh(N, a, b)
P = FiniteElement('P', mesh.ufl_cell(), 1)
2 Likes

also

V = VectorFunctionSpace(mesh, "CG", 1, dim=2)
1 Like