JuliaVTK / WriteVTK.jl

Julia package for writing VTK XML files
Other
155 stars 33 forks source link

pvd collection doesn't allow vtk in subfolder #51

Closed sebastianpech closed 5 years ago

sebastianpech commented 5 years ago

Why is the full path to the vtk files removed when using pvd collections?

https://github.com/jipolanco/WriteVTK.jl/blob/62f2f01072ca3c261e3bac823ddf72a040f3b672/src/gridtypes/ParaviewCollection.jl#L23

This could be replaced with something like this to allow having all vtk files in a subfolder.

fname = relpath(datfile.path |> abspath ,pvd.path |> abspath |> splitdir |> first)
sebastianpech commented 5 years ago

I can quickly make a PR if you want. I have already changed this in my fork

jipolanco commented 5 years ago

You're right, that seems to be a better solution. Feel free to make a PR.