Subject: [FFC-dev] ffc ValueError

From: "Brandon Chabaud" <[email-masked]>
Date: Fri, 12 Dec 2008 11:41:15 -0600

Hi,

I coded a .form file for an elasticity problem that I'm trying to simulate,
but I'm getting an error when I run ffc that I don't know how to fix.  Here
is the part of my code that is giving me the error:

Element1 = VectorElement("Discontinuous Lagrange", "triangle", 0, 4)
Element2 = VectorElement("Discontinuous Lagrange", "triangle", 0, 4)
Element3 = VectorElement("Discontinuous Lagrange", "triangle", 0)
Element4 = FiniteElement("Discontinuous Lagrange", "triangle", 0)
combo = Element1 + Element2 + Element3 + Element4

(z, w, v, q) = TestFunctions(combo)

Here is the error message I get when I type ffc -l dolfin -d1 Solid.form at
the terminal:

This is FFC, the FEniCS Form Compiler, version 0.5.1.
For further information, go to http://www.fenics.org/ffc/.

Preprocessing form file: Solid.form --> Solid.py

Traceback (most recent call last):
  File "/home/grad/chabaud/local/bin/ffc", line 218, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/grad/chabaud/local/bin/ffc", line 107, in main
    execfile(script, {})
  File "Solid.py", line 15, in <module>
    (z, w, v, q) = TestFunctions(combo)
ValueError: need more than 2 values to unpack

Does anyone know how to fix this?

Thanks.

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Fri, 12 Dec 2008 18:56:31 +0100

combo = MixedElement([Element1, Element2, Element3, Element4])

What you did creates a hierarchy like [[[E1, E2], E3], E4]

Martin

On Fri, Dec 12, 2008 at 6:41 PM, Brandon Chabaud <[email-masked]> wrote:
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
>

---

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 12 Dec 2008 18:56:50 +0100

> combo = Element1 + Element2 + Element3 + Element4

I believe this will result in something like:
combo = ((Element1 + Element2) + Element3) + Element4

You want:

Kristian