← Back to team overview

dolfin team mailing list archive

Re: meshfuntion demo error

 

Anders Logg skrev den 08/05-2007 følgende:
> On Tue, May 08, 2007 at 09:21:29PM +0200, Ola Skavhaug wrote:
> > When running src/demo/meshfunction/dolfin-meshfunction, I get the following
> > (wrong) error message:
> > 
> > Reading mesh from file mesh2D.xml.gz.
> > Reading real-valued mesh function from file meshfunction.xml.
> > Reading mesh from file meshfunction.xml.
> > *** Error: Size of mesh function (9) does not match size of mesh (1 entities
> > of dimension 16) [XMLMeshFunction.cpp:162: readMeshFunction()]
> > 
> > 
> > The meshfunction.xml file _is_ wrong, containing 9 entities of dimension 1,
> > whereas there should be 16. The error message is, however, quite misleading.
> > 
> > The fixes should be trivial.
> > 
> > Ola
> 
> ok, I've fixed the meshfunction.xml file in the demo so it's defined
> on cells (there are 8 cells). Running plot.py now gives
> 
>   File "/usr/lib/python2.5/site-packages/viper/viper_dolfin.py", line
>   86, in plot_meshfunction
>     raise RuntimeError, "Only vertex valued meshfunctions can be
>     plotted"
> RuntimeError: Only vertex valued meshfunctions can be plotted

Strange; I get the following error:
Plotting MeshFunction, press q to continue...
Reading mesh from file /tmp/filevT0M5b.xml.
Reading uint-valued mesh function from file /tmp/filevT0M5b.xml.
Reading mesh from file /tmp/filevT0M5b.xml.
Unable to plot (PyDOLFIN or Viper plotter not available).

Difficult to debug, and I definitely have both installed. Have you experienced
this behaviour yourself? If not, I'll start digging.

Ola
 
> Will fix the error message.
> 
> /Anders


Follow ups

References