VTK  9.7.1
VTXDataArray.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
3 
4 /*
5  * VTXDataArray.h : wrapper around vtkDataArray adding adios2 relevant
6  * information
7  *
8  * Created on: Jun 4, 2019
9  * Author: William F Godoy godoywf@ornl.gov
10  */
11 
12 #ifndef VTK_IO_ADIOS2_VTX_COMMON_VTXDataArray_h
13 #define VTK_IO_ADIOS2_VTX_COMMON_VTXDataArray_h
14 
15 #include "vtkDataArray.h"
16 #include "vtkSmartPointer.h"
17 
18 #include <map>
19 
20 #include <adios2.h>
21 
22 namespace vtx
23 {
24 namespace types
25 {
26 VTK_ABI_NAMESPACE_BEGIN
27 
28 class DataArray
29 {
30 public:
31  std::vector<std::string> VectorVariables;
33 
34  // required for global arrays
35  adios2::Dims Shape;
36  adios2::Dims Start;
37  adios2::Dims Count;
38 
39  // required for local arrays, using maps for now
41  std::map<size_t, adios2::Dims> BlockCounts;
42 
44  bool HasTuples = false;
45 
47  bool IsUpdated = true;
48 
53  bool IsSOA = false;
54 
55  DataArray() = default;
56  ~DataArray() = default;
57 
58  bool IsScalar() const noexcept;
59 
66  void ConvertTo3DVTK(const std::vector<double>& fillValues = std::vector<double>());
67 };
68 
69 VTK_ABI_NAMESPACE_END
70 } // end namespace types
71 } // end namespace vtx
72 
73 #endif /* VTK_IO_ADIOS2_VTX_COMMON_VTXDataArray_h */
bool HasTuples
true: tuples > 1, false: tuples = 1
Definition: VTXDataArray.h:44
std::map< size_t, adios2::Dims > BlockCounts
key: blockID, value: block count
Definition: VTXDataArray.h:41
vtkSmartPointer< vtkDataArray > Data
Definition: VTXDataArray.h:32
void ConvertTo3DVTK(const std::vector< double > &fillValues=std::vector< double >())
Convert internal vtkDataArray to a 3D VTK conforming array number of components = 3 filling the value...
bool IsUpdated
true: new value is found and read, false: not updated
Definition: VTXDataArray.h:47
adios2::Dims Count
Definition: VTXDataArray.h:37
bool IsScalar() const noexcept
std::vector< std::string > VectorVariables
Definition: VTXDataArray.h:31
adios2::Dims Start
Definition: VTXDataArray.h:36
bool IsSOA
true: is struct of arrays (*x, *y, *z) or (XXXX, YYYY, ZZZZ) false (default): is array of structs (xy...
Definition: VTXDataArray.h:53
adios2::Dims Shape
Definition: VTXDataArray.h:35