00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00032 #ifndef __vtkEnSightWriter_h
00033 #define __vtkEnSightWriter_h
00034
00035 #include "vtkWriter.h"
00036
00037 class vtkUnstructuredGrid;
00038 class vtkModelMetadata;
00039
00040 class VTK_PARALLEL_EXPORT vtkEnSightWriter : public vtkWriter
00041 {
00042
00043 public:
00044 vtkTypeMacro(vtkEnSightWriter,vtkWriter);
00045 virtual void PrintSelf(ostream& os, vtkIndent indent);
00046
00047 */
00048 static vtkEnSightWriter *New();
00049
00051
00052 vtkSetMacro(ProcessNumber,int);
00053 vtkGetMacro(ProcessNumber,int);
00055
00057
00058 vtkSetStringMacro(Path);
00059 vtkGetStringMacro(Path);
00061
00063
00064 vtkSetStringMacro(BaseName);
00065 vtkGetStringMacro(BaseName);
00067
00069
00070 vtkSetStringMacro(FileName);
00071 vtkGetStringMacro(FileName);
00073
00075
00076 vtkSetMacro(TimeStep,int);
00077 vtkGetMacro(TimeStep,int);
00079
00081
00082 vtkSetMacro(GhostLevel,int);
00083 vtkGetMacro(GhostLevel,int);
00085
00087
00089 vtkSetMacro(TransientGeometry,bool);
00090 vtkGetMacro(TransientGeometry,bool);
00092
00094
00095 vtkSetMacro(NumberOfBlocks,int);
00096 vtkGetMacro(NumberOfBlocks,int);
00098
00100
00102 virtual void SetBlockIDs(int* val)
00103 {
00104 BlockIDs=val;
00105 }
00106 virtual int* GetBlockIDs()
00107 {
00108 return BlockIDs;
00109 }
00111
00113
00114 virtual void SetInput(vtkUnstructuredGrid *input);
00115 virtual vtkUnstructuredGrid* GetInput();
00117
00119
00123 virtual void WriteCaseFile(int TotalTimeSteps);
00124 virtual void WriteSOSCaseFile(int NumProcs);
00126
00128
00129 virtual void SetModelMetadata(vtkModelMetadata* model);
00130 vtkGetObjectMacro(ModelMetadata, vtkModelMetadata);
00132
00133 protected:
00134 vtkEnSightWriter();
00135 virtual ~vtkEnSightWriter();
00136
00137 virtual int FillInputPortInformation(int port, vtkInformation* info);
00138
00139 virtual void WriteData();
00140
00141 virtual void WriteStringToFile(const char* string, FILE* file);
00142 virtual void WriteTerminatedStringToFile(const char* string, FILE* file);
00143 virtual void WriteIntToFile(const int i,FILE* file);
00144 virtual void WriteFloatToFile(const float f,FILE* file);
00145 virtual void WriteElementTypeToFile(int ElementType, FILE* fd);
00146
00147 virtual bool ShouldWriteGeometry();
00148 virtual void SanitizeFileName(char* name);
00149 virtual FILE* OpenFile(char* name);
00150
00151 void ComputeNames();
00152 void DefaultNames();
00153
00154 int GetExodusModelIndex(int *ElementArray,int NumberElements,int PartID);
00155
00156 char *Path;
00157 char *BaseName;
00158 char *FileName;
00159 int TimeStep;
00160 int GhostLevelMultiplier;
00161 int ProcessNumber;
00162 int NumberOfProcesses;
00163 int NumberOfBlocks;
00164 int * BlockIDs;
00165 bool TransientGeometry;
00166 int GhostLevel;
00167 vtkUnstructuredGrid* TmpInput;
00168 vtkModelMetadata* ModelMetadata;
00169
00170 vtkEnSightWriter(const vtkEnSightWriter&);
00171 void operator=(const vtkEnSightWriter&);
00172
00173 };
00174
00175 #endif