Patch vtkArrayCalculator
The goal of this MR is to address issues that were noticed in the original MR !8182 (merged) by @ben.boeckel.
For vtkExprTkFunctionParser
- Add ParseMode
- Add documentation about return error value
- Use std::numeric_limits::quiet_NaN() as error value
- Use size_t wherever possible
- Check if vector name exists in scalar and vise-versa
- Add check for addition of variable that is a keyword
- Add sign and ln functions for compatibility with old parser
- Convert Function to std::string
- Document why we use pointers for ExprTk
- Remove Parser Error
- Use const std::string& in setters wherever possible
- Remove const from values in setters
- Implement cross and norm robustly using syntax techniques methods
- if a usage of the
.
symbol is detected that is not part of a number, then a warning is printed for possible usage of old dot product format. Once vtkFunctionParser is deprecated. This warning will be removed.
For vtkArrayCalculator
- Update documentation about sign and ln
- Bring back GetComponent()
- Use Enum Getter/Setter for FunctionParserType and add explicit setters
For Tests:
- Remove vtkMath::Random calls
- Chain std::cout
- Use bool for status
- Revert a change in a specific array
TODO: There is a bug in ExprTk which the author will look over the weekend. Once this is fixed, the if statements replacements will also be removed in another MR.
Once this MR is merged, then paraview/paraview!5090 (merged) can also be merged.
Edited by Spiros Tsalikis