Hi Kristoffer,

I’ll certainly will keep your 2 files around if you don’t mind, at least until 
I have some time to try the 2 existing packages. WriteVTK.jl seems closer to 
your bootstrap files.

Regards,
Rob J. Goedman
[email protected]





> On Apr 6, 2015, at 1:24 PM, Kristoffer Carlsson <[email protected]> wrote:
> 
> Hello Rob,
> 
> Thank you for your comments and sorry for my late answer. I have been away 
> for a while.
> 
> I should have stressed in my post that the files I attached was only a 
> minimum working example from which someone should easily be able to write 
> their own custom exporter. The data structures in those files (the Node and 
> Element types) are not something that I actually use but was just the 
> simplest possible I could figure out to not clutterer what was important, the 
> exporter.
> 
> Thank you for linking those packages! I looked for a wrapper for the VTK 
> classes but I didn't find one. If "VTK.jl" works well then I don't see much 
> use in the files I posted since using the wrapper will be much easier and 
> less error prone. I will try it out.
> 
> I don't think I will have time to create a full package but from the looks of 
> things, it seems that there already exists a few that has made good progress,
> 
> On Thursday, April 2, 2015 at 6:25:58 PM UTC+2, Rob J Goedman wrote:
> 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] <javascript:>
> 
> 
> 
> 
> 
>> On Apr 2, 2015, at 7:04 AM, Kristoffer Carlsson <[email protected] 
>> <javascript:>> 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