Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vtk/vtu data in ASCII format #59

Open
torrilhon opened this issue Dec 1, 2022 · 1 comment
Open

vtk/vtu data in ASCII format #59

torrilhon opened this issue Dec 1, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@torrilhon
Copy link

Hi!
My favorite (though awkward) choice of visualization tool would like to have the vtu-output of Trixi2Vtk in full ASCII format. Currently, the vtu-files show the metadata in ASCII, but the actual data is binary (which is of course a good choice as default...)

Ideally, Trixi2VTK would offer a flag 'format=ASCII' to switch. Apparently, you can load into paraview and save as ASCII, but having a flag would be really neat...

Thanks!

@sloede
Copy link
Member

sloede commented Dec 1, 2022

This boils down to telling WriteVTK.jl to store the output in an ASCII format. An easy approach could thus be to add a new flag such as ascii=true/false (default false) to trixi2vtk

function trixi2vtk(filename::AbstractString...;
format=:vtu, verbose=false, hide_progress=false, pvd=nothing,
output_directory=".", nvisnodes=nothing, save_celldata=true)

that then in turn sets the appropriate keyword arguments in WriteVTK.jl's vtk_grid. For example, for ultimate compatibility it would make sense to pass compress=false, append=false, ascii=true to vtk_grid.

@sloede sloede added enhancement New feature or request good first issue Good for newcomers labels Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants