Subject: [FEniCS-users] ffc dolfin wrappers

From: David Beacham <[email-masked]>
Date: Wed, 26 Aug 2009 17:52:55 +0100

In the current nightly builds for ubuntu jaunty, I can't get ffc to 
compile my form with dolfin wrappers.

Compiling the Taylor-Hood Stokes equations I get the errors:

Compiler stage 5: Formatting code
---------------------------------
  Formatting code for UFC 1.0.
  Writing DOLFIN wrappers.
Traceback (most recent call last):
  File "/usr/bin/ffc", line 148, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/bin/ffc", line 138, in main
    compile(ufd.forms + ufd.elements, filename.split(".")[0], options)
  File "/usr/lib/python2.6/dist-packages/ffc/compiler/compiler.py", line 
100, in compile
    format_code(generated_forms, prefix, format, options)
  File "/usr/lib/python2.6/dist-packages/ffc/compiler/compiler.py", line 
200, in format_code
    format.write(generated_forms, prefix, options)
  File "/usr/lib/python2.6/dist-packages/ffc/compiler/ufcformat.py", 
line 273, in write
    output += _generate_dolfin_wrappers(generated_forms, prefix, 
options, self.format)
  File "/usr/lib/python2.6/dist-packages/ffc/compiler/ufcformat.py", 
line 669, in _generate_dolfin_wrappers
    return generate_dolfin_code(prefix, "", form_names, common_space, 
False) + "\n\n"
TypeError: generate_dolfin_code() takes exactly 3 arguments (5 given)

[The pyDolfin variant of the same code works fine: appears only to be 
dolfin wrapper generation]

Is there any work around for this? I could probably use the code as 
generated without the '-l dolfin' argument, but I don't know how much 
harder that will make it to interact with the Dolfin backend. I could 
use the python interface, but with the doxygen reference being 'current' 
it's much easier for me to cobble things together/debug in cpp and using 
the most recent build.

Regards, David

---

From: Johan Hake <[email-masked]>
Date: Wed, 26 Aug 2009 20:07:58 +0200

> Compiler stage 5: Formatting code

Hello David!

It looks like the DOLFIN version of the nightly builds are pretty old. Not 
sure why this is the case. 

You could try download the development version and compile it locally. 

  hg clone http://www.fenics.org/hg/dolfin

You might also want to give Dorsal a try:

  http://www.fenics.org/wiki/Dorsal

Its a bunch of install scripts for the FEniCS packages.

Johan

---

From: David Beacham <[email-masked]>
Date: Thu, 27 Aug 2009 09:52:58 +0100

> Its a bunch of install scripts for the FEniCS packages.

Downloaded dorsal and now everything appears to be working.

Thanks very much! David.