VTK  9.1.0
vtkEnSightWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkEnSightWriter.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 Copyright (c) Sandia Corporation
17 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18----------------------------------------------------------------------------*/
19
33#ifndef vtkEnSightWriter_h
34#define vtkEnSightWriter_h
35
36#include "vtkIOParallelModule.h" // For export macro
37#include "vtkWriter.h"
38
40
41class VTKIOPARALLEL_EXPORT vtkEnSightWriter : public vtkWriter
42{
43
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
52
54
57 vtkSetMacro(ProcessNumber, int);
58 vtkGetMacro(ProcessNumber, int);
60
62
68
70
73 vtkSetStringMacro(BaseName);
74 vtkGetStringMacro(BaseName);
76
78
84
86
89 vtkSetMacro(TimeStep, int);
90 vtkGetMacro(TimeStep, int);
92
94
97 vtkSetMacro(GhostLevel, int);
98 vtkGetMacro(GhostLevel, int);
100
102
106 vtkSetMacro(TransientGeometry, bool);
107 vtkGetMacro(TransientGeometry, bool);
109
111
114 vtkSetMacro(NumberOfBlocks, int);
115 vtkGetMacro(NumberOfBlocks, int);
117
119
123 virtual void SetBlockIDs(int* val) { BlockIDs = val; }
124 virtual int* GetBlockIDs() { return BlockIDs; }
126
128
131 virtual void SetInputData(vtkUnstructuredGrid* input);
134
136
143 virtual void WriteCaseFile(int TotalTimeSteps);
144 virtual void WriteSOSCaseFile(int NumProcs);
146
147protected:
150
151 int FillInputPortInformation(int port, vtkInformation* info) override;
152
153 void WriteData() override; // method to allow this class to be instantiated and delegated to
154
155 virtual void WriteStringToFile(const char* string, FILE* file);
156 virtual void WriteTerminatedStringToFile(const char* string, FILE* file);
157 virtual void WriteIntToFile(const int i, FILE* file);
158 virtual void WriteFloatToFile(const float f, FILE* file);
159 virtual void WriteElementTypeToFile(int ElementType, FILE* fd);
160
161 virtual bool ShouldWriteGeometry();
162 virtual void SanitizeFileName(char* name);
163 virtual FILE* OpenFile(char* name);
164
167
168 int GetExodusModelIndex(int* ElementArray, int NumberElements, int PartID);
169
170 char* Path;
171 char* BaseName;
172 char* FileName;
182
184 void operator=(const vtkEnSightWriter&) = delete;
185};
186
187#endif
write vtk unstructured grid data as an EnSight file
virtual vtkUnstructuredGrid * GetInput()
Specify the input data or filter.
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.
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
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
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 WriteFloatToFile(const float f, FILE *file)
virtual void WriteElementTypeToFile(int ElementType, FILE *fd)
virtual FILE * OpenFile(char *name)
vtkEnSightWriter(const vtkEnSightWriter &)=delete
virtual void WriteIntToFile(const int i, FILE *file)
static vtkEnSightWriter * New()
~vtkEnSightWriter() override
a simple class to control print indentation
Definition: vtkIndent.h:113
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:46