COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
File09.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef __FILE09_H_
9 #define __FILE09_H_
10 
11 #include <covise/covise.h>
12 #include <util/coTypes.h>
13 
14 #include "istreamBLK.h"
15 #include <util/ChoiceList.h>
16 #include "StarFile.h"
17 
18 namespace covise
19 {
20 
21 class STAREXPORT File09 : public StarFile
22 {
23 
24 private:
25  File09(const File09 &);
26  File09 &operator=(const File09 &);
27  File09();
29 
30  // we need this to check whether file has changed
31  ino_t d_inode;
32  dev_t d_device;
33 
34 public:
35  struct Header
36  {
37  int iter;
38  float time;
39  int ncell, nbc, nbw, nbs, nbb, nnode, wpost;
40  char title[52];
41  int iskip, nbcyc, nbcut, lvers, iretw, ifver, ntrec,
42  hrad, npatch, ntpch, numcon, nsitem, field35_50[16],
43  lstep, lramp, iterso, itersn, steady, compg,
44  nbc012, field58_82[25], mrec29, mrec39;
45  float scale9, field86_99[13];
46  int ntcell;
47  float prepp_2_1;
48  int lmvgrd, wsurf;
49  float field103_113[11];
50  int field114_124[11], npdrop9;
51  float field126;
52  int nsol, nwset, nbpt;
53  int field130, nbnd[6]; // ???
54  int nbcuto;
55  int field138_199[62];
56  int nummat, nsmat;
57  float field202_1235[1034];
58  int lsrf1236_1345[110],
59  lvoid, field1347_1348[2],
60  icoup, mspin;
61  float field1351_1799[449];
62  int lstar[101]; // LSTAR(1...100) -> lstar[0..100]
63  int nbncst, nbncen;
64  float field1903;
65  int nscl, nreg, nbsi, spcyc, mrecmm, nbp23, nclps,
66  nwprsm, nprsm, nclp, nclpf, itypen,
67  field1916_2048[133];
68  };
69 
70  int iter;
71  float time;
72  int ncell, nbc, nbw, nbs, nbb, nnode, wpost;
73  char title[52];
74  int iskip, nbcyc, nbcut, lvers, iretw, ifver, ntrec,
75  hrad, npatch, ntpch, numcon, nsitem, field35_50[16],
76  lstep, lramp, iterso, itersn, steady, compg,
77  nbc012, field58_82[25], mrec29, mrec39;
78  float scale9, field86_99[13];
79  int ntcell;
80  float prepp_2_1;
81  int lmvgrd, wsurf;
82  float field103_113[11];
83  int field114_124[11], npdrop9;
84  float field126;
85  int nsol, nwset, nbpt;
86  int field130, nbnd[6]; // ???
87  int nbcuto;
88  int field138_199[62];
89  int nummat, nsmat;
90  float field202_1235[1034];
91  int lsrf1236_1345[110],
92  lvoid, field1347_1348[2],
93  icoup, mspin;
94  float field1351_1800[449];
95  int lstar[101];
96  int nbncst, nbncen;
97  float field1903;
98  int nscl, nreg, nbsi, spcyc, mrecmm, nbp23, nclps,
99  nwprsm, nprsm, nclp, nclpf, itypen,
100  field1916_2048[133];
101 
102  ~File09();
103 
104  File09(int fd);
105 
106  int isValid()
107  {
108  return (ncell != 0);
109  }
110 
111  virtual ChoiceList *get_choice(const char **, int) const;
112 
113  // read a field: return #of elements read
114  int readField(int fieldNo, float *f1,
115  float *f2 = NULL,
116  float *f3 = NULL);
117 
119  // 1 = true
120  // 0 = false
121  // -1 = could not stat file
122  int isFile(const char *filename);
123 };
124 }
125 #endif
#define STAREXPORT
Definition: coExport.h:188
float prepp_2_1
Definition: File09.h:47
int nummat
Definition: File09.h:89
float prepp_2_1
Definition: File09.h:80
float field1903
Definition: File09.h:97
int nbncst
Definition: File09.h:96
int iter
Definition: File09.h:70
int nwset
Definition: File09.h:52
int nbcuto
Definition: File09.h:87
int spcyc
Definition: File09.h:65
int wsurf
Definition: File09.h:48
int nwset
Definition: File09.h:85
int npdrop9
Definition: File09.h:50
#define NULL
Definition: covise_list.h:22
int wpost
Definition: File09.h:39
int steady
Definition: File09.h:74
int isValid()
Definition: File09.h:106
int npdrop9
Definition: File09.h:83
int wsurf
Definition: File09.h:81
istreamBLK input
Definition: File09.h:28
int nbcuto
Definition: File09.h:54
int ntcell
Definition: File09.h:46
float time
Definition: File09.h:38
Definition: istreamBLK.h:26
float scale9
Definition: File09.h:45
float field1903
Definition: File09.h:64
float field126
Definition: File09.h:84
Definition: File09.h:21
int mspin
Definition: File09.h:58
dev_t d_device
Definition: File09.h:32
float scale9
Definition: File09.h:78
int iter
Definition: File09.h:37
float time
Definition: File09.h:71
int ntcell
Definition: File09.h:79
int wpost
Definition: File09.h:72
int nbncst
Definition: File09.h:63
int spcyc
Definition: File09.h:98
ino_t d_inode
Definition: File09.h:31
int mspin
Definition: File09.h:91
float field126
Definition: File09.h:51
int nummat
Definition: File09.h:56
int steady
Definition: File09.h:41
Definition: ChoiceList.h:18
Definition: File09.h:35
Definition: StarFile.h:17