Hello everyone,

I am writing finite element software in Julia and in doing so I implemented 
an exporter to the VTK XML unstructured grid format.
The XML format has many advantages over the old legacy VTK format, you can 
for example compress the data or decompose your domain into multiple files 
that can be read in parallel etc.

Since the file format has some oddities it can be it a bit tricky to write 
an exporter for it so I thought it might be useful to post my version here 
so anyone else thinking about doing something similar can look at it.

The attached files are a working example of writing points and cells in 
ascii, binary and binary compressed format.
>From this example adding things like cell data and point data should be 
trivial.

It uses the LightXML and Codec packages.

I am not very used to working with IOBuffers so if anyone has comments or 
tips about the code it is appreciated.

Best regards

// Kristoffer

PS: MIT license

PSS: I realize I forgot to free my XML-nodes.


Attachment: exportVTK_XML.jl
Description: Binary data

Attachment: test_vtk.jl
Description: Binary data

Reply via email to