← Back to team overview

dolfin team mailing list archive

Re: UFL and project.py

 


Anders Logg wrote:
> On Wed, Jan 27, 2010 at 08:34:37PM +0000, Garth N. Wells wrote:
>> I'm trying to perform a projection of a function from PyDOLFIN for
>> plotting purposes and I'm letting DOLFIN figure out the function
>> space, but I get the below error. Has 'extract_functions' been
>> re-named in the recent UFL changes?
>>
>> Garth
>>
>> Traceback (most recent call last):
>>   File "solver.py", line 65, in <module>
>>     eps_file << project(u[0].dx(0) + u[1].dx(1) + u[2].dx(2))
>>   File "/home/garth/code/fenics/dolfin/dolfin-all/local/lib/python2.6/site-packages/dolfin/fem/project.py",
>> line 42, in project
>>     V = _extract_function_space(v)
>>   File "/home/garth/code/fenics/dolfin/dolfin-all/local/lib/python2.6/site-packages/dolfin/fem/project.py",
>> line 69, in _extract_function_space
>>     functions = ufl.algorithms.extract_functions(expression)
>> AttributeError: 'module' object has no attribute 'extract_functions'
> 
> Yes, it's now name extract_coefficients.
> 

OK. I just pushed a fix (and changed a demo to help pick up any future
problems).

Garth


> This was part of the big change from Function to Coefficient inside
> UFL.
> 
> --
> Anders



References