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 
32 #ifndef vtkEnSightWriter_h
33 #define vtkEnSightWriter_h
34 
35 #include "vtkIOParallelModule.h" // For export macro
36 #include "vtkWriter.h"
37 
39 
41 {
42 
43 public:
44  vtkTypeMacro(vtkEnSightWriter,vtkWriter);
45  virtual void PrintSelf(ostream& os, vtkIndent indent);
46 
47  */
48  static vtkEnSightWriter *New();
49 
51 
52  vtkSetMacro(ProcessNumber,int);
53  vtkGetMacro(ProcessNumber,int);
55 
57 
58  vtkSetStringMacro(Path);
59  vtkGetStringMacro(Path);
61 
63 
64  vtkSetStringMacro(BaseName);
65  vtkGetStringMacro(BaseName);
67 
69 
70  vtkSetStringMacro(FileName);
71  vtkGetStringMacro(FileName);
73 
75 
76  vtkSetMacro(TimeStep,int);
77  vtkGetMacro(TimeStep,int);
79 
81 
82  vtkSetMacro(GhostLevel,int);
83  vtkGetMacro(GhostLevel,int);
85 
87 
89  vtkSetMacro(TransientGeometry,bool);
90  vtkGetMacro(TransientGeometry,bool);
92 
94 
95  vtkSetMacro(NumberOfBlocks,int);
96  vtkGetMacro(NumberOfBlocks,int);
98 
100 
102  virtual void SetBlockIDs(int* val)
103  {
104  BlockIDs=val;
105  }
106  virtual int* GetBlockIDs()
107  {
108  return BlockIDs;
109  }
111 
113 
114  virtual void SetInputData(vtkUnstructuredGrid *input);
115  virtual vtkUnstructuredGrid* GetInput();
117 
119 
123  virtual void WriteCaseFile(int TotalTimeSteps);
124  virtual void WriteSOSCaseFile(int NumProcs);
126 
127 protected:
129  virtual ~vtkEnSightWriter();
130 
132 
133  virtual void WriteData(); // method to allow this class to be instantiated and delegated to
134 
135  virtual void WriteStringToFile(const char* string, FILE* file);
136  virtual void WriteTerminatedStringToFile(const char* string, FILE* file);
137  virtual void WriteIntToFile(const int i,FILE* file);
138  virtual void WriteFloatToFile(const float f,FILE* file);
139  virtual void WriteElementTypeToFile(int ElementType, FILE* fd);
140 
141  virtual bool ShouldWriteGeometry();
142  virtual void SanitizeFileName(char* name);
143  virtual FILE* OpenFile(char* name);
144 
145  void ComputeNames();
146  void DefaultNames();
147 
148  int GetExodusModelIndex(int *ElementArray,int NumberElements,int PartID);
149 
150  char *Path;
151  char *BaseName;
152  char *FileName;
153  int TimeStep;
158  int * BlockIDs;
162 
163  vtkEnSightWriter(const vtkEnSightWriter&); // Not implemented.
164  void operator=(const vtkEnSightWriter&); // Not implemented.
165 
166 };
167 
168 #endif
#define VTKIOPARALLEL_EXPORT
write vtk unstructured grid data as an EnSight file
Store vtkAlgorithm input/output information.
void SetInputData(vtkDataObject *input)
abstract class to write data to file(s)
Definition: vtkWriter.h:44
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkDataObject * GetInput()
dataset represents arbitrary combinations of all possible cell types
virtual int * GetBlockIDs()
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkUnstructuredGrid * TmpInput
static vtkAlgorithm * New()
virtual void WriteData()=0
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetBlockIDs(int *val)