dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #04770
Re: Plotting works for elasticity demo
Garth N. Wells skrev den 26/04-2007 følgende:
>
>
> Ola Skavhaug wrote:
> >Garth N. Wells skrev den 26/04-2007 følgende:
> >>
> >>Ola Skavhaug wrote:
> >>>Garth N. Wells skrev den 26/04-2007 følgende:
> >>>>I get the error
> >>>>
> >>>>Reading function from elasticity.xml.
> >>>>Reading vector from file elasticity.xml.
> >>>>Reading mesh from file elasticity.xml.
> >>>>Traceback (most recent call last):
> >>>> File "plot.py", line 4, in ?
> >>>> plot(u, mode="displacement")
> >>>>TypeError: plot() got an unexpected keyword argument 'mode'
> >>>>
> >>>>when trying to plot.
> >>>>
> >>>>Garth
> >>>Sure, you'll need to pull and install the newest version of viper.
> >>>Anders had a similar problem (after pulling) yesterday, but we couldn't
> >>>figure out the error.
> >>>
> >>I've pulled the latest version, but I'm still getting the error.
> >>
> >>Garth
> >
> >What does line 93 in viper_dolfin.py look like? Mine (after a fresh clone)
> >looks like this:
> >
> >def plot(data, *args, **kwargs):
> >
>
> Mine looks exactly the same.
Then there is a problem with your installation, somehow.
Check viper_dolfin.py in the directory given by the following command:
python -c "import viper; print viper.__file__"
On my computer that is:
/usr/lib/python2.4/site-packages/viper/__init__.pyc
so /usr/lib/python2.4/site-packages/viper is the directory.
Ola
> Garth
>
> >Ola
> >
> >>>Ola
> >>>
> >>>
> >>>>Anders Logg wrote:
> >>>>>After som bug fixes and some improvements to Viper, plotting the
> >>>>>solution of the elasticity demo now works:
> >>>>>
> >>>>> from dolfin import *
> >>>>>
> >>>>> u = Function("elasticity.xml")
> >>>>> plot(u, mode="displacement")
> >>>>>
> >>>>>/Anders
> >>>>>_______________________________________________
> >>>>>DOLFIN-dev mailing list
> >>>>>DOLFIN-dev@xxxxxxxxxx
> >>>>>http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>>>>
> >>>>_______________________________________________
> >>>>DOLFIN-dev mailing list
> >>>>DOLFIN-dev@xxxxxxxxxx
> >>>>http://www.fenics.org/mailman/listinfo/dolfin-dev
> >
>
Follow ups
References