VTK  9.5.20250614
vtkIntegrationGaussianStrategy.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
22#ifndef vtkIntegrationGaussianStrategy_h
23#define vtkIntegrationGaussianStrategy_h
24
25#include "vtkCellType.h" // For VTKCellType
26#include "vtkDataSet.h" // For Intermediate
27#include "vtkFiltersParallelModule.h" // For export macro
29#include "vtkSmartPointer.h" // For Intermediate
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkDataSet;
34class vtkIdTypeArray;
40
41class VTKFILTERSPARALLEL_EXPORT vtkIntegrationGaussianStrategy : public vtkIntegrationStrategy
42{
43public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
53 vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, vtkIdType pt4Id, double& sum,
54 double sumCenter[3], vtkIntegrateAttributesFieldList& cellFieldList,
55 vtkIntegrateAttributesFieldList& pointFieldList, int index) override;
56
58 vtkIdType cellId, vtkIdType numPts, const vtkIdType* cellPtIds, vtkIdList* cellPtIdsList,
59 double& sum, double sumCenter[3], vtkIntegrateAttributesFieldList& cellFieldList,
60 vtkIntegrateAttributesFieldList& pointFieldList, int index) override;
61
63 vtkIdType cellId, vtkIdType numPts, const vtkIdType* cellPtIds, vtkIdList* cellPtIdsList,
64 double& sum, double sumCenter[3], vtkIntegrateAttributesFieldList& cellFieldList,
65 vtkIntegrateAttributesFieldList& pointFieldList, int index) override;
66
68 vtkIdType cellId, vtkIdType numPts, const vtkIdType* cellPtIds, vtkIdList* cellPtIdsList,
69 double& sum, double sumCenter[3], vtkIntegrateAttributesFieldList& cellFieldList,
70 vtkIntegrateAttributesFieldList& pointFieldList, int index) override;
72
74
79 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
81 int index) override;
82
84 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
86 int index) override;
87
89 vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, double& sum, double sumCenter[3],
91 int index) override;
92
94 vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, vtkIdType pt4Id, double& sum,
95 double sumCenter[3], vtkIntegrateAttributesFieldList& cellFieldList,
96 vtkIntegrateAttributesFieldList& pointFieldList, int index) override;
97
99 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
101 int index) override;
102
104 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
106 int index) override;
107
109 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
111 int index) override;
112
114 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
116 int index) override;
117
119 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
121 int index) override;
123
125
130 vtkIdType numPts, const vtkIdType* cellPtIds, double& sum, double sumCenter[3],
132 int index) override;
133
135 vtkIdType cellId, vtkIdType numPts, vtkIdList* cellPtIds, double& sum, double sumCenter[3],
137 int index) override;
139
141
145 double k, vtkIntegrateAttributesFieldList& fieldlist, int fieldlist_index) override;
146
148 vtkIdType pt2Id, double k, vtkIntegrateAttributesFieldList& fieldlist,
149 int fieldlist_index) override;
150
152 vtkIdType pt2Id, vtkIdType pt3Id, double k, vtkIntegrateAttributesFieldList& fieldlist,
153 int fieldlist_index) override;
154
156 vtkIdType pt2Id, vtkIdType pt3Id, vtkIdType pt4Id, double k,
157 vtkIntegrateAttributesFieldList& fieldlist, int fieldlist_index) override;
159
163 void Initialize(vtkDataSet* input) override;
164
165protected:
168
169private:
171 void operator=(const vtkIntegrationGaussianStrategy&) = delete;
172
176 void IntegrateGaussian(vtkDataSet* input, vtkUnstructuredGrid* output, VTKCellType celltype,
177 vtkIdType cellId, vtkIdType numPts, const vtkIdType* cellPtIds, vtkIdList* cellPtIdsList,
178 double& sum, double sumCenter[3], vtkIntegrateAttributesFieldList& cellFieldList,
179 vtkIntegrateAttributesFieldList& pointFieldList, int index);
180
184 void IntegratePointDataGaussian(vtkDataSetAttributes* outda, vtkIdType cellId,
185 int nQuadraturePoints, std::vector<double> partialArea,
186 vtkIntegrateAttributesFieldList& fieldList, int index);
187
189
192 double ComputeJacobianDet2D(const double dN[8], const std::vector<std::array<double, 3>>& pts);
193 double ComputeJacobianDet(
194 const double* dN, const std::vector<std::array<double, 3>>& pts, int nNodes);
196
198
201 void AddPointDataArray();
202 void InitializeQuadratureOffsets();
203 std::string GenerateUniqueArrayName(const std::string& baseName);
204 vtkSmartPointer<vtkQuadratureSchemeDefinition> CreateQuadratureSchemeDefinition(int cellType);
205 void InitializeQuadratureOffsetsArray(
207 void ComputeQuadratureInterpolation();
209
212 vtkSmartPointer<vtkDataSet> Intermediate = nullptr;
213 vtkQuadratureSchemeDefinition** CellDefinitionDictionnary = nullptr;
214};
215
216VTK_ABI_NAMESPACE_END
217#endif
represent and manipulate attribute data in a dataset
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
provides thread-safe access to cells
list of point or cell ids
Definition vtkIdList.h:133
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
Helper class for vtkIntegrateAttributes.
Gaussian Quadrature Integration Strategy.
void IntegrateData3(vtkDataSetAttributes *inda, vtkDataSetAttributes *outda, vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, double k, vtkIntegrateAttributesFieldList &fieldlist, int fieldlist_index) override
Integrates on data arrays depending on the number of node of the shape.
static vtkIntegrationGaussianStrategy * New()
void IntegratePolyLine(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateTriangle(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
~vtkIntegrationGaussianStrategy() override
void IntegratePixel(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateTetrahedron(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, vtkIdType pt4Id, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateGeneral1DCell(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateWedge(vtkDataSet *input, vtkUnstructuredGrid *output, vtkGenericCell *cell, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, vtkIdList *cellPtIdsList, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void Initialize(vtkDataSet *input) override
Setup necessary precomputations.
void IntegrateData2(vtkDataSetAttributes *inda, vtkDataSetAttributes *outda, vtkIdType pt1Id, vtkIdType pt2Id, double k, vtkIntegrateAttributesFieldList &fieldlist, int fieldlist_index) override
Integrates on data arrays depending on the number of node of the shape.
void IntegrateVoxel(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateDefault(vtkDataSet *input, vtkUnstructuredGrid *output, vtkGenericCell *cell, vtkIdType cellId, vtkIdType numPts, vtkIdList *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateGeneral2DCell(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateGeneral3DCell(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateTriangleStrip(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegratePyramid(vtkDataSet *input, vtkUnstructuredGrid *output, vtkGenericCell *cell, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, vtkIdList *cellPtIdsList, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateQuad(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, vtkIdType pt4Id, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegratePolygon(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void IntegrateData1(vtkDataSetAttributes *inda, vtkDataSetAttributes *outda, vtkIdType pt1Id, double k, vtkIntegrateAttributesFieldList &fieldlist, int fieldlist_index) override
Integrates on data arrays depending on the number of node of the shape.
void IntegrateData4(vtkDataSetAttributes *inda, vtkDataSetAttributes *outda, vtkIdType pt1Id, vtkIdType pt2Id, vtkIdType pt3Id, vtkIdType pt4Id, double k, vtkIntegrateAttributesFieldList &fieldlist, int fieldlist_index) override
Integrates on data arrays depending on the number of node of the shape.
void IntegrateHexahedron(vtkDataSet *input, vtkUnstructuredGrid *output, vtkGenericCell *cell, vtkIdType cellId, vtkIdType numPts, const vtkIdType *cellPtIds, vtkIdList *cellPtIdsList, double &sum, double sumCenter[3], vtkIntegrateAttributesFieldList &cellFieldList, vtkIntegrateAttributesFieldList &pointFieldList, int index) override
Integration functions operating on some cell types.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class to define an integration strategy for vtkIntegrateAttributes
Allocate and hold a VTK object.
Definition vtkNew.h:167
An Elemental data type that holds a definition of a numerical quadrature scheme.
Hold a reference to a vtkObjectBase instance.
dataset represents arbitrary combinations of all possible cell types
VTKCellType
Definition vtkCellType.h:35
int vtkIdType
Definition vtkType.h:332