Hi Kristoffer,

Thanks for doing this! This is very useful.

I had no problems in running the test_vtk.jl ‘as-is’ on Julia 0.4.

On Julia 0.3.7 I had to include the Compat package.

Another suggestion is to maybe (re-)name the Node and Element types to 
something less general as Node and Element are likely already used in FE 
packages. I used VTKNode and VTKElement and moved the definitions to 
exportVTK_XML.jl.

Is your intention to create a VTK_XML.jl package at some time or add it to the 
2 existing VTK related packages ( https://github.com/jipolanco/WriteVTK.jl 
<https://github.com/jipolanco/WriteVTK.jl> and 
https://github.com/ihnorton/VTK.jl <https://github.com/ihnorton/VTK.jl> )? 

Thanks again, and regards,
Rob J. Goedman
[email protected]





> On Apr 2, 2015, at 7:04 AM, Kristoffer Carlsson <[email protected]> wrote:
> 
> 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.
> 
> 
> <exportVTK_XML.jl><test_vtk.jl>

Reply via email to