← Back to team overview

dolfin team mailing list archive

Re: Viper update broke DOLFIN

 

Anders Logg skrev den 25/03-2008 følgende:
> It looks like some recent updates to Viper (blame: Martin :-) has
> broken the Function class in DOLFIN.
> 
> Here's what I get when running the standard Poisson demo in DOLFIN:
> 
> Traceback (most recent call last):
>   File "demo.py", line 53, in <module>
>     f = Source(element, mesh)
>   File "demo.py", line 29, in __init__
>     Function.__init__(self, element, mesh)
>   File
>   "/home/logg/local/lib/python2.5/site-packages/dolfin/dolfin.py",
>   line 3722, in __init__
>     this = _dolfin.new_cpp_Function(*args)
> NotImplementedError: Wrong number of arguments for overloaded function
> 'new_cpp_Function'.
> 
> It looks like (Py)DOLFIN now believes that Function is the wrapped
> dolfin::Function and not dolfin.Function defined in assemble.py.
> 
> Any ideas what goes wrong?
> 
> It's possible that we just need to make a simple rearrangement of the
> order of imports.

The error is caused by the:
from dolfin import import cpp_Function as Function 
line Martin added. In PyDOLFIN, most stuff is imported by star, flattening out
all the internal namespaces. The best solution is to replace Function by
cpp_Function in Viper, though.

Ola
 
> -- 
> Anders
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev


References