VTK  9.4.20241117
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
22namespace vtx
23{
24namespace types
25{
26VTK_ABI_NAMESPACE_BEGIN
27
29{
30public:
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
45 bool IsIdType = false;
46
48 bool HasTuples = false;
49
51 bool IsUpdated = true;
52
57 bool IsSOA = false;
58
59 DataArray() = default;
60 ~DataArray() = default;
61
62 bool IsScalar() const noexcept;
63
70 void ConvertTo3DVTK(const std::vector<double>& fillValues = std::vector<double>());
71};
72
73VTK_ABI_NAMESPACE_END
74} // end namespace types
75} // end namespace vtx
76
77#endif /* VTK_IO_ADIOS2_VTX_COMMON_VTXDataArray_h */
Hold a reference to a vtkObjectBase instance.
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...
std::map< size_t, adios2::Dims > BlockCounts
key: blockID, value: block count
bool HasTuples
true: tuples > 1, false: tuples = 1
vtkSmartPointer< vtkDataArray > Data
std::vector< std::string > VectorVariables
bool IsIdType
true : uses the special vtkIdType for indexing false : uses other VTK supported type
bool IsScalar() const noexcept
bool IsSOA
true: is struct of arrays (*x, *y, *z) or (XXXX, YYYY, ZZZZ) false (default): is array of structs (xy...
bool IsUpdated
true: new value is found and read, false: not updated