Custom operators on test and trial functions
13 months ago by
\[ a(u,v) = \int_\Omega H(u)\cdot H(v)\,dx = \int_\Omega F\cdot H(v)\,dx = L(v) \]
where \( H(v) \) is the solution operator for another PDE depending linearly on \(v\).
Thus \( a(u,v) \) is bilinear and \( L(v) \) is linear, as one would want.
Is there a way to set this up for solving using FEniCS?
I already have a solver for \( H \) setup and tried to simply construct the variational form using a setup like this
but did not work. I suppose the UFL-model is not fond of getting non-standard functions like \(H\) involved with the test and trial functions?
V = FunctionSpace(...) u = TrialFunction(V) v = TestFunction(V) F = Expression(...) a = H(u)*H(v)*dx L = F*H(v)*dx w = Function(V) solve(a == L, w)
Edit: So I may have oversimplified the problem. \( H \) isn't directly a solution operator for a PDE, but rather involves one, like this:
\[ H(u) = F_1\cdot u + F_2\cdot(\nabla F_3,\nabla U(u)) \]
where \( F_i \) are all spatial functions and \( U(u) \) is a PDE solution operator for a PDE with solution linearly depending on \(u\). Also, \( a \) has a regularization induced term as well \( F_4\nabla u\nabla v \)
13 months ago by
\frac12\int_\Omega |H(u)|^2 \,dx - \int_\Omega F\cdot H(u)\,dx
Now reformulate as minimizing
\frac12\int |w|^2 dx - \int F\cdot w\, dx
subject to the constraint that \(K w = u\), where \(K\) is the inverse operator to \(H\) (i.e., \(w=H(u)\) means that \(Kw = u\). Impose the constraint via a Lagrange multiplier \(p\), so the variational problems is to find a saddle point for
\frac12\int |w|^2 dx - \int F\cdot w\, dx + \int (Kw - u)\cdot p\,dx.
This then leads to a weak formulation in the usual way, with three trial functions, w, u, and p, and three corresponding test functions. The solution operator \(H\) does not enter the formulation, only the differential operator \(K\) for which you can use usual UFL operators. If \(K\) is a second order elliptic operator, you will probably integrate by parts in evaluating terms like \(\int Kw\cdot p\,dx\), as usual.
The tricky part, as with all mixed methods, is choosing a stable choice of finite element spaces for the three different variables.
Please login to add an answer/comment or follow this question.