Subject: [Ffc] strip_variables

From: "Garth N. Wells" <[email-masked]>
Date: Tue, 02 Feb 2010 22:26:13 +0000

Should the UFL function 'strip_variables' be called on a UFL form from
inside FFC? I suspect that this may fix the bug

  https://bugs.launchpad.net/ufl/+bug/512425

Garth

---

From: Anders Logg <[email-masked]>
Date: Tue, 2 Feb 2010 23:45:41 +0100

>   https://bugs.launchpad.net/ufl/+bug/512425

Not sure if that's the right place to do it. I'll have a look
tomorrow.

--
Anders

---

From: Anders Logg <[email-masked]>
Date: Tue, 2 Feb 2010 23:51:52 +0100

> Not sure if that's the right place to do it. I'll have a look

This broke the HyperElasticity demo:

*** FFC: Expecting a Variable in VariableDerivative.

But you may be onto something. For the tensor representation, this
should happen before or after the call to purge_list_tensors in
monomialextaction.py. Don't know where it should go in the quadrature
representation.

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Tue, 02 Feb 2010 22:57:33 +0000

> monomialextaction.py. Don't know where it should go in the quadrature

OK. It fixes https://bugs.launchpad.net/ufl/+bug/512425 and the DOLFIN
hyperelastic demo runs, but it seems to break caching.

Garth

---

From: "Garth N. Wells" <[email-masked]>
Date: Tue, 02 Feb 2010 23:15:02 +0000

> monomialextaction.py. Don't know where it should go in the quadrature

I've moved the function call for the quadrature representation. For the
tensor rep, I get the below error message. Does it not handle facets
normals?

Garth

File
"/usr/local/lib/python2.6/dist-packages/ffc/tensor/monomialextraction.py",
line 274, in terminal
    raise MonomialException, ("No handler defined for terminal %s." %
o._uflclass.__name__)
ffc.tensor.monomialextraction.MonomialException: No handler defined for
terminal FacetNormal.

---

From: Kristian Oelgaard <[email-masked]>
Date: Wed, 3 Feb 2010 08:41:16 +0100 (CET)

> inside FFC? I suspect that this may fix the bug

I remember that there was a problem with calling the algorithm_strip variables. I did that once as an easy fix to handle Variable, but it screwed something up I remember but what it was I don't recall. Maybe it was a performance issue?
Does calling strip_variables solve all problems related to Variable?

Kristian

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

---

From: "Garth N. Wells" <[email-masked]>
Date: Wed, 03 Feb 2010 10:35:29 +0000

Kristian Oelgaard wrote:
> I remember that there was a problem with calling the algorithm_strip
> variables. I did that once as an easy fix to handle Variable, but it
> screwed something up I remember but what it was I don't recall. Maybe it
> was a performance issue?

Seems to.

I trawled

   http://www.fenics.org/pub/mailinglists/ffc-dev.mbox

and a discussion seemed to relate to expand_indices and strip_variables,
with expand_indices being evil.

When I have time I'll ask the Launchpad admins to import our mailing
lists, unless someone else beats me to it.

Garth