VTK  9.4.20250413
vtkVPICReader.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
20#ifndef vtkVPICReader_h
21#define vtkVPICReader_h
22
23#include "vtkIOVPICModule.h" // For export macro
24#include "vtkImageAlgorithm.h"
25
26class VPICDataSet;
27class GridExchange;
28
29VTK_ABI_NAMESPACE_BEGIN
32class vtkFloatArray;
33class vtkStdString;
35class vtkInformation;
36
37class VTKIOVPIC_EXPORT vtkVPICReader : public vtkImageAlgorithm
38{
39public:
40 static vtkVPICReader* New();
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
51
53
56 vtkSetVector3Macro(Stride, int);
57 vtkGetVector3Macro(Stride, int);
59
61
64 vtkSetVector2Macro(XExtent, int);
65 vtkSetVector2Macro(YExtent, int);
66 vtkSetVector2Macro(ZExtent, int);
68
69 // Get the full layout size in files for setting the range in GUI
70 vtkGetVector2Macro(XLayout, int);
71 vtkGetVector2Macro(YLayout, int);
72 vtkGetVector2Macro(ZLayout, int);
73
75
81
83
89 const char* GetPointArrayName(int index);
90 int GetPointArrayStatus(const char* name);
91 void SetPointArrayStatus(const char* name, int status);
95
96protected:
98 ~vtkVPICReader() override;
99
100 char* FileName; // First field part file giving path
101
102 int Rank; // Number of this processor
103 int TotalRank; // Number of processors
104 int UsedRank; // Number of processors used in display
105
106 VPICDataSet* vpicData; // Data structure controlling access
107 GridExchange* exchanger; // Exchange ghost cells between procs
108
109 vtkIdType NumberOfNodes; // Number of points in grid
110 vtkIdType NumberOfCells; // Number of cells in grid
111 vtkIdType NumberOfTuples; // Number of tuples in sub extent
112
113 int WholeExtent[6]; // Problem image extent
114 int SubExtent[6]; // Processor problem extent
115 int Dimension[3]; // Size of image
116 int SubDimension[3]; // Size of subextent of image
117 int XLayout[2]; // Extent in complete files
118 int YLayout[2]; // Extent in complete files
119 int ZLayout[2]; // Extent in complete files
120
121 int NumberOfVariables; // Number of variables to display
122 vtkStdString* VariableName; // Names of each variable
123 int* VariableStruct; // Scalar, vector or tensor
124
125 int NumberOfTimeSteps; // Temporal domain
126 double* TimeSteps; // Times available for request
127 int CurrentTimeStep; // Time currently displayed
128
129 int Stride[3]; // Stride over actual data
130 int XExtent[2]; // Subview extent in files
131 int YExtent[2]; // Subview extent in files
132 int ZExtent[2]; // Subview extent in files
133
134 vtkFloatArray** data; // Actual data arrays
135 int* dataLoaded; // Data is loaded for current time
136
137 int Start[3]; // Start offset for processor w ghosts
138 int GhostDimension[3]; // Dimension including ghosts on proc
139 int NumberOfGhostTuples; // Total ghost cells per component
140 int ghostLevel0; // Left plane number of ghosts
141 int ghostLevel1; // Right plane number of ghosts
142
143 // Controls initializing and querying MPI
146
147 // Selected field of interest
149
150 // Observer to modify this object when array selections are modified
152
156
157 void LoadVariableData(int var, int timeStep);
158 void LoadComponent(float* varData, float* block, int comp, int numberOfComponents);
159
160 static void SelectionCallback(
161 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
162 static void EventCallback(vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
163
164private:
165 vtkVPICReader(const vtkVPICReader&) = delete;
166 void operator=(const vtkVPICReader&) = delete;
167};
168
169VTK_ABI_NAMESPACE_END
170#endif
supports function callbacks
Store on/off settings for data arrays, etc.
dynamic, self-adjusting array of float
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
abstract base class for most VTK objects
Definition vtkObject.h:162
Wrapper around std::string to keep symbols short.
class for reading VPIC data files
void SetPointArrayStatus(const char *name, int status)
The following methods allow selective reading of solutions fields.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
vtkGetFilePathMacro(FileName)
Specify file name of VPIC data file to read.
vtkMultiProcessController * MPIController
vtkIdType NumberOfTuples
vtkImageData * GetOutput(int index)
Get the reader's output.
void SetMPIController(vtkMultiProcessController *)
void LoadVariableData(int var, int timeStep)
vtkIdType NumberOfNodes
int GetPointArrayStatus(const char *name)
The following methods allow selective reading of solutions fields.
vtkFloatArray ** data
vtkImageData * GetOutput()
Get the reader's output.
vtkDataArraySelection * PointDataArraySelection
void EnableAllPointArrays()
The following methods allow selective reading of solutions fields.
VPICDataSet * vpicData
static vtkVPICReader * New()
vtkCallbackCommand * SelectionObserver
void DisableAllPointArrays()
The following methods allow selective reading of solutions fields.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetFilePathMacro(FileName)
Specify file name of VPIC data file to read.
void LoadComponent(float *varData, float *block, int comp, int numberOfComponents)
int RequestInformation(vtkInformation *, vtkInformationVector **inVector, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
int GetNumberOfPointArrays()
The following methods allow selective reading of solutions fields.
double * TimeSteps
vtkIdType NumberOfCells
const char * GetPointArrayName(int index)
The following methods allow selective reading of solutions fields.
static void EventCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
vtkStdString * VariableName
~vtkVPICReader() override
static void SelectionCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
GridExchange * exchanger
int vtkIdType
Definition vtkType.h:332