← Back to team overview

ffc team mailing list archive

Re: [HG FFC] Restrictions appears to be working for the Poisson demo.

 



Anders Logg wrote:
On Tue, Aug 18, 2009 at 10:36:54PM +0200, Kristian Oelgaard wrote:
Quoting Anders Logg <logg@xxxxxxxxx>:

On Tue, Aug 18, 2009 at 08:13:22PM +0100, Garth N. Wells wrote:

changeset:   1612:de211a9d88bce134c4abc2b128283ad35415a529
tag:         tip
user:        "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
date:        Tue Aug 18 17:57:36 2009 +0100
files:       ffc/fem/finiteelement.py
description:
Restrictions appears to be working for the Poisson demo.
Excellent!

No, only interval, triangle, tetrahedron, quadrilateral and hexahedron

is predefined in UFL. I assume simplices and restrictions currently only
supports a restriction to one topological dimension lower i.e.,
tetrahedron -> triangle
triangle -> interval

We need a 'facet', which is a triangle in 3D and interval in 2D, so we
write dimension-independent forms (at least for 2D and 3D).
That should be fairly easy to add to UFL (__getitem__ in finiteelement.py).
You can check if the input argument is facet (which needs to be
added), then look at self._cell and figure out the appropriate value
of index.

Let me know if you have any trouble.
OK, this functionality should be in place now. Do note that the built-in facet
has no meaning on its own, and it only works with restrictions. I don't know
how to make this implementation better at the moment (it's still work in
progress) but feel free to have a look.

Kristian

Really nice. Now we just need a pair of demos (C++/Python). :-)


We need to do some work to have it functioning through PyDOLFIN. I think the PyDOLFIN FunctionSpace needs to be extended. Any ideas Johan?

Garth


--
Anders


------------------------------------------------------------------------

_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev




Follow ups

References