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

Add ascii and append kwargs to writevtk interface #856

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pmartorell
Copy link
Collaborator

Added ascii = false, append = ! ascii Bool kwargs to writevtk.

The defaults are set according to WriteVTK.jl manual:

https://jipolanco.github.io/WriteVTK.jl/v1.16/grids/syntax/

As ascii is not compatible with append the default append is set to ! ascii

@fverdugo
Copy link
Member

Hi @pmartorell

thanks for this.

Up to know the options we were (implicitly) using were ascii=false, append=false, right? Why to change them to ascii=false, append=true

@pmartorell
Copy link
Collaborator Author

No, the default options of vtk_grid are ascii=false, append=true.

Check the following, be aware that the example do not show the defaults. The defaults are written in bullet points.

https://jipolanco.github.io/WriteVTK.jl/v1.16/grids/syntax/#Supported-options

vtk_grid creates DatesetFile with the stated defaults, see:

https://github.com/jipolanco/WriteVTK.jl/blob/55dd5d97644c2fee761a04ea20f95e815b05ad9c/src/WriteVTK.jl#L63

In summary the behaviour (of the proposed implementation) is the following:

  • (;) -> ascii=false,append=true : vtk_grid default, writes appended binary
  • (;append=false) -> ascii=false,append=false : writes not appended binary
  • (;ascii=true) -> ascii=true,append=false : writes in ASCII
  • (;ascii=true,append=true) -> ascii=true,append=true : ascii is ignored, writes appended binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants