Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tecplotwriter.h
Go to the documentation of this file.
1 #ifndef _TECPLOTWRITER_H_
2 #define _TECPLOTWRITER_H_
3 
4 #include <cstdio>
5 #include <cstdlib>
6 #include <iostream>
7 #include <ostream>
8 #include <fstream>
9 #include <string>
10 #include <time.h>
11 #include <sstream>
12 #include <iomanip>
13 #include <math.h>
14 #include <vector>
15 
16 #include "CImg.h"
17 #include "file.h"
18 #include "points.h"
19 #include "datatypedef.h"
20 
21 #include "colormaps.h"
22 
23 using namespace cimg_library;
24 using std::cout;
25 using std::cerr;
26 using std::endl;
27 
28 
29 /*
30  * Base class for objects that write data out to
31  * tecplot data files
32  */
34 
35  public:
36 
40  TecplotWriter();
41 
46  TecplotWriter(string rFilename);
47 
51  ~TecplotWriter();
52 
57  void setOutputFilename(string rFilename);
58 
63  string getOutputFilename();
64 
68  bool init();
69 
70  protected:
71 
72  string mFilename;
73 
74  ofstream mFileHandle;
75 
76 };
77 
78 
79 /*
80  * Handles outputing indexed_points data to tecplot
81  * Ordered file
82  */
84 
85  public:
86 
91 
96  TecplotOrderedWriter(string rFilename);
97 
101  virtual ~TecplotOrderedWriter();
102 
109  bool writeFile(string rTitle, std::vector<string> rVariableNames);
110 
120  bool addOrderedPartition(string rTitle, indexed_points *rpPoints, int rPartitionVariable);
121 
122  private:
123 
129  bool writePartition(int rPartitionNum);
130 
137  bool writePoints(int rPartitionNum);
138 
139  std::vector<indexed_points *> mPartitionPoints;
140  std::vector<string> mPartitionTitles;
141  std::vector<int> mPartitionVariable;
142 
144  static const int POINT_WIDTH = 5;
145 };
146 
147 #endif
string mFilename
Definition: tecplotwriter.h:72
std::vector< indexed_points * > mPartitionPoints
ofstream mFileHandle
Definition: tecplotwriter.h:74
std::vector< int > mPartitionVariable
std::vector< string > mPartitionTitles