VTK
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 
41 class VTKIOPARALLEL_EXPORT vtkEnSightWriter : public vtkWriter
42 {
43 
44 public:
45  vtkTypeMacro(vtkEnSightWriter,vtkWriter);
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 
51  static vtkEnSightWriter *New();
52 
54 
57  vtkSetMacro(ProcessNumber,int);
58  vtkGetMacro(ProcessNumber,int);
60 
62 
65  vtkSetStringMacro(Path);
66  vtkGetStringMacro(Path);
68 
70 
73  vtkSetStringMacro(BaseName);
74  vtkGetStringMacro(BaseName);
76 
78 
81  vtkSetStringMacro(FileName);
82  vtkGetStringMacro(FileName);
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)
124  {
125  BlockIDs=val;
126  }
127  virtual int* GetBlockIDs()
128  {
129  return BlockIDs;
130  }
132 
134 
137  virtual void SetInputData(vtkUnstructuredGrid *input);
138  virtual vtkUnstructuredGrid* GetInput();
140 
142 
149  virtual void WriteCaseFile(int TotalTimeSteps);
150  virtual void WriteSOSCaseFile(int NumProcs);
152 
153 protected:
155  virtual ~vtkEnSightWriter();
156 
158 
159  virtual void WriteData(); // method to allow this class to be instantiated and delegated to
160 
161  virtual void WriteStringToFile(const char* string, FILE* file);
162  virtual void WriteTerminatedStringToFile(const char* string, FILE* file);
163  virtual void WriteIntToFile(const int i,FILE* file);
164  virtual void WriteFloatToFile(const float f,FILE* file);
165  virtual void WriteElementTypeToFile(int ElementType, FILE* fd);
166 
167  virtual bool ShouldWriteGeometry();
168  virtual void SanitizeFileName(char* name);
169  virtual FILE* OpenFile(char* name);
170 
171  void ComputeNames();
172  void DefaultNames();
173 
174  int GetExodusModelIndex(int *ElementArray,int NumberElements,int PartID);
175 
176  char *Path;
177  char *BaseName;
178  char *FileName;
179  int TimeStep;
184  int * BlockIDs;
188 
189  vtkEnSightWriter(const vtkEnSightWriter&) VTK_DELETE_FUNCTION;
190  void operator=(const vtkEnSightWriter&) VTK_DELETE_FUNCTION;
191 
192 };
193 
194 #endif
write vtk unstructured grid data as an EnSight file
Store vtkAlgorithm input/output information.
void SetInputData(vtkDataObject *input)
Set/get the input to this writer.
abstract class to write data to file(s)
Definition: vtkWriter.h:42
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkDataObject * GetInput()
dataset represents arbitrary combinations of all possible cell types
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual int * GetBlockIDs()
set the array of Block ID's this class keeps a reference to the array and will not delete it ...
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkUnstructuredGrid * TmpInput
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkAlgorithm * New()
virtual void WriteData()=0
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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 ...