← Back to team overview

dolfin team mailing list archive

Re: Bug in conversion from Diffpack

 

On Mon, September 1, 2008 14:59, Anders Logg wrote:
> I get the following error when trying to convert a Diffpack grid to a
> DOLFIN mesh:
>
> Convert from Diffpack tetrahedral grid format to DOLFIN XML.
> Traceback (most recent call last):
>   File "/scratch/fenics/dolfin/dolfin-petsc/local/bin/dolfin-convert",
>   line 110, in <module>
>     main(sys.argv[1:])
>   File "/scratch/fenics/dolfin/dolfin-petsc/local/bin/dolfin-convert",
>   line 61, in main
>     meshconvert.convert2xml(ifilename, ofilename, iformat=iformat)
>   File
>   "/scratch/fenics/dolfin/dolfin-petsc/local/lib/python2.5/site-packages/dolfin/meshconvert.py",
>   line 1193, in convert2xml
>     convert(ifilename, XmlHandler(ofilename), iformat=iformat)
>   File
>   "/scratch/fenics/dolfin/dolfin-petsc/local/lib/python2.5/site-packages/dolfin/meshconvert.py",
>   line 1226, in convert
>     diffpack2xml(ifilename, ofilename)
>   File
>   "/scratch/fenics/dolfin/dolfin-petsc/local/lib/python2.5/site-packages/dolfin/meshconvert.py",
>   line 631, in diffpack2xml
>     write_header_vertices(ofile, num_vertices)
> UnboundLocalError: local variable 'num_vertices' referenced before
> assignment
>
> Any ideas what goes wrong?

Your Diffpack grid probably doesn't specify the number of nodes in the
header which seems to be required. The error isn't handle very well
though.

Johannes

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




References