VTK  9.3.0
vtkEnSightWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3// SPDX-License-Identifier: BSD-3-Clause
4
21#ifndef vtkEnSightWriter_h
22#define vtkEnSightWriter_h
23
24#include "vtkIOParallelModule.h" // For export macro
25#include "vtkWriter.h"
26
27VTK_ABI_NAMESPACE_BEGIN
29
30class VTKIOPARALLEL_EXPORT vtkEnSightWriter : public vtkWriter
31{
32
33public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
41
43
46 vtkSetMacro(ProcessNumber, int);
47 vtkGetMacro(ProcessNumber, int);
49
51
57
59
62 vtkSetStringMacro(BaseName);
63 vtkGetStringMacro(BaseName);
65
67
73
75
78 vtkSetMacro(TimeStep, int);
79 vtkGetMacro(TimeStep, int);
81
83
86 vtkSetMacro(GhostLevel, int);
87 vtkGetMacro(GhostLevel, int);
89
91
95 vtkSetMacro(TransientGeometry, bool);
96 vtkGetMacro(TransientGeometry, bool);
98
100
103 vtkSetMacro(NumberOfBlocks, int);
104 vtkGetMacro(NumberOfBlocks, int);
106
108
116 vtkBooleanMacro(WriteNodeIDs, bool);
117 vtkSetMacro(WriteNodeIDs, bool);
118 vtkGetMacro(WriteNodeIDs, bool);
120
122
130 vtkBooleanMacro(WriteElementIDs, bool);
131 vtkSetMacro(WriteElementIDs, bool);
132 vtkGetMacro(WriteElementIDs, bool);
134
136
140 virtual void SetBlockIDs(int* val) { BlockIDs = val; }
141 virtual int* GetBlockIDs() { return BlockIDs; }
143
145
148 virtual void SetInputData(vtkUnstructuredGrid* input);
151
153
160 virtual void WriteCaseFile(int TotalTimeSteps);
161 virtual void WriteSOSCaseFile(int NumProcs);
163
164protected:
167
168 int FillInputPortInformation(int port, vtkInformation* info) override;
170 vtkInformationVector* outputVector) override;
171
172 void WriteData() override; // method to allow this class to be instantiated and delegated to
173
174 virtual void WriteStringToFile(const char* string, FILE* file);
175 virtual void WriteTerminatedStringToFile(const char* string, FILE* file);
176 virtual void WriteIntToFile(int i, FILE* file);
177 virtual void WriteFloatToFile(float f, FILE* file);
178 virtual void WriteElementTypeToFile(int ElementType, FILE* fd);
179
180 virtual bool ShouldWriteGeometry();
181 virtual void SanitizeFileName(char* name);
182 virtual FILE* OpenFile(char* name);
183
186
187 int GetExodusModelIndex(int* ElementArray, int NumberElements, int PartID);
188
189 static int GetDestinationComponent(int srcComponent, int numComponents);
190
191 char* Path;
192 char* BaseName;
193 char* FileName;
205
207 void operator=(const vtkEnSightWriter&) = delete;
208};
209
210VTK_ABI_NAMESPACE_END
211#endif
write vtk unstructured grid data as an EnSight file
virtual vtkUnstructuredGrid * GetInput()
Specify the input data or filter.
virtual void WriteFloatToFile(float f, FILE *file)
vtkSetFilePathMacro(FileName)
Specify the path and base name of the output files.
virtual void WriteSOSCaseFile(int NumProcs)
Writes the case file that EnSight is capable of reading The other data files must be written before t...
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual void SanitizeFileName(char *name)
virtual void WriteTerminatedStringToFile(const char *string, FILE *file)
vtkSetFilePathMacro(Path)
Specify path of EnSight data files to write.
virtual void WriteIntToFile(int i, FILE *file)
vtkUnstructuredGrid * TmpInput
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetInputData(vtkUnstructuredGrid *input)
Specify the input data or filter.
void operator=(const vtkEnSightWriter &)=delete
virtual bool ShouldWriteGeometry()
virtual int * GetBlockIDs()
set the array of Block ID's this class keeps a reference to the array and will not delete it
static int GetDestinationComponent(int srcComponent, int numComponents)
virtual void SetBlockIDs(int *val)
set the array of Block ID's this class keeps a reference to the array and will not delete it
virtual void WriteCaseFile(int TotalTimeSteps)
Writes the case file that EnSight is capable of reading The other data files must be written before t...
int GetExodusModelIndex(int *ElementArray, int NumberElements, int PartID)
void WriteData() override
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkGetFilePathMacro(Path)
Specify path of EnSight data files to write.
vtkGetFilePathMacro(FileName)
Specify the path and base name of the output files.
virtual void WriteStringToFile(const char *string, FILE *file)
virtual void WriteElementTypeToFile(int ElementType, FILE *fd)
virtual FILE * OpenFile(char *name)
vtkEnSightWriter(const vtkEnSightWriter &)=delete
static vtkEnSightWriter * New()
~vtkEnSightWriter() override
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dataset represents arbitrary combinations of all possible cell types
abstract class to write data to file(s)
Definition vtkWriter.h:32