VTK  9.1.0
VTXDataArray.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: VTXDataArray.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14 =========================================================================*/
15
16/*
17 * VTXDataArray.h : wrapper around vtkDataArray adding adios2 relevant
18 * information
19 *
20 * Created on: Jun 4, 2019
21 * Author: William F Godoy godoywf@ornl.gov
22 */
23
24#ifndef VTK_IO_ADIOS2_VTX_COMMON_VTXDataArray_h
25#define VTK_IO_ADIOS2_VTX_COMMON_VTXDataArray_h
26
27#include "vtkDataArray.h"
28#include "vtkSmartPointer.h"
29
30#include <map>
31
32#include <adios2.h>
33
34namespace vtx
35{
36namespace types
37{
38
40{
41public:
42 std::vector<std::string> VectorVariables;
44
45 // required for global arrays
46 adios2::Dims Shape;
47 adios2::Dims Start;
48 adios2::Dims Count;
49
50 // required for local arrays, using maps for now
52 std::map<size_t, adios2::Dims> BlockCounts;
53
56 bool IsIdType = false;
57
59 bool HasTuples = false;
60
66 bool Persist = false;
67
69 bool IsUpdated = true;
70
75 bool IsSOA = false;
76
77 DataArray() = default;
78 ~DataArray() = default;
79
80 bool IsScalar() const noexcept;
81
88 void ConvertTo3DVTK(const std::vector<double>& fillValues = std::vector<double>());
89};
90
91} // end namespace types
92} // end namespace vtx
93
94#endif /* VTK_IO_ADIOS2_VTX_COMMON_VTXDataArray_h */
adios2::Dims Shape
Definition: VTXDataArray.h:46
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
Definition: VTXDataArray.h:52
adios2::Dims Start
Definition: VTXDataArray.h:47
bool HasTuples
true: tuples > 1, false: tuples = 1
Definition: VTXDataArray.h:59
vtkSmartPointer< vtkDataArray > Data
Definition: VTXDataArray.h:43
std::vector< std::string > VectorVariables
Definition: VTXDataArray.h:42
bool Persist
true: if variable doesn't exist in a step don't attempt to read, use the latest known values.
Definition: VTXDataArray.h:66
bool IsIdType
true : uses the special vtkIdType for indexing false : uses other VTK supported type
Definition: VTXDataArray.h:56
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...
Definition: VTXDataArray.h:75
bool IsUpdated
true: new value is found and read, false: not updated
Definition: VTXDataArray.h:69
adios2::Dims Count
Definition: VTXDataArray.h:48
@ vector
Definition: vtkX3D.h:243