← Back to team overview

dolfin team mailing list archive

Re: [Fwd: Re: buildbot linux_32]

 

On Thu, Aug 07, 2008 at 09:18:00AM +0100, Garth N. Wells wrote:
> 
> 
> Ilmar Wilbers wrote:
> > OK, the problem is that we use DOLFIN_NOPLOT=1:
> > 
> > ilmarw@multiboot:~/dolfin-ass/demo/plot/python$ export DOLFIN_NOPLOT=1
> > ilmarw@multiboot:~/dolfin-ass/demo/plot/python$ p demo.py
> > Traceback (most recent call last):
> >   File "demo.py", line 74, in <module>
> >     plot(f)
> >   File "/tmp/lib/python2.5/site-packages/dolfin/plot.py", line 19, in plot
> >     file << u
> >   File "/tmp/lib/python2.5/site-packages/dolfin/dolfin.py", line 5691, 
> > in __lshift__
> >     return _dolfin.File___lshift__(*args)
> > RuntimeError: *** Error: Only DiscreteFunctions can be written in VTK 
> > format.
> > 
> > This didn't use to happen before.
> > 
> 
> The error is 'correct' because sending anything other than a 
> DiscreteFunction to a VTK file is undefined.
> 
> I'll see if I can generalise the VTK output to user-defined functions 
> easily which should take care of the problem.
> 
> Garth

I guess it should be possible to just call interpolate() to do this.
This is how Viper plots user-defined functions.

  /// Interpolate function to vertices of mesh
  void interpolate(real* values);

This should work also for discrete functions, but then we can't save
cell-centered data for DG solutions.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


References