How to use Finite Element Exterior Calculus with FEniCS?

Asked by Paul Leopardi

This is a cross-post of a question I recently asked about the Exterior package of FEniCS. Perhaps DOLFIN is the more appropriate context in which to ask my question?

I am interested in using Finite Element Exterior Calculus (FEEC) in problems involving Dirac operators. For a recent talk, see http://wwwmaths.anu.edu.au/~leopardi/Leopardi-IWOTA-2012-Hodge-Dirac-talk.pdf

I have seen that the exterior package implements some aspects of FEEC https://launchpad.net/exterior and the UFL package implements FEEC names for finite elements https://blueprints.launchpad.net/ufl/+spec/exterior-calculus-names

My question is, how do I put together a numerical example of the FEEC approach to mixed finite elements using FEniCS? Firstly, using mixed finite elements for the Laplacian as per the Arnold Falk and Winther papers (2006 and 2010), and secondly, using the specific variational formulation of my joint work with Ari Stern, as per my talk referenced above.

Also, I have bought a copy of the FEniCS book. Is there anything useful in there in relation to implementing numerical examples of these two variational formulations?

I think that my problem may be that the FEEC elements are defined within FEniCS, but not the operators. In particular, where do I find the definition of the exterior derivative as an operator, and if it does not exist, how do I write the definition?

See also https://www.msi.umn.edu/project-abstract/arnoldd/Finite%20element%20exterior%20calculus%20with%20FEniCS
Is this really a question for Doug Arnold?

All the best, Paul
http://wwwmaths.anu.edu.au/~leopardi/

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kent-Andre Mardal (kent-and) said :
#1

On 7 September 2012 05:55, Paul Leopardi <
<email address hidden>> wrote:

> New question #207904 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/207904
>
> This is a cross-post of a question I recently asked about the Exterior
> package of FEniCS. Perhaps DOLFIN is the more appropriate context in which
> to ask my question?
>
> I am interested in using Finite Element Exterior Calculus (FEEC) in
> problems involving Dirac operators. For a recent talk, see
> http://wwwmaths.anu.edu.au/~leopardi/Leopardi-IWOTA-2012-Hodge-Dirac-talk.pdf
>
> I have seen that the exterior package implements some aspects of FEEC
> https://launchpad.net/exterior and the UFL package implements FEEC names
> for finite elements
> https://blueprints.launchpad.net/ufl/+spec/exterior-calculus-names
>

The exterior package has not been integrated with the form compilers yet.
It only computes
stuff on the reference element. Sorry about that.

>
> My question is, how do I put together a numerical example of the FEEC
> approach to mixed finite elements using FEniCS? Firstly, using mixed finite
> elements for the Laplacian as per the Arnold Falk and Winther papers (2006
> and 2010), and secondly, using the specific variational formulation of my
> joint work with Ari Stern, as per my talk referenced above.
>

Note that you have P Lambda and P+ Lambda elements in FEniCS.

>
> Also, I have bought a copy of the FEniCS book. Is there anything useful in
> there in relation to implementing numerical examples of these two
> variational formulations?
>

The UFL chapter contains most of what you need, I guess.

>
> I think that my problem may be that the FEEC elements are defined within
> FEniCS, but not the operators. In particular, where do I find the
> definition of the exterior derivative as an operator, and if it does not
> exist, how do I write the definition?
>
>
I guess you should write out exterior derivatives etc in terms of the
"vector/tensor entries", which
you have access to. Maybe you could even use the functions we implemented
in exterior. Have a look at the UFL chapter in the book.

See also
> https://www.msi.umn.edu/project-abstract/arnoldd/Finite%20element%20exterior%20calculus%20with%20FEniCS
> Is this really a question for Doug Arnold?
>
>
You could also ask Doug, he knows FEniCS well.

> All the best, Paul
> http://wwwmaths.anu.edu.au/~leopardi/
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>

Revision history for this message
Marie Rognes (meg-simula) said :
#2

On 09/11/2012 09:01 PM, Kent-Andre Mardal wrote:
> I guess you should write out exterior derivatives etc in terms of the
> "vector/tensor entries", which
> you have access to. Maybe you could even use the functions we implemented
> in exterior. Have a look at the UFL chapter in the book.

You can actually write (for instance)

   from dolfin import exterior_derivative as d

... However, this functionality is exceptionally rudimentary:
the 'd' just defaults to grad/curl/div/. based on element families
when used.

Here is a complete example:

from dolfin import *
from dolfin import exterior_derivative as d

mesh = UnitSquare(16, 16)

V = FunctionSpace(mesh, "P Lambda", 2, 0)
u = TrialFunction(V)
v = TestFunction(V)

f = Expression("1.0")
a = inner(d(u), d(v))*dx
L = f*v*dx

bc = DirichletBC(V, 0.0, "on_boundary")

u = Function(V)
solve(a == L, u, bc)

plot(u)
interactive()

--
Marie

Can you help with this problem?

Provide an answer of your own, or ask Paul Leopardi for more information if necessary.

To post a message you must log in.