VTK  9.3.1
vtkYieldCriteria.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
23 #ifndef vtkYieldCriteria_h
24 #define vtkYieldCriteria_h
25 
26 #include "vtkDataSetAlgorithm.h"
27 #include "vtkFiltersTensorModule.h" // For export macro
28 #include "vtkNew.h" // For vtkNew
29 
30 #include <string> // for std::string
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkDataArray;
35 class vtkDataSet;
37 
38 class VTKFILTERSTENSOR_EXPORT vtkYieldCriteria : public vtkDataSetAlgorithm
39 {
40 public:
41  static vtkYieldCriteria* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
48  enum class Criterion
49  {
50  PrincipalStress = 0,
51  Tresca,
52  VonMises
53  };
54 
56 
60  vtkGetMacro(ScaleVectors, bool);
61  vtkSetMacro(ScaleVectors, bool);
63 
68  vtkGetObjectMacro(PointDataArraySelection, vtkDataArraySelection);
69 
74  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
75 
79  vtkGetObjectMacro(CriteriaSelection, vtkDataArraySelection);
80 
81 protected:
83  ~vtkYieldCriteria() override = default;
84 
89  bool ComputeYieldCriteria(vtkDataSet* output, vtkDataArray* array, const std::string& arrayName,
90  vtkIdType nbTuples, bool isPointData) const;
91 
94 
99  bool ScaleVectors = false;
100 
101 private:
102  vtkYieldCriteria(const vtkYieldCriteria&) = delete;
103  void operator=(const vtkYieldCriteria&) = delete;
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 #endif
Compute principal stress and yield criteria from symmetric tensor.
vtkNew< vtkDataArraySelection > PointDataArraySelection
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
int vtkIdType
Definition: vtkType.h:315
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.
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.
vtkNew< vtkDataArraySelection > CriteriaSelection
vtkNew< vtkTensorPrincipalInvariants > InvariantsFilter
Criterion
Enum of supported yield criteria.
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.
vtkNew< vtkDataArraySelection > CellDataArraySelection
static vtkDataSetAlgorithm * New()