VTK  9.7.1
vtkDGArraysInputAccessor.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
10 #ifndef vtkDGArraysInputAccessor_h
11 #define vtkDGArraysInputAccessor_h
12 
13 #include "vtkFiltersCellGridModule.h" // For export macro.
14 #include "vtkVector.h" // For API.
15 
16 VTK_ABI_NAMESPACE_BEGIN
17 
18 class vtkDataArray;
19 
20 class VTKFILTERSCELLGRID_EXPORT vtkDGArraysInputAccessor
21 {
22 public:
23  vtkDGArraysInputAccessor() = default;
27 
28  vtkDGArraysInputAccessor& operator=(const vtkDGArraysInputAccessor& other);
29 
30  void SetCellIds(vtkDataArray* cellIds);
31  void SetRST(vtkDataArray* rst);
32 
33  vtkIdType GetCellId(vtkTypeUInt64 iteration);
34  vtkVector3d GetParameter(vtkTypeUInt64 iteration);
35  vtkTypeUInt64 GetKey() const { return this->Key; }
36  void Restart();
37  bool IsAtEnd() const;
38 
39  std::size_t size() const;
40 
41  vtkTypeUInt64 operator++();
42  vtkTypeUInt64 operator++(int);
43 
44  vtkDGArraysInputAccessor& operator+=(vtkTypeUInt64 count);
45 
46 protected:
47  vtkTypeUInt64 Key{ 0 };
48  vtkDataArray* CellIds{ nullptr };
49  vtkDataArray* RST{ nullptr };
50 };
51 
52 VTK_ABI_NAMESPACE_END
53 
54 #endif // vtkDGArraysInputAccessor_h
vtkVector< T, Size > & operator+=(vtkVector< T, Size > &a, const vtkVector< T, Size > &b)
Add the vector b to the vector a of the same basic type.
Definition: vtkVector.h:553
RealT rst
Definition: TetF2Basis.h:17
int vtkIdType
Definition: vtkType.h:363
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
vtkTypeUInt64 GetKey() const
Evaluate DG cells whose indices and parameters are provided by vtkDataArray instances.