VTK  9.0.20210424
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 
34 namespace vtx
35 {
36 namespace types
37 {
38 
39 class DataArray
40 {
41 public:
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 */
vtkX3D::vector
@ vector
Definition: vtkX3D.h:243
vtx::types::DataArray::Data
vtkSmartPointer< vtkDataArray > Data
Definition: VTXDataArray.h:43
vtx
Definition: vtkADIOS2VTXReader.h:36
vtx::types::DataArray
Definition: VTXDataArray.h:40
vtkSmartPointer< vtkDataArray >
vtx::types::DataArray::Start
adios2::Dims Start
Definition: VTXDataArray.h:47
vtx::types::DataArray::IsSOA
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
vtx::types::DataArray::IsIdType
bool IsIdType
true : uses the special vtkIdType for indexing false : uses other VTK supported type
Definition: VTXDataArray.h:56
vtx::types::DataArray::IsUpdated
bool IsUpdated
true: new value is found and read, false: not updated
Definition: VTXDataArray.h:69
vtx::types::DataArray::Count
adios2::Dims Count
Definition: VTXDataArray.h:48
vtkSmartPointer.h
vtx::types::DataArray::IsScalar
bool IsScalar() const noexcept
vtx::types::DataArray::VectorVariables
std::vector< std::string > VectorVariables
Definition: VTXDataArray.h:42
vtx::types::DataArray::ConvertTo3DVTK
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...
vtkDataArray.h
vtx::types::DataArray::HasTuples
bool HasTuples
true: tuples > 1, false: tuples = 1
Definition: VTXDataArray.h:59
vtx::types::DataArray::BlockCounts
std::map< size_t, adios2::Dims > BlockCounts
key: blockID, value: block count
Definition: VTXDataArray.h:52
vtx::types::DataArray::~DataArray
~DataArray()=default
vtx::types::DataArray::Persist
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
vtx::types::DataArray::Shape
adios2::Dims Shape
Definition: VTXDataArray.h:46
vtx::types::DataArray::DataArray
DataArray()=default