Mode shape variable off by one error
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Description of the bug from my user. (Ask me for data, if needed. I have a good dataset. example_beam-eig.g)
I think that there is a bug (or at least inconsistency) with the way that the "mode_shape" array is printed when the AnnotateGlobalData filter is used. "mode_shape" uses a 0-based index, while the "Mode shape slider" uses a 1-based index.
The result is that when I select mode 5 using the slider, AnnotateGlobalData actually prints "Value is: (4)"
To reproduce:
-
Load a model with modal data (probably any model with time data is fine).
-
Select "Has mode shapes"
2a. Move the slider to any number and call it "N" -- leave it at 1 if you want
- Add a "AnnotateGlobalData" filter
3a. Select "mode_shape" as the array
3b. Apply
The screen will show "Value is: (N-1)" (where N-1 is an actual integer)
I believe that either the slider needs to use a 0-based index, or the mode_shape array needs to use a 1-based index. The 1-based index makes slightly more sense for modal data, but either way is fine.
A second issue -- I don't think the parenthesis should be printed around the index. E.g. "Value is: (1)" vs. "Value is: 1"