Subject: [FFC-dev] Re: Elasticity.form broken?

From: Johan Jansson <[email-masked]>
Date: Wed, 15 Feb 2006 13:13:29 +0100

On Wed, Feb 15, 2006 at 10:08:24AM +0100, Marco Morandini wrote:
> I write here because I don't know if
> this is a dolphin, fcc or fiat problem, or, more likely,
> I'm simply doing something wrong.
> 
> With today version (from mercurial)
> of dolphin and ffc, and yesterday's cvs snapshot of FIAT:
> 

Hi Marco,

I think FFC isn't synced with the development version of FIAT right
now. If you use the latest release version of FIAT (0.2.3) it should
work better:

http://www.fenics.org/pub/software/fiat/

Hope this helps,
  Johan

---

From: Anders Logg <[email-masked]>
Date: Wed, 15 Feb 2006 10:22:08 -0600

> http://www.fenics.org/pub/software/fiat/

I didn't know. This is an issue for FFC, so I move it to the FFC list.

I will take a look and see why it doesn't work with the lastest FIAT.

/Anders

---

From: Anders Logg <[email-masked]>
Date: Wed, 15 Feb 2006 13:47:48 -0600

I tried the latest FIAT from CVS and the latest FFC from Mercurial
with the latest Elasticity.form from DOLFIN and it works fine for me.

>From your original report, it looks like the problem may be with
Python Numeric. Which version do you have installed? (I have 23.8-4
from Debian/Ubuntu.)

marco@mbdyn-mm:~/Programmi/Dolphin/dolfin/src/modules/elasticity/dolfin>
python Elasticity.py
Traceback (most recent call last):
  File "Elasticity.py", line 39, in ?
    sigma = E(epsilon(u), lmbda, mu)
  File "Elasticity.py", line 35, in E
    Ee = 2.0 * mult(mu, e) + mult(lmbda, mult(trace(e), Identity(d)))
  File
  "/home/marco/local/Fenics/lib/python/ffc/compiler/operators.py",
line 105, in mult
    vv = Numeric.array(v)
ValueError: invalid input sequence

Try to print out v (print v) on line 105 in operators.py and see what
you get. (Then compile with ffc -d1 for debugging and tracebacks.)

You can also try the following in a Python shell and see if it works:

>>> from ffc import *
>>> from Numeric import *
>>> element = FiniteElement("Lagrange", "triangle",1)
>>> v = BasisFunction(element)
>>> array(v)
vi0

/Anders

On Wed, Feb 15, 2006 at 10:22:08AM -0600, Anders Logg wrote:
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
> 

-- 
Anders Logg
Research Assistant Professor
Toyota Technological Institute at Chicago
http://www.tti-c.org/logg/

---

From: Marco Morandini <[email-masked]>
Date: Thu, 16 Feb 2006 12:13:32 +0100

> Python Numeric. Which version do you have installed? (I have 23.8-4

24.0 from Suse 10.0

You are right, it works fine both with 23.8 and 24.2, so I'll stick to 24.2
I've not checked with 24.1.

> you get. (Then compile with ffc -d1 for debugging and tracebacks.)

print v:
c1

> ffc -d1 Elasticity.form
This is FFC, the FEniCS Form Compiler, version 0.2.5.
For further information, go to http://www/fenics.org/ffc/.
-d 1
Parsing Elasticity.form
Output written to Elasticity.py
Traceback (most recent call last):
   File "/home/marco/local/Fenics/bin/ffc", line 121, in ?
     main(sys.argv[1:])
   File "/home/marco/local/Fenics/bin/ffc", line 81, in main
     execfile(outname, ns)
   File "Elasticity.py", line 39, in ?
     sigma = E(epsilon(u), lmbda, mu)
   File "Elasticity.py", line 35, in E
     Ee = 2.0 * mult(mu, e) + mult(lmbda, mult(trace(e), Identity(d)))
   File "/home/marco/local/Fenics/lib/python/ffc/compiler/operators.py",
line 106, in mult
     vv = Numeric.array(v)
ValueError: invalid input sequence

Traceback (most recent call last):
   File "<stdin>", line 1, in ?
ValueError: invalid input sequence

Thanks,

Marco

---

From: Johan Jansson <[email-masked]>
Date: Thu, 16 Feb 2006 13:03:25 +0100

> I've not checked with 24.1.

Great that you found the problem. Sorry for confusing the issue.

  Johan

---

From: Anders Logg <[email-masked]>
Date: Thu, 16 Feb 2006 09:44:02 -0600

ok, let's hope this just happens for 24.0 on Suse. If the problem
should turn up again, we can find a suitable work-around.

/Anders