For a toy problem on a way to a more complicated system of PDEs, I tried to solve a variational problem of the form
a(u,v) = \int (u \times v, u \times v) dx.
Edit: the above formulation is not well defined in the sense of FEM. What I rather meant was
a(u,v) = \int (u \times g, u \times v) dx.
for some function g.
However I do end up with the Error, when I try to solve the variational problem with a non-linear solver,
UFLException: Index out of bounds.
which seems to happen in the UFL package.
My code is
from fenics import * mesh = UnitSquareMesh(2, 2) deg = 1 V=VectorFunctionSpace(mesh, "P",deg, dim=2) u = Function(V) v = TestFunction(V) L = inner(cross(u, v) , cross(u, v) )*dx solve(L==0, u)
I have to say I am quite overwhelmed with the error message because it does not really hint where I might have made a mistake. To me the variational problem seems well defined with a trivial solution, therefore the issue must occur during the assembly.
Would be very happy about every hint for my problem