Subject: [Ffc] integral meta-data

From: "Garth N. Wells" <[email-masked]>
Date: Sun, 23 May 2010 11:14:49 +0100

Where are we at with attaching data to integrals? The quadrature order 
can be attached, but I's like to do:

     dS({"representation": "tensor"})

Is this supported by FFC?

Garth

---

From: Kristian Oelgaard <[email-masked]>
Date: Sun, 23 May 2010 12:51:18 +0200

On 23 May 2010 12:14, Garth N. Wells <[email-masked]> wrote:
> Where are we at with attaching data to integrals? The quadrature order can
> be attached, but I's like to do:
>

I'm quite sure that it was supported before we redesigned FFC, so it
should be possible to add back
although I currently don't have an overview of how difficult it will
be (probably relatively easy).

Kristian

>
> Garth
>
> _______________________________________________
> 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: Sun, 23 May 2010 14:58:08 +0200

>> Is this supported by FFC?

It looks like this is already supported in FFC.
Note that the representation must be the same on each subdomain (this
is also a requirement for quadrature_degree).

 dS(0, {"representation": "tensor"}) + dS(0, {"representation": "quadrature"})

is not possible, but

 dS(1, {"representation": "tensor"}) + dS(0, {"representation": "quadrature"})

is.

Also note that metadata overrides command line options.

Kristian

---

From: "Garth N. Wells" <[email-masked]>
Date: Sun, 23 May 2010 14:08:51 +0100

On 23/05/10 13:58, Kristian Oelgaard wrote:
> On 23 May 2010 12:51, Kristian Oelgaard<[email-masked]>  wrote:
>> On 23 May 2010 12:14, Garth N. Wells<[email-masked]>  wrote:

OK.

     dS(0, {"representation": "tensor"}) \
   + dS(0, {"representation": "tensor"})

works, but

     dS({"representation": "tensor"}) \
   + dS({"representation": "tensor"})

doesn't. Seems like a bug.

Turns out I can't use this anyway because facet normals are not 
supported by FFC with the tensor representation,

     ffc.tensor.monomialextraction.MonomialException: No handler defined 
for terminal FacetNormal

Garth

---

From: Kristian Oelgaard <[email-masked]>
Date: Sun, 23 May 2010 15:32:51 +0200

> doesn't. Seems like a bug.

It's because domain_id is not a keyword argument in the __call__
function of Measure.
I changed this such that you can do:

 dS(metadata={"representation": "tensor"}) \
 + dS(metadata={"representation": "tensor"})

> Turns out I can't use this anyway because facet normals are not supported by
> FFC with the tensor representation,
>
>    ffc.tensor.monomialextraction.MonomialException: No handler defined for
> terminal FacetNormal

I don't know if this is just because it is not implemented yet, or
because it is not possible to support this with
tensor representation.

Kristian

---

From: Anders Logg <[email-masked]>
Date: Sun, 23 May 2010 15:59:26 +0200

> because it is not possible to support this with

It's possible to support (and has been before), but I removed some
"extra features" of the tensor representation since those were
supported by quadrature anyway.

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Sun, 23 May 2010 15:06:28 +0100

On 23/05/10 14:59, Anders Logg wrote:
>> On 23 May 2010 15:08, Garth N. Wells<[email-masked]>  wrote:
>>>
>>>

It would be nice to have the normal vector working. Does it work for 
exterior integrals? The exterior case is very common.

Garth

---

From: Anders Logg <[email-masked]>
Date: Sun, 23 May 2010 16:58:37 +0200

> exterior integrals? The exterior case is very common.

I would not object to it being added but it's not very high on my list
of priorities to add it.

--
Anders