Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for VTI/VTK output (Parallel VTK ImageData XML format), enabling seamless integration with ParaView and facilitating post-processing using Python or MATLAB scripts.
I am submitting a new pull request for this feature because the previous one included additional changes to the code, which would make it harder to track modifications in the future.
This is a standalone implementation and does not require external libraries to build.
In the previous pull request, @JamesEMcClure suggested adding a CMake option to disable building VTK support. Initially, I thought this would be a good idea, but after modifying the CMake configuration, I realized it would require several changes to the CMake scripts for a feature that does not depend on external libraries. Since users can simply ignore it if they do not want to use it, the added complexity does not seem justified.
The implementation has been designed to preserve the existing structure of the IO module and to reuse already allocated arrays, ensuring both consistency and memory efficiency.
The output format can be configured through the simulation input file as follows:
When selected, this option generates VTK-compatible output files that can be directly visualized in ParaView or used for further analysis in external tools.
Due to the current approach used for storing velocity components—where each component is maintained as a separate scalar array—the velocity field is not written as a vector field in the VTK output.
This limitation does not affect the correctness of the data and can be easily addressed in ParaView by combining the individual scalar components into a vector field. The same behavior also occurs in the SILO output format.
Also included in this PR is a small bug fix related to IO::initialize function usage. This function requires a bool parameter but some calls in code used "true" or "false" as a string leading to incorrect behavior.