← Back to team overview

dolfin team mailing list archive

Re: further demo problems

 

On Mon, Mar 31, 2008 at 03:50:23PM +0200, Ilmar Wilbers wrote:
> 
> 
> Anders Logg wrote:
> > On Mon, Mar 31, 2008 at 02:56:47PM +0200, Ilmar Wilbers wrote:
> >   
> >> Ilmar Wilbers wrote:
> >>     
> >>> demo/mesh/meshfunction/python
> >>> demo/mesh/partitioning/python
> >>> demo/mesh/refinement/python
> >>> demo/pde/dg/python
> >>> demo/pde/mixed-poisson/python
> >>> The plot is only displayed a few milliseconds (Viper problem).
> >>>
> >>>   
> >>>       
> >> It would be better to replace
> >>
> >> plot(sigma)
> >> plot(u)
> >> interactive()
> >>
> >> with
> >>
> >> plot(sigma, interactive=True)
> >> plot(u, interactive=True)
> >>     
> >
> > I thought it would be nice to be able to see both plots at the same
> > time? (Which is possible if you just move one of the windows.)
> >
> >   
> Sure, I agree. It is just not clear that there is a second window below 
> the first, so when done with the top one, and pressing 'q', both 
> dissapear. But nevermind, this is not very important.

I guess the window manager should handle this.

> >> in demo/pde/mixed-poisson/python, else the two plots will be on top of 
> >> each other and both will be closed upon pressing 'q'. The rest it fine.
> >>     
> >>> demo/mesh/subdomains/cpp
> >>> demo/mesh/subdomains/python
> >>> Maybe give some output from running the program? Like: 'generated file 
> >>> subdomains.xml'?
> >>>
> >>>   
> >>>       
> >> No changes.
> >>     
> >
> > I added a line here to increase the debug level. Don't you get any
> > output?
> >
> >   
> Nope, nothing...

Should be fixed now (I added it to the wrong demo before).

> >>> demo/ode
> >>> Demos are not compiled, do not follow the directory structure of the 
> >>> other demos, and don't work.
> >>>
> >>>   
> >>>       
> >> No changes.
> >>     
> >
> > ok, try again.
> >
> > The Python interface of the ODE solver is broken. It shouldn't be much
> > work to fix it, but it hasn't been done.
> >
> >   
> What am I looking for here, except for the aliev-panfilov directory 
> (cpp/demo works), all directories only contain a main.cpp and plot.py. 
> Nothing is built.

The cpp directories are there now and things work for me.

-- 
Anders


> >>> demo/pde/convection-diffusion/python
> >>> ...
> >>> Applying boundary conditions to linear system.
> >>> Traceback (most recent call last):
> >>>    File "demo.py", line 65, in <module>
> >>>      solve(A, u1.vector(), b)
> >>>    File "/usr/local/lib/python2.5/site-packages/dolfin/dolfin.py", line 
> >>> 3683, in solve
> >>>      return _dolfin.solve(*args)
> >>> TypeError: in method 'solve', argument 2 of type 'dolfin::Vector &'
> >>>
> >>>   
> >>>       
> >> Seems fine. But should add interactive=True to plot.
> >>     
> >
> > There seems to be some more trouble with this demo. The solution
> > remains constant (it should change with time). I couldn't figure out
> > what goes wrong.
> >
> >   
> >>> demo/pde/elasticity/cpp
> >>> The plot looks completely weird! Python version gives the correct plot.
> >>>
> >>>   
> >>>       
> >> Still broken.
> >>     
> >
> > Here too.
> >
> >   
> >>> demo/pde/mixed-poisson/python
> >>> demo/pde/stokes/stabilized/python
> >>> ...
> >>> Ordering mesh entities...
> >>> swig/python detected a memory leak of type 'SubFunction *', no 
> >>> destructor found.
> >>>
> >>>   
> >>>       
> >> Still there, but that is OK, perhaps?
> >>     
> >
> > It's been there for a while and I don't know how to fix it.
> >
> >   
> >>> demo/pde/periodic/python
> >>> ...
> >>>    Applying boundary conditions to linear system.
> >>> Traceback (most recent call last):
> >>>    File "demo.py", line 68, in <module>
> >>>      u = pde.solve()
> >>>    File "/usr/local/lib/python2.5/site-packages/dolfin/assemble.py", 
> >>> line 193, in solve
> >>>      cpp_DirichletBC.apply(bc, A, b, self.dof_maps.sub(1), compiled_form)
> >>> TypeError: unbound method apply() must be called with cpp_DirichletBC 
> >>> instance as first argument (got PeriodicBC instance instead)
> >>>
> >>>   
> >>>       
> >> No changes.
> >>     
> >
> > Haven't looked at this yet.
> >
> >   
> >>> demo/pde/stokes/stabilized/python
> >>> demo/pde/stokes/taylor-hood/python
> >>> Only the second of two plot is displayed.
> >>>
> >>>   
> >>>       
> >> The same goes for these two,
> >>
> >> plot(U)
> >> plot(P)
> >> interactive()
> >>
> >> should be replaced by
> >>
> >> # Plot solution
> >> plot(U, interactive=True)
> >> plot(P, interactive=True)
> >>     
> >
> > Yes, if that's what we want (see above).
> >
> >   
> >>> demo/quadrature/python
> >>> ilmarw@*****:python$ python demo.py lobatto 10
> >>> Traceback (most recent call last):
> >>>    File "demo.py", line 43, in <module>
> >>>      sys.exit(main(sys.argv[1:]))
> >>>    File "demo.py", line 33, in main
> >>>      q = LobattoQuadrature(n);
> >>> NameError: global name 'LobattoQuadrature' is not defined
> >>>
> >>>   
> >>>       
> >> Fixed...
> >>     
> >
> > Yes.
> >
> >   
> >>> In addition, there are a few 'fix me' demos.
> >>>       
> >
> > Yes. Note that not all Python demos have worked before. The state the
> > demos are in now is close to the best they have ever been in. So it's
> > not the new build system, it's just that the Python interface and
> > demos are work in progress.
> > dd
> >   
> ilmar
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev


Follow ups

References