VTK  9.3.0
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 
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 on/off settings for data arrays, etc.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:45
Superclass for algorithms that produce output of the same type as input.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:53
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Compute principal values and directions from symmetric tensor.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool IsSymmetricTensor(vtkDataArray *array) const
Determine whether the given array corresponds to a symmetric 3D tensor (6 components) or 2D tensor (3...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
std::array< int, 3 > GetDecreasingOrder(double values[3]) const
Return the indices that sort the input values from largest to smallest.
vtkNew< vtkDataArraySelection > PointDataArraySelection
~vtkTensorPrincipalInvariants() override=default
vtkNew< vtkDataArraySelection > CellDataArraySelection
static std::string GetSigmaVectorArrayName(const std::string &baseName, int index)
Return the given array name with a suffix for principal vectors attached.
static std::string GetSigmaValueArrayName(const std::string &baseName, int index)
Return the given array name with a suffix for principal values attached.
static vtkTensorPrincipalInvariants * New()
bool ComputePrincipalInvariants(vtkDataSet *output, vtkDataArray *array, const std::string &arrayName, vtkIdType nbTuples, bool isPointData) const
Compute and append to the given dataset the principal values and directions from the given array.
@ index
Definition: vtkX3D.h:246
@ string
Definition: vtkX3D.h:490
int vtkIdType
Definition: vtkType.h:315