VTK  9.5.20251120
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
14
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
25VTK_ABI_NAMESPACE_BEGIN
26class vtkDataArray;
28class vtkDataSet;
29
30class VTKFILTERSTENSOR_EXPORT vtkTensorPrincipalInvariants : public vtkDataSetAlgorithm
31{
32public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
38
42 vtkGetMacro(ScaleVectors, bool);
43 vtkSetMacro(ScaleVectors, bool);
45
51
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
68protected:
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
99private:
101 void operator=(const vtkTensorPrincipalInvariants&) = delete;
102};
103
104VTK_ABI_NAMESPACE_END
105#endif
Store on/off settings for data arrays, etc.
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:167
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.
static vtkTensorPrincipalInvariants * New()
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.
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.
std::array< int, 3 > GetDecreasingOrder(double values[3]) const
Return the indices that sort the input values from largest to smallest.
#define vtkDataArray
int vtkIdType
Definition vtkType.h:367