VTK
vtkPExodusReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPExodusReader.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 
38 #ifndef __vtkPExodusReader_h
39 #define __vtkPExodusReader_h
40 
41 #include "vtkExodusReader.h"
42 
43 #include <vtkstd/vector> // Required for vector
44 
45 class vtkTimerLog;
46 
48 {
49 public:
50  static vtkPExodusReader *New();
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
62  vtkSetStringMacro(FilePattern);
63  vtkGetStringMacro(FilePattern);
64  vtkSetStringMacro(FilePrefix);
65  vtkGetStringMacro(FilePrefix);
67 
69 
71  void SetFileRange(int,int);
72  void SetFileRange(int* r) { this->SetFileRange(r[0], r[1]); }
73  vtkGetVector2Macro(FileRange, int);
75 
79  void SetFileNames(int nfiles, const char **names);
80 
81  virtual void SetFileName(const char *name);
82 
84  char **GetFileNames(){return this->FileNames;}
85 
87  int GetNumberOfFileNames(){return this->NumberOfFileNames;}
88 
90 
91  vtkGetMacro(NumberOfFiles, int);
93 
99  void SetGenerateFileIdArray(int flag);
100  vtkGetMacro(GenerateFileIdArray, int);
101  vtkBooleanMacro(GenerateFileIdArray, int);
102  virtual int GetTotalNumberOfElements();
103  virtual int GetTotalNumberOfNodes();
104 
105 
106 //begin USE_EXO_DSP_FILTERS
108  const char *GetVariableArrayName(int a_which);
109  void EnableDSPFiltering();
110  void AddFilter(vtkDSPFilterDefinition *a_filter);
111  void StartAddingFilter();
112  void AddFilterInputVar(char *name);
113  void AddFilterOutputVar(char *name);
114  void AddFilterNumeratorWeight(double weight);
116  void AddFilterDenominatorWeight(double weight);
117  void FinishAddingFilter();
118  void RemoveFilter(char *a_outputVariableName);
119 //end USE_EXO_DSP_FILTERS
120 
121 
122 protected:
124  ~vtkPExodusReader();
125 
126 //begin USE_EXO_DSP_FILTERS
127  void GetDSPOutputArrays(int exoid, vtkUnstructuredGrid* output);
128 //end USE_EXO_DSP_FILTERS
129 
131 
132  int DeterminePattern(const char* file);
133  static int DetermineFileId(const char* file);
135 
136  // This method sets up a ugrid with
137  // all meta data but zero cells
138  void SetUpEmptyGrid();
139 
140  // **KEN** Previous discussions concluded with std classes in header
141  // files is bad. Perhaps we should change readerList.
142 
143  char* FilePattern;
145  char* FilePrefix;
148  int FileRange[2];
149  int CurrentFileRange[2];
151  char **FileNames;
154 //BTX
155  vtkstd::vector<vtkExodusReader*> readerList;
156 //ETX
157 
158  int Timing;
160 
161  int RequestInformation(
163  int RequestData(
165 
166 private:
167  vtkPExodusReader(const vtkPExodusReader&); // Not implemented
168  void operator=(const vtkPExodusReader&); // Not implemented
169 };
170 
171 #endif