[BugFix] WrVTK with VTK_fps fails#2831
Conversation
Co-authored-by: Yuksel-Rudy <yuksel.alkarem@maine.edu>
|
I'm curious what the context was for the existing form. With the I agree that the NINT form is the fix for the problem I mentioned, but I'm wondering if this has a side effect if something else was expecting the other form for |
|
Also thanks for fixing this so quickly! |
|
Looking at the history, I'm a bit suspicious that something merged incorrectly in those sections of code when the FSI CFD coupling was added. So I suspect that the original functionality was to do T=0 and the ending time step, but a bad merge clobbered that and we didn't notice until now (there were a lot of merge conflicts in that integration). |
Ready to merge
Feature or improvement description
If
WrVTKis non-zero, settingVTK_fps=0causes a failure as follows:The intent of
VTK_fps=0was to output atT=0and at the last step of the simulation. However, due to the way it was setup, this wasn't working due to a negative value for the field width for the time step in the VTK filenames. Internally the math for calculating the width was as follows:which evaluated to
CEILING( log10( 2000 / 2147483647 )) + 1 = -5causing the format failure.This has been corrected so that now
p%n_VTKTime = NINT( p%TMax / p%DT )givingVTK_tWidthwill evaluate to1and triggering VTK writes at the last time step.Related issue, if one exists
#2827
Impacted areas of the software
VTK outputs only when
VTK_fps=0Test results, if applicable
No results change