Subject: [FFC-dev] [HG FFC] Use form instead of form_data in compiler stage 3

From: [email-masked] (FFC)
Date: Thu, 5 Mar 2009 22:19:12 +0100 (CET)

One or more new changesets pushed to the primary ffc repository.
A short summary of the last three changesets is included below.

changeset:   1372:19f68f217564f18384dd29d30081268e1d583163
tag:         tip
user:        Anders Logg <[email-masked]>
date:        Thu Mar 05 22:19:10 2009 +0100
files:       ffc/compiler/representation/quadrature/uflquadraturerepresentation.py ffc/compiler/representation/tensor/tensorrepresentation.py ffc/compiler/representation/tensor/ufltensorrepresentation.py ffc/compiler/uflcompiler.py
description:
Use form instead of form_data in compiler stage 3

changeset:   1371:1a5ef1717e6c0d62fa58133577699a584ec6cc94
user:        Anders Logg <[email-masked]>
date:        Thu Mar 05 21:51:51 2009 +0100
files:       ffc/compiler/uflcompiler.py
description:
Further simplification of metadata handling. Or is it important to sum the
integrals in the correct order (cell integrals, interior and exterior facet integral)?

changeset:   1370:ae783bcaa17d06988af4a5cb71674252a32632a4
parent:      1369:6e7dfde844e7da189662b8653d9777df093cfeb9
parent:      1368:f6dea726d1ee0fdb682841f6e78244ec7666710c
user:        Anders Logg <[email-masked]>
date:        Thu Mar 05 21:32:17 2009 +0100
files:       demo/Projection.form demo/Projection.ufl test/regression/reference/Projection.h
description:
merge

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/ffc

---

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 06 Mar 2009 10:23:24 +0100

Quoting FFC <[email-masked]>:

> files:
> ffc/compiler/representation/quadrature/uflquadraturerepresentation.py
> ffc/compiler/representation/tensor/tensorrepresentation.py
> ffc/compiler/representation/tensor/ufltensorrepresentation.py
> ffc/compiler/uflcompiler.py
> description:

This caused me quite a bit of grief.

Try:
print form
print form.form_data().form

on any form involving functions. In the first instance the coefficients has
arbitrary indices, in the second the index corresponds to the correct function
number in the form.

Maybe I'm the only one not knowing this but it did break the quadrature
generation.

Kristian

> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Fri, 6 Mar 2009 10:29:10 +0100

> Maybe I'm the only one not knowing this but it did break the quadrature

Also, in the second one, derivatives are expanded
and indices renumbered from 0.

Without expanded derivatives, the functions and
basis functions are not correct for all forms.

Without renumbered indices and arguments,
the repr-based signature will often break.

I'm always using form_data().form in the form compiler.

For the record, try this:
  print form.form_data().original_form

Which gives back the untransformed form.

Any reason why you're not using load_forms?

Martin

---

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 06 Mar 2009 10:45:36 +0100

> basis functions are not correct for all forms.

Yup, that's part of what broke.

> I'm always using form_data().form in the form compiler.

Me too, from now on that is....

> Any reason why you're not using load_forms?

I didn't know that it existed or what it does, but it looks like it should/could
be used in the top ffc script. Anders?

Kristian

---

From: Anders Logg <[email-masked]>
Date: Fri, 6 Mar 2009 12:10:46 +0100

> be used in the top ffc script. Anders?

Yes, we should use it instead of generating and then executing Python
code in the ffc script. I just haven't gotten around to it yet.

-- 
Anders