COVISE Core
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
18namespace covise
19{
20
22{
23
24private:
25 File09(const File09 &);
29
30 // we need this to check whether file has changed
31 ino_t d_inode;
32 dev_t d_device;
33
34public:
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
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:212
#define NULL
Definition: covise_list.h:22
list of all chemical elements
Definition: coConfig.h:27
Definition: ChoiceList.h:19
Definition: File09.h:22
int nbncen
Definition: File09.h:96
float field1903
Definition: File09.h:97
istreamBLK input
Definition: File09.h:28
File09(const File09 &)
int nsmat
Definition: File09.h:89
int mrecmm
Definition: File09.h:98
int itersn
Definition: File09.h:76
int iter
Definition: File09.h:70
int icoup
Definition: File09.h:93
int lmvgrd
Definition: File09.h:81
int nbpt
Definition: File09.h:85
int nbb
Definition: File09.h:72
File09 & operator=(const File09 &)
int ifver
Definition: File09.h:74
float time
Definition: File09.h:71
int isValid()
Definition: File09.h:106
int itypen
Definition: File09.h:99
float field126
Definition: File09.h:84
int ntcell
Definition: File09.h:79
int field130
Definition: File09.h:86
float prepp_2_1
Definition: File09.h:80
dev_t d_device
Definition: File09.h:32
int nbcuto
Definition: File09.h:87
ino_t d_inode
Definition: File09.h:31
Definition: File09.h:36
int nbcuto
Definition: File09.h:54
int field130
Definition: File09.h:53
int iter
Definition: File09.h:37
int lmvgrd
Definition: File09.h:48
int itypen
Definition: File09.h:66
int itersn
Definition: File09.h:43
int nbncen
Definition: File09.h:63
int nbpt
Definition: File09.h:52
float field1903
Definition: File09.h:64
float time
Definition: File09.h:38
float field126
Definition: File09.h:51
int nsmat
Definition: File09.h:56
int icoup
Definition: File09.h:60
int nbb
Definition: File09.h:39
float prepp_2_1
Definition: File09.h:47
int mrecmm
Definition: File09.h:65
int ifver
Definition: File09.h:41
int ntcell
Definition: File09.h:46
Definition: istreamBLK.h:27
Definition: StarFile.h:18