OLAF: Fix incorrect VTK grid output filename on first write#3389
Merged
Conversation
andrew-platt
approved these changes
Jul 14, 2026
andrew-platt
left a comment
Collaborator
There was a problem hiding this comment.
I haven't double checked all the logic, but your testing shows this now works as expected.
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 PR is ready to be merged.
Feature or improvement description
Fixes an issue in
FVW_CalcOutputwhere OLAF's VTK grid output filename on first write was always 0, regardless of when it was actually called. For example, previously, ifWrVTK = 0andTStart > 0, the code would still name the first grid file 000000000.vtk instead of the correct step index.With this change, there is a new logic:
m%FirstCallis initializedTrueand changed toFalseunconditionally at the end of the firstFVW_UpdateStatescall. So, it properly identifies the true firstFVW_CalcOutputcall (t = 0) regardless ofWrVTKornGridOutsettings.This change is implemented in lines 1540–1541. Additionally, trailing whitespace previously present in the file has been removed.
Related issue, if one exists
#3386
Impacted areas of the software
OLAF output VTK filename.