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 <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 
80  VTK_LEGACY(void SetFileNames(int nfiles, const char **names));
81 
82  VTK_LEGACY(virtual void SetFileName(const char *name));
83 
85  char **GetFileNames(){return this->FileNames;}
86 
88  int GetNumberOfFileNames(){return this->NumberOfFileNames;}
89 
91 
92  vtkGetMacro(NumberOfFiles, int);
94 
100  void SetGenerateFileIdArray(int flag);
101  vtkGetMacro(GenerateFileIdArray, int);
102  vtkBooleanMacro(GenerateFileIdArray, int);
103  virtual int GetTotalNumberOfElements();
104  virtual int GetTotalNumberOfNodes();
105 
106 
107 //begin USE_EXO_DSP_FILTERS
109  const char *GetVariableArrayName(int a_which);
110  void EnableDSPFiltering();
111  void AddFilter(vtkDSPFilterDefinition *a_filter);
112  void StartAddingFilter();
113  void AddFilterInputVar(char *name);
114  void AddFilterOutputVar(char *name);
115  void AddFilterNumeratorWeight(double weight);
117  void AddFilterDenominatorWeight(double weight);
118  void FinishAddingFilter();
119  void RemoveFilter(char *a_outputVariableName);
120 //end USE_EXO_DSP_FILTERS
121 
122 
123 protected:
125 
127  ~vtkPExodusReader();
129 
130 //begin USE_EXO_DSP_FILTERS
131  void GetDSPOutputArrays(int exoid, vtkUnstructuredGrid* output);
132 //end USE_EXO_DSP_FILTERS
133 
135 
136  int DeterminePattern(const char* file);
137  static int DetermineFileId(const char* file);
139 
140  // This method sets up a ugrid with
141  // all meta data but zero cells
142  void SetUpEmptyGrid();
143 
144  // **KEN** Previous discussions concluded with std classes in header
145  // files is bad. Perhaps we should change readerList.
146 
147  char* FilePattern;
149  char* FilePrefix;
152  int FileRange[2];
153  int CurrentFileRange[2];
155  char **FileNames;
158 //BTX
159  std::vector<vtkExodusReader*> readerList;
160 //ETX
161 
162  int Timing;
164 
165  int RequestInformation(
167  int RequestData(
169 
170 private:
171  vtkPExodusReader(const vtkPExodusReader&); // Not implemented
172  void operator=(const vtkPExodusReader&); // Not implemented
173 };
174 
175 #endif