dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10977
Re: Problem with compile_function
On Friday 05 December 2008 18:02:07 Anders Logg wrote:
> I'm having problems getting vector-valued constants working. Take a
> look at
>
> demo/pde/stokes/taylor-hood/python
>
> It reports
>
> assert(isinstance(defaults[i], (dict, types.NoneType)),"Wrong type
> in 'defaults'")
> TypeError: 'NoneType' object is unsubscriptable
>
> It seems like defaults is set to None and then defaults is indexed.
>
> Any ideas?
Should be fixed now. I have added better argument checking to
compile_function. But you have to send in a tuple of strings to
compile_function if you want to produce a vector values function. A list is
interpreted as len(cppexpr) number of scalar functions.
This is a bit fragile, but it is documented in the Function doc string.
Johan
Follow ups
References