Hi everybody!!
I created a Mixed Function Space of dimension 4.
V_u = VectorElement("Lagrange", mesh.ufl_cell(), 1, 3)
V_theta = FiniteElement("Lagrange", mesh.ufl_cell(), 1)
V = FunctionSpace(mesh, V_u*V_theta)
(u, theta) = TrialFunctions(V)
(delta_u, delta_theta) = TestFunctions(V)
Then I interpolated the Expressions u_0, theta_0 and v_0 into this Mixed Function Space.
u_0 = Expression(("x[0]", "x[1]", "x[2]", "x[3]"), degree = 1)
u_n = interpolate(u_0, V)
theta_0 = Expression(("x[0]", "x[1]", "x[2]", "x[3]"), degree = 1)
theta_n = interpolate(theta_0, V)
v_0 = Constant((0.0, 0.0, 0.0, 0.0))
v_n = interpolate(v_0, V)
And this is the equation that has to be solved:
a = temp_0dtinner(beta(E, alpha), sym(grad(u)))delta_thetadx + dtc_Ethetadelta_thetadx + dtdtkappainner(grad(theta), grad(delta_theta))dx + dtdtinner(sym(grad(delta_u)), sigma(u, theta))dx + rohinner(delta_u, u)*dx
l = dtdtinner(r, delta_theta)dx + dtdtinner(q_p, delta_theta)ds(top) + dtdtinner(b, delta_u)dx + dtdtinner(t_p, delta_u)ds(top) + rohinner(delta_u, u_n)dx + dtrohinner(delta_u, v_n)dx + dtc_Einner(theta_n, delta_theta)dx + temp_0dtinner(beta(E, alpha), sym(grad(u_n)))delta_thetadx
The problem is, that u_n, theta_n and v_n is of dimension 4 because of the interpolation. So the inner product doesn't work with those factors because delta_u and delta_theta are vector-valued and I get a shape mismatch.
Can anybody please help me or has any idea how to get rid of this problem?