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

From: Anders Logg <[email-masked]>
Date: Sun, 21 Mar 2010 21:32:47 +0100

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?

--
Anders

---

From: [email-masked]
Date: Sun, 21 Mar 2010 22:17:05 +0100

In favor.

--
Marie

> _______________________________________________
> Mailing list: https://launchpad.net/~ffc
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ffc
> More help   : https://help.launchpad.net/ListHelp
>

---

From: Kristian Oelgaard <[email-masked]>
Date: Mon, 22 Mar 2010 09:42:11 +0100 (CET)

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

Agree.

Kristian

> --
> Anders
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkumgm4ACgkQTuwUCDsYZdGpcQCgg9I/aC3fIWbCcRQ3FYatNNfe
> Tn4An2lqiC4goZ0q2zczyx/yAmillgSH
> =I7N3
> -----END PGP SIGNATURE-----
>

---

From: "Garth N. Wells" <[email-masked]>
Date: Mon, 22 Mar 2010 18:20:00 +0800

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

Me too.

Garth

---

From: Anders Logg <[email-masked]>
Date: Mon, 22 Mar 2010 11:40:54 +0100

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

ok. Let's change then.

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

--
Anders

---

From: Marie Rognes <[email-masked]>
Date: Mon, 22 Mar 2010 11:41:42 +0100

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

I can fix ffc. (Have no permission for ufl)

--
Marie

---

From: Anders Logg <[email-masked]>
Date: Mon, 22 Mar 2010 11:50:16 +0100

On Mon, Mar 22, 2010 at 11:41:42AM +0100, Marie Rognes wrote:
> I can fix ffc.

I was hoping for that. :-)

> (Have no permission for ufl)

You do now. ;-)

--
Anders

---

From: Marie Rognes <[email-masked]>
Date: Mon, 22 Mar 2010 11:50:59 +0100

>> (Have no permission for ufl)

Aka, I'll fix that too.

--
Marie

---

From: Marie Rognes <[email-masked]>
Date: Mon, 22 Mar 2010 13:43:41 +0100

>>> (Have no permission for ufl)

Fixed:

(a) ElementUnion is now called EnrichedElement.

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

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

Now, PYDOLFIN needs updating...

--
Marie

---

From: Anders Logg <[email-masked]>
Date: Mon, 22 Mar 2010 18:46:19 +0100

> Now, PYDOLFIN needs updating...

Done.

--
Anders

---

From: Marie Rognes <[email-masked]>
Date: Mon, 22 Mar 2010 19:14:51 +0100

>> Now, PYDOLFIN needs updating...

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

--
Marie

---

From: Andy Ray Terrel <[email-masked]>
Date: Fri, 26 Mar 2010 07:36:18 -0500

Could you have ffc print out a warning so dumb users like me will
remember this change when their code breaks?

-- Andy

---

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 26 Mar 2010 13:45:17 +0100 (CET)

> 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

---

From: Andy Ray Terrel <[email-masked]>
Date: Fri, 26 Mar 2010 08:23:11 -0500

On Fri, Mar 26, 2010 at 7:45 AM, Kristian Oelgaard
<[email-masked]> wrote:
> Then after a few releases we can remove the warnings again, once the dumb
> users have gotten used to the new syntax. :)

Sounds good to me.

-- Andy

---

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 26 Mar 2010 14:52:21 +0100 (CET)

>> users have gotten used to the new syntax. :)

Done, see if it helps.

Kristian