VTK  9.4.20250420
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
32VTK_ABI_NAMESPACE_BEGIN
33class vtkDataArray;
35class vtkDataSet;
37
38class VTKFILTERSTENSOR_EXPORT vtkYieldCriteria : public vtkDataSetAlgorithm
39{
40public:
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
81protected:
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
101private:
102 vtkYieldCriteria(const vtkYieldCriteria&) = delete;
103 void operator=(const vtkYieldCriteria&) = delete;
104};
105
106VTK_ABI_NAMESPACE_END
107#endif
Store on/off settings for data arrays, etc.
abstract superclass for arrays of numeric data
Superclass for algorithms that produce output of the same type as input.
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
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
Compute principal values and directions from symmetric tensor.
Compute principal stress and yield criteria from symmetric tensor.
vtkNew< vtkDataArraySelection > CriteriaSelection
static vtkYieldCriteria * New()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
vtkNew< vtkTensorPrincipalInvariants > InvariantsFilter
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
bool ComputeYieldCriteria(vtkDataSet *output, vtkDataArray *array, const std::string &arrayName, vtkIdType nbTuples, bool isPointData) const
Compute and append to the given dataset the yield criteria derived from the given array.
vtkNew< vtkDataArraySelection > CellDataArraySelection
Criterion
Enum of supported yield criteria.
~vtkYieldCriteria() override=default
vtkNew< vtkDataArraySelection > PointDataArraySelection
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkIdType
Definition vtkType.h:332