VTK  9.3.20240420
VTXvtkVTU.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 * VTXvtkVTU.h : class that supports UnstructuredMesh schema in VTK XML
6 * format .vtu extends abstract VTXvtkBase
7 *
8 * Created on: June 24, 2019
9 * Author: William F Godoy godoywf@ornl.gov
10 */
11
12#ifndef VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXxmlVTU_h
13#define VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXxmlVTU_h
14
15#include <map>
16#include <string>
17#include <vector>
18
19#include "vtkNew.h"
20#include "vtkUnstructuredGrid.h"
21
23
24namespace vtx
25{
26namespace schema
27{
28VTK_ABI_NAMESPACE_BEGIN
29class VTXvtkVTU : public VTXvtkBase
30{
31public:
32 VTXvtkVTU(const std::string& schema, adios2::IO& io, adios2::Engine& engine);
33 ~VTXvtkVTU() override;
34
35private:
37 vtkNew<vtkUnstructuredGrid> UnstructuredGrid;
38
40 std::vector<size_t> BlockIDs;
41
42 void DoFill(vtkMultiBlockDataSet* multiBlock, size_t step) final;
43 void ReadPiece(size_t step, size_t pieceID) final;
44
45 void Init() final;
46
47#define declare_type(T) \
48 void SetBlocks(adios2::Variable<T> variable, types::DataArray& dataArray, size_t step) final;
50#undef declare_type
51
52 template <class T>
53 void SetBlocksCommon(adios2::Variable<T> variable, types::DataArray& dataArray, size_t step);
54};
55
56VTK_ABI_NAMESPACE_END
57} // end namespace schema
58} // end namespace vtx
59
60#endif /* VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXxmlVTU_h */
#define VTK_IO_ADIOS2_VTX_ARRAY_TYPE(MACRO)
Definition VTXTypes.h:45
#define declare_type(T)
Definition VTXvtkVTI.h:49
Composite dataset that organizes datasets into blocks.
Allocate and hold a VTK object.
Definition vtkNew.h:160
VTXvtkVTU(const std::string &schema, adios2::IO &io, adios2::Engine &engine)