-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakeRDF.h
181 lines (159 loc) · 3.6 KB
/
makeRDF.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#ifndef MAKERDF_H_INC
#define MAKERDF_H_INC
#include <map>
//#include <list>
#include <vector>
#include <algorithm>
#include "snapshot.h"
#include "kh_math_fourier.h"
#include "hydro_math.h"
using namespace std;
typedef std::vector<Snapshot*>::const_iterator citer;
struct s_xyz {
real x, y ,z;
};
typedef struct {
real **acfST, *orgST;
int count;
} TBuf;
static const char* test_txt[] = { "par1", "par2", "par3"};
#define VDOT3(a,b) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] )
#define Sqr(rrrr) ( (rrrr)*(rrrr))
class makeRDF {
public:
makeRDF(std::vector<Snapshot*> &_sl) ;
~makeRDF() {
freeMem();
/* delete [] tBuf;
* delete [] avAcfST[0];
* delete [] avAcfST;
* delete [] valST;
*/
};
typedef enum { ISO, ANISO } T_RDF;
bool flag_anisotropy= false;
bool flag_SSF_from_g= false;
void calcRDF();
void calcRDF_inter_type (int i, int j, T_RDF rdftype );
void printRDF (int i, int j, T_RDF rdftype );
void calcP1z(int type);
void calcP1s(int type);
void calcSSF(T_RDF rdftype = ISO);
void calcSSF_from_g(T_RDF rdftype = ISO);
void calcISF();
void EvalSpacetimeCorr();
void InitSpacetimeCorr();
void StartMainProcess();
void StartPreProcess();
bool* periodicity;
// intput value
int nFunCorr =4 ;
int limitCorrAv =200;
int nBuffCorr = 10; // nValCorr = number x nBuffCorr
int nValCorr =500; // # of average sets
int step=1,stepCorr=1;
int countCorrAv;
static std::string filename_template;
char filename0[100];
char filename1[100];
char filename2[100];
FILE* fp[3];
// Avf
TBuf *tBuf;
real **avAcfST, *valST;
int n_valST;
real deltaT = 0.0001 ;
// Avf function
Hydrodynamic_Function* hydro_function;
void PrintSpacetimeCorr ();
void ZeroSpacetimeCorr ();
map<real, real>& get_g000();
map<real, real>& get_h000();
map<real, real>& get_h110();
map<real, real>& get_h112();
map<real, real>& get_h220();
map<real, real>& get_S();
map<real, real>& get_F();
map<real, real>& get_M();
map<real, real>& get_M_L();
map<real, real>& get_M_T();
real box_x,box_y,box_z;
real hbox_x,hbox_y,hbox_z;
box3* box;
int maxSnap ;
real r_cut,q_cut;
int maxbin =200;
int maxbinz = 5;
int maxbins = 5;
int maxbinq = 100;
real dq;
int maxAtom;
void set_maxbin(int _maxbin){
maxbin = _maxbin;
var_r = r_cut/maxbin;
}
size_t rbin_t;
/* long* hist000;
* double* hist110;
* double* hist112;
* double* hist220;
*
* long* histcyl000;
* double* histcyl110;
* double* histcyl112;
* double* histcyl220;
*/
double* ca_radius;
double* ca_g000;
double* ca_h000;
double* ca_h110;
double* ca_h112;
double* ca_h220;
double* ca_gcyl000;
double* ca_hcyl110;
double* ca_hcyl112;
double* ca_hcyl220;
double* ca_c_q;
double* ca_q_radius;
double* ca_S_q;
double* ca_h000_q;
double* ca_h110_q;
double* ca_h112_q;
double* ca_h220_q;
double* ca_c_r;
double* ca_h_mod;
char ext[30]="";
private:
vector<real> vP1s;
vector<real> vP1zj;
vector<real> vz;
vector<real> vs;
vector<real> vPmus1s;
vector<real> vPmuz1z;
vector<real> vP1z;
vector<real> vP1zi;
/* map<real, real> S_qr;
* map<real, real> S_qi;
* map<real, real> qlist;
*/
void AllocMem();
void freeMem();
void calcRDF_anisotropy_snap (Snapshot* snap);
void calcRDF_isotropy ();
void calcRDF_isotropy (int i, int j);
void calcRDF_anisotropy ();
void calcRDF_anisotropy (int i, int j);
void AccumSpacetimeCorr ();
void calcIntegrated_h000();
real var_k, var_r;
const std::vector<Snapshot*> snaplist;
citer snapbegin;
citer snapend;
atom *first_atoms;
public:
void hydro_init();
void hydro_print();
void hydro_run();
void hydro_end();
};
#endif /* ----- #ifndef MAKERDF_H_INC ----- */