Skip to content

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

  1. Add ParseMode
  2. Add documentation about return error value
  3. Use std::numeric_limits::quiet_NaN() as error value
  4. Use size_t wherever possible
  5. Check if vector name exists in scalar and vise-versa
  6. Add check for addition of variable that is a keyword
  7. Add sign and ln functions for compatibility with old parser
  8. Convert Function to std::string
  9. Document why we use pointers for ExprTk
  10. Remove Parser Error
  11. Use const std::string& in setters wherever possible
  12. Remove const from values in setters
  13. Implement cross and norm robustly using syntax techniques methods
  14. 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

  1. Update documentation about sign and ln
  2. Bring back GetComponent()
  3. Use Enum Getter/Setter for FunctionParserType and add explicit setters

For Tests:

  1. Remove vtkMath::Random calls
  2. Chain std::cout
  3. Use bool for status
  4. 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

Merge request reports