VTK  9.4.20250114
vtkXdmf3HeavyDataHandler.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
14#ifndef vtkXdmf3HeavyDataHandler_h
15#define vtkXdmf3HeavyDataHandler_h
16
17#include "vtkIOXdmf3Module.h" // For export macro
18
19#include "vtk_xdmf3.h"
20
21// clang-format off
22#include VTKXDMF3_HEADER(core/XdmfInformation.hpp)
23
24#include VTKXDMF3_HEADER(core/XdmfItem.hpp)
25#include VTKXDMF3_HEADER(core/XdmfSharedPtr.hpp)
26// clang-format on
27
28#include "vtkXdmf3ArrayKeeper.h"
30
31#include VTKXDMF3_HEADER(XdmfCurvilinearGrid.hpp)
32#include VTKXDMF3_HEADER(XdmfGraph.hpp)
33#include VTKXDMF3_HEADER(XdmfGrid.hpp)
34#include VTKXDMF3_HEADER(XdmfRectilinearGrid.hpp)
35#include VTKXDMF3_HEADER(XdmfRegularGrid.hpp)
36#include VTKXDMF3_HEADER(XdmfSet.hpp)
37#include VTKXDMF3_HEADER(XdmfUnstructuredGrid.hpp)
38#include VTKXDMF3_HEADER(XdmfDomain.hpp)
39
40VTK_ABI_NAMESPACE_BEGIN
41class vtkDataObject;
42class vtkDataSet;
43class vtkImageData;
48
49class VTKIOXDMF3_EXPORT vtkXdmf3HeavyDataHandler
50{
51public:
55 static shared_ptr<vtkXdmf3HeavyDataHandler> New(vtkXdmf3ArraySelection* fs,
57 vtkXdmf3ArraySelection* sc, unsigned int processor, unsigned int nprocessors, bool dt, double t,
58 vtkXdmf3ArrayKeeper* keeper, bool asTime);
59
63 vtkDataObject* Populate(shared_ptr<XdmfGrid> item, vtkDataObject* toFill);
64 vtkDataObject* Populate(shared_ptr<XdmfDomain> item, vtkDataObject* toFill);
65 vtkDataObject* Populate(shared_ptr<XdmfGraph> item, vtkDataObject* toFill);
66
68
69 shared_ptr<XdmfGrid> testItem1;
70 shared_ptr<XdmfDomain> testItem2;
71
72protected:
76 bool ShouldRead(unsigned int piece, unsigned int npieces);
77
78 bool GridEnabled(shared_ptr<XdmfGrid> grid);
79 bool GridEnabled(shared_ptr<XdmfGraph> graph);
80 bool SetEnabled(shared_ptr<XdmfSet> set);
81
82 bool ForThisTime(shared_ptr<XdmfGrid> grid);
83 bool ForThisTime(shared_ptr<XdmfGraph> graph);
84
85 vtkDataObject* MakeUnsGrid(shared_ptr<XdmfUnstructuredGrid> grid, vtkUnstructuredGrid* dataSet,
86 vtkXdmf3ArrayKeeper* keeper);
87
89 shared_ptr<XdmfRectilinearGrid> grid, vtkRectilinearGrid* dataSet, vtkXdmf3ArrayKeeper* keeper);
90
92 shared_ptr<XdmfCurvilinearGrid> grid, vtkStructuredGrid* dataSet, vtkXdmf3ArrayKeeper* keeper);
93
95 shared_ptr<XdmfRegularGrid> grid, vtkImageData* dataSet, vtkXdmf3ArrayKeeper* keeper);
97 shared_ptr<XdmfGraph> grid, vtkMutableDirectedGraph* dataSet, vtkXdmf3ArrayKeeper* keeper);
98
99 vtkDataObject* ExtractSet(unsigned int setnum, shared_ptr<XdmfGrid> grid, vtkDataSet* dataSet,
101
102 bool doTime;
103 double time;
104 unsigned int Rank;
105 unsigned int NumProcs;
111 bool AsTime;
112};
113
114VTK_ABI_NAMESPACE_END
115#endif // vtkXdmf3HeavyDataHandler_h
116// VTK-HeaderTest-Exclude: vtkXdmf3HeavyDataHandler.h
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
topologically and geometrically regular array of data
An editable directed graph.
a dataset that is topologically regular with variable spacing in the three coordinate directions
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types
LRU cache of XDMF Arrays.
helper to identify requested arrays with
internal helper for vtkXdmf3Reader
vtkXdmf3ArraySelection * GridsCache
vtkDataObject * MakeCrvGrid(shared_ptr< XdmfCurvilinearGrid > grid, vtkStructuredGrid *dataSet, vtkXdmf3ArrayKeeper *keeper)
vtkXdmf3ArraySelection * SetsCache
vtkDataObject * MakeRegGrid(shared_ptr< XdmfRegularGrid > grid, vtkImageData *dataSet, vtkXdmf3ArrayKeeper *keeper)
vtkDataObject * MakeUnsGrid(shared_ptr< XdmfUnstructuredGrid > grid, vtkUnstructuredGrid *dataSet, vtkXdmf3ArrayKeeper *keeper)
vtkDataObject * Populate(shared_ptr< XdmfGrid > item, vtkDataObject *toFill)
recursively create and populate vtk data objects for the provided Xdmf item
vtkDataObject * MakeRecGrid(shared_ptr< XdmfRectilinearGrid > grid, vtkRectilinearGrid *dataSet, vtkXdmf3ArrayKeeper *keeper)
bool GridEnabled(shared_ptr< XdmfGraph > graph)
bool ForThisTime(shared_ptr< XdmfGraph > graph)
vtkDataObject * ExtractSet(unsigned int setnum, shared_ptr< XdmfGrid > grid, vtkDataSet *dataSet, vtkUnstructuredGrid *subSet, vtkXdmf3ArrayKeeper *keeper)
bool GridEnabled(shared_ptr< XdmfGrid > grid)
bool ForThisTime(shared_ptr< XdmfGrid > grid)
vtkDataObject * MakeGraph(shared_ptr< XdmfGraph > grid, vtkMutableDirectedGraph *dataSet, vtkXdmf3ArrayKeeper *keeper)
vtkDataObject * Populate(shared_ptr< XdmfDomain > item, vtkDataObject *toFill)
vtkXdmf3ArraySelection * CellArrays
vtkXdmf3ArraySelection * PointArrays
bool ShouldRead(unsigned int piece, unsigned int npieces)
for parallel partitioning
vtkXdmf3ArraySelection * FieldArrays
vtkDataObject * Populate(shared_ptr< XdmfGraph > item, vtkDataObject *toFill)
bool SetEnabled(shared_ptr< XdmfSet > set)
shared_ptr< XdmfDomain > testItem2
static shared_ptr< vtkXdmf3HeavyDataHandler > New(vtkXdmf3ArraySelection *fs, vtkXdmf3ArraySelection *cs, vtkXdmf3ArraySelection *ps, vtkXdmf3ArraySelection *gc, vtkXdmf3ArraySelection *sc, unsigned int processor, unsigned int nprocessors, bool dt, double t, vtkXdmf3ArrayKeeper *keeper, bool asTime)
factory constructor
shared_ptr< XdmfGrid > testItem1