On 01/21/2014 01:57 AM, Jan Blechta wrote:
>>>>> However, I am still struggling to combine the finite element
>>>>> method with Lagrange multipliers. I think I have a good handle on
>>>>> Lagrange multipliers for constrained optimization of a scalar
>>>>> function or integral, but I fail to transfer this to FE.
>>>>
>>>> Ok, potential for Poisson problem is
>>>>
>>>> \Psi(u) = 1/2 \int |\nabla u|^2 - L(u)
>>>
>>> Ah, the potential is the starting point. Thanks!
>>>
>>>> So if you want to minimize \Psi on V = H^1(\Omega) subject to
>>>> constraint \int u = 0, you do can try to find a minimum (u, c) \in
>>>> (V \times R) of
>>>>
>>>> \Psi(u) - c \int u
>>>>
>>>
>>> My apologies if I'm slow, but why would I want to find a minimum
>>> (u,c) \in (V * R)? It seems to me that I don't want to find a
>>> specific value c -- I want a minimum u \in V \forall c.
>>
>> Nevermind that question. Since c is the Lagrange multiplier of course
>> we need to solve for it. I got confused because I didn't see any
>> additional constraint equations being used to actually determine the
>> value. But that is just because of the special case \int u = 0,
>> correct?
>>
>> For the more general case \int u = u0, am I right that we'd need to
>> set up an extra term in the linear form?
>>
>> (u, c) = TrialFunction(W)
>> (v, d) = TestFunctions(W)
>> g = Expression("-sin(5*x[0])")
>> a = (inner(grad(u), grad(v)) + c*v + u*d)*dx
>> L = g*v*ds + Constant(u0) * d * dx
>
> Correct.
Ah, good :-). Thanks!
Could you also give me a similar hint for my original problem?
To recap: I want to find u on the boundary such that with
L = dot(f, grad(v)) * dx
a = u * dot(grad(v), FacetNormal(mesh)) * ds
L(v) == a(u, v) holds for all v that satisfy div(grad(v)) = 0 (without
any boundary conditions on v).
I tried to start setting up the potential problem:
\Psi(u) = 1/2 a(u,u) - L(u)
but in contrast to the Poisson-Neumann example, now the constraint isn't
on the solution u but on the test functions v, so I'm not sure how I can
add the Lagrange multiplier here... As far as I can see, there's no
reason to constrain the variation of u to satisfy Laplace's equation
when looking for a stationary point of \Psi.
What am I missing this time?
Thanks so much for all your help!
Nikolaus
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics