← Back to team overview

ufl team mailing list archive

Re: [Ffc] New syntax for mixed and enriched spaces

 



On 26 March 2010 13:36, Andy Ray Terrel <aterrel@xxxxxxxxxxxx> wrote:
Could you have ffc print out a warning so dumb users like me will
remember this change when their code breaks?

That might be a good idea, would it be enough to put in the __add__ operator in UFL for FiniteElements?
We didn't use __mul__ before so we don't have to put a waring in there although we could do that.
Then after a few releases we can remove the warnings again, once the dumb users have gotten used to the new syntax. :)

Kristian

-- Andy

On Mon, Mar 22, 2010 at 1:14 PM, Marie Rognes <meg@xxxxxxxxx> wrote:
Anders Logg wrote:

On Mon, Mar 22, 2010 at 01:43:41PM +0100, Marie Rognes wrote:


Marie Rognes wrote:


Anders Logg wrote:


On Mon, Mar 22, 2010 at 11:41:42AM +0100, Marie Rognes wrote:


Anders Logg wrote:


On Mon, Mar 22, 2010 at 06:20:00PM +0800, Garth N. Wells wrote:


On 22/03/10 16:42, Kristian Oelgaard wrote:


On 21 March 2010 21:32, Anders Logg <logg@xxxxxxxxx> wrote:


After Marie's latest addition of enriched spaces (and
some discussion
with Doug Arnold), it seems clear that our current
notation V + W for
mixed spaces is not optimal.

Even though one may think of the operation of creating a "mixed
function space" as a direct sum,

X = {(v, 0) : v in V} \oplus {(0, w) : w in W},

it is more natural (and common) to think of it as a
Cartesian product,

X = V \times W = {(v, w) : v in V, w in W}

It would therefore be more natural to use '*' instead of '+' as
the
operation for creating mixed elements/function spaces.

That would free up '+' to be used for enriched spaces (which have
recently been added),

X = {v + w : v in V, w in W}

The typical example would be to take V piecewise
linears and W scaled
P3 bubbles.

In summary, the suggestion is to use the following notation:

+ <-->  +
* <-->  \times

It's obvious this is better than what we have now which is

+ <--> \oplus
? <--> +

Thoughts?


Agree.



Me too.

Garth


ok. Let's change then.

It will require changes in both UFL and FFC. Anyone up for it?


I can fix ffc.


I was hoping for that. :-)



(Have no permission for ufl)


You do now. ;-)



Aka, I'll fix that too.



Fixed:

(a) ElementUnion is now called EnrichedElement.

(b) (Old) V + Q --> (New) V * Q

(c) V + Q = EnrichedElement(V, Q)


Now, PYDOLFIN needs updating...


Done.



Great! (I'm off to do some Mini debugging.)

--
Marie

_______________________________________________
Mailing list: https://launchpad.net/~ffc
Post to     : ffc@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ffc
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~ffc
Post to     : ffc@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ffc
More help   : https://help.launchpad.net/ListHelp


Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References