Difference between MixElement and directly FunctionSpace

domain = Circle(Point(0, 0), 0.5)
mesh_h = 64
mesh = generate_mesh(domain, mesh_h)
V = FunctionSpace(mesh, ‘P’, 1) # P1有限元
P1 = FiniteElement(‘P’, triangle, 1)
element = MixedElement([P1, P1, P1])
V_t = FunctionSpace(mesh, element)
u = Function(V_t)
u_1, u_2, u_3 = u.split
_u = Function(V)

Does the structrue of _u equal wiht u_1?

I solve the solution and compare the size _u.vector()[:] is different u_1.vector()[:].

See Inconsistent results with sub MixedElement functions - #2 by dokken

1 Like