Subject: [FFC-dev] lagrange multiplier on boundary

From: Shawn Walker <[email-masked]>
Date: Thu, 16 Apr 2009 10:42:08 -0400 (EDT)

Hello.

I was wondering how do you have finite element spaces that only live on 
the boundary?  Say I want to solve a mixed form for Laplace's equation. 
And, I would like to set the normal flux on the boundary by using a 
Lagrange multiplier that is only defined on the boundary.  Is there an 
example on this already?

- Shawn

---

From: Anders Logg <[email-masked]>
Date: Thu, 16 Apr 2009 19:45:01 +0200

> Lagrange multiplier that is only defined on the boundary.  Is there an 

Is it not enough to add a boundary integral? Something like

  lmbda*(dot(sigma, n) - g)*ds

-- 
Anders

---

From: Jed Brown <[email-masked]>
Date: Thu, 16 Apr 2009 19:56:32 +0200

>   lmbda*(dot(sigma, n) - g)*ds

You seem to be describing a penalty method which doesn't add any dofs
and can be enforced this way (just choose 'lmbda' to be a big number).
The issue is that lmbda needs to have a suitable number of degrees of
freedom in the global system and these need to correspond to basis
functions on the boundary.

Jed

---

From: Anders Logg <[email-masked]>
Date: Thu, 16 Apr 2009 19:59:42 +0200

> functions on the boundary.

ok, now I see what you mean.

No, that's not possible to do (mixing function spaces on different
meshes in the same formulation).

-- 
Anders

---

From: Robert Kirby <[email-masked]>
Date: Thu, 16 Apr 2009 13:02:20 -0500

A classic reference to this kind of situation is the "other" Raviart-Thomas
paper from 1977,
the one on "primal hybrid" methods in which you work with the primal rather
than mixed form
of Poisson, but enforce continuity by a Lagrange multiplier on edges rather
than by assembly
in the function space.

Interesting paper.

Rob

On Thu, Apr 16, 2009 at 12:59 PM, Anders Logg <[email-masked]> wrote:

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAknncg4ACgkQTuwUCDsYZdEdgwCePd2p5cOfsZ00LVcqvjjc4nSS
> vjEAoJiS8wFFFXk2OAZe0oO4arCFn7ab
> =cU9z
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
>

---

From: Shawn Walker <[email-masked]>
Date: Thu, 16 Apr 2009 14:08:20 -0400 (EDT)

Actually, let me write out the full system:

(u,v) - (p,div(v)) + < \lambda,v.n > = 0, for all v
-(q,div(u)) = 0, for all q
<\mu,u.n> = <\mu,g>, for all /mu

note: <,> is an inner product on the boundary.

So it is a saddle point system with multiplier \lambda on the boundary 
only.  The only way I know to define this in FFC will create a \lambda 
that is defined everywhere, and I don't want that.  So, is there a way to 
do this?  This is not the exact problem that I want to solve, but 
something similar.

- Shawn

---

From: Shawn Walker <[email-masked]>
Date: Thu, 16 Apr 2009 14:14:24 -0400 (EDT)

Well, this should be a capability!  :)

Is it possible to define more than one form, assemble the corresponding 
matrices and then concatenate them in DOLFIN?

- Shawn

---

From: Anders Logg <[email-masked]>
Date: Thu, 16 Apr 2009 20:49:30 +0200

> matrices and then concatenate them in DOLFIN?

Yes, you should be able to use BlockMatrix and BlockVector for this.

-- 
Anders

---

From: Shawn Walker <[email-masked]>
Date: Thu, 16 Apr 2009 14:57:07 -0400 (EDT)

Oh really?  And then I could call a direct solver on it?  Is there a demo 
somewhere that shows this?

I could also use an Uzawa method.  But concatenating matrices would be 
fine for me.

- Shawn

---

From: Shawn Walker <[email-masked]>
Date: Thu, 16 Apr 2009 14:58:55 -0400 (EDT)

Yes.  I could enforce it (essentially) but this is a model problem for 
what I would really like to do.  So, yes I have to do it this way.

- Shawn

On Thu, 16 Apr 2009, [email-masked] wrote:

>
> ... and you really want the Lagrange multiplier on the boundary?
>
> That is, you cannot just enforce the boundary condition essentially?
>
> /Marie
>
>

---

From: Anders Logg <[email-masked]>
Date: Thu, 16 Apr 2009 21:02:01 +0200

> I could also use an Uzawa method.  But concatenating matrices would be  

No, I don't expect direct solvers will work, but it should be possible
to use with a Krylov solver. Kent knows about this.

When I look at it now, BlockMatrix does not inherit from any of the
KrylovMatrix base classes so it won't work with any of the solvers.
Kent has his own GMRES/CG implementation in Python which uses the
mult() operator provided by BlockMatrix. Maybe Kent can elaborate on
this (and the code)?

Moving this to dolfin-dev.

-- 
Anders

---

From: [email-masked]
Date: Thu, 16 Apr 2009 21:19:35 +0200 (CEST)

I would also like this capability! It is  something that often shows up
in inverse/optimal control problems.

Written in FFC/UFL your first equation reads:

dot(u,v)*dx - p*div(v)*dx + lmbda*dot(v,n)*ds

where u, p, lmbda are trial functions.

You could form one system or create a block matrix. Anyhow
the term
  lmbda*dot(v,n)*ds
would lead to a matrix with a very big kernel since you are not able to
restrict the dofs of lmbda only to the boundary.

What you can currently do is to restrict the functionspace for lmbda to
all the cells
associated with the boundary.

Using restricted functionspaces (in a simpler fashion) can be found in
demo/function/restriction.

The restriction does only work on cells for now.

We could discuss Uzawa and/or block matrices for this problem but I think
the simplest start is to create one system to begin with.

Whether it makes sense that lmbda lives on the whole cell associated with
the boundary, I don't know.

Kent

> DOLFIN-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>

---

From: "Garth N. Wells" <[email-masked]>
Date: Fri, 17 Apr 2009 08:34:04 +0800

> the boundary, I don't know.

It should live only on the boundary. In practice this only becomes an 
issue for higher-order elements with internal dofs.

Garth