VTK  9.7.1
vtkDataSetAttributesFieldList.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
43 #ifndef vtkDataSetAttributesFieldList_h
44 #define vtkDataSetAttributesFieldList_h
45 
46 #include "vtkCommonDataModelModule.h" // For export macro
47 #include "vtkSmartPointer.h" // for vtkSmartPointer
48 #include "vtkSystemIncludes.h"
49 
50 #include <functional> // for std::function
51 #include <memory> // for unique_ptr
52 
53 VTK_ABI_NAMESPACE_BEGIN
54 class vtkAbstractArray;
56 class vtkFieldData;
57 class vtkIdList;
58 
59 class VTKCOMMONDATAMODEL_EXPORT vtkDataSetAttributesFieldList
60 {
61 public:
66  vtkDataSetAttributesFieldList(int number_of_inputs = 0);
68  void PrintSelf(ostream& os, vtkIndent indent);
69 
73  void Reset();
74 
81  void InitializeFieldList(vtkDataSetAttributes* dsa);
82 
87  void IntersectFieldList(vtkDataSetAttributes* dsa);
88 
93  void UnionFieldList(vtkDataSetAttributes* dsa);
94 
96 
101  void GenerateCompositeArray(std::vector<vtkFieldData*> fields, vtkDataSetAttributes* outputData);
102  void GenerateCompositeArray(
103  std::vector<vtkFieldData*> fields, vtkIdList* indexArray, vtkDataSetAttributes* outputData);
105 
107 
113  void CopyAllocate(vtkDataSetAttributes* output, int ctype, vtkIdType sz, vtkIdType ext) const;
114  void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType fromId,
115  vtkDataSetAttributes* output, vtkIdType toId) const;
116  void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType inputStart,
117  vtkIdType numValues, vtkDataSetAttributes* output, vtkIdType outStart) const;
118  void InterpolatePoint(int inputIndex, vtkDataSetAttributes* input, vtkIdList* inputIds,
119  double* weights, vtkDataSetAttributes* output, vtkIdType toId) const;
121 
126  void TransformData(int inputIndex, vtkFieldData* input, vtkFieldData* output,
127  std::function<void(vtkAbstractArray*, vtkAbstractArray*)> op) const;
128 
134  int GetNumberOfArrays();
135 
148  void BuildPrototype(vtkDataSetAttributes* protoDSA, vtkDataSetAttributes* ordering = nullptr);
149 
150 protected:
156 
157 private:
158  class vtkInternals;
159  std::unique_ptr<vtkInternals> Internals;
160 
162  void operator=(vtkDataSetAttributesFieldList&) = delete;
163 };
164 
165 VTK_ABI_NAMESPACE_END
166 #endif
167 // VTK-HeaderTest-Exclude: vtkDataSetAttributesFieldList.h
Abstract superclass for all arrays.
helps manage arrays from multiple vtkDataSetAttributes.
int vtkIdType
Definition: vtkType.h:363
a simple class to control print indentation
Definition: vtkIndent.h:28
list of point or cell ids
Definition: vtkIdList.h:25
represent and manipulate attribute data in a dataset
vtkSmartPointer< vtkDataArray > CreateArray(const Ioss::Field &field)
Create an array for the given field.
Represents and manipulates a collection of data arrays.
Definition: vtkFieldData.h:51