VTK  9.3.1
vtkTensorPrincipalInvariants.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkTensorPrincipalInvariants_h
16 #define vtkTensorPrincipalInvariants_h
17 
18 #include "vtkDataSetAlgorithm.h"
19 #include "vtkFiltersTensorModule.h" // For export macro
20 #include "vtkNew.h" // For vtkNew
21 
22 #include <array> // for std::array
23 #include <string> // for std::string
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkDataArray;
28 class vtkDataSet;
29 
30 class VTKFILTERSTENSOR_EXPORT vtkTensorPrincipalInvariants : public vtkDataSetAlgorithm
31 {
32 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
42  vtkGetMacro(ScaleVectors, bool);
43  vtkSetMacro(ScaleVectors, bool);
45 
50  vtkGetObjectMacro(PointDataArraySelection, vtkDataArraySelection);
51 
56  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
57 
61  static std::string GetSigmaValueArrayName(const std::string& baseName, int index);
62 
66  static std::string GetSigmaVectorArrayName(const std::string& baseName, int index);
67 
68 protected:
70  ~vtkTensorPrincipalInvariants() override = default;
71 
78  bool IsSymmetricTensor(vtkDataArray* array) const;
79 
84  bool ComputePrincipalInvariants(vtkDataSet* output, vtkDataArray* array,
85  const std::string& arrayName, vtkIdType nbTuples, bool isPointData) const;
86 
90  std::array<int, 3> GetDecreasingOrder(double values[3]) const;
91 
94 
97  bool ScaleVectors = false;
98 
99 private:
101  void operator=(const vtkTensorPrincipalInvariants&) = delete;
102 };
103 
104 VTK_ABI_NAMESPACE_END
105 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
int vtkIdType
Definition: vtkType.h:315
vtkNew< vtkDataArraySelection > CellDataArraySelection
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Compute principal values and directions from symmetric tensor.
vtkNew< vtkDataArraySelection > PointDataArraySelection
a simple class to control print indentation
Definition: vtkIndent.h:28
Store on/off settings for data arrays, etc.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()