-
Notifications
You must be signed in to change notification settings - Fork 0
/
ssf.h
67 lines (48 loc) · 1.17 KB
/
ssf.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
#ifndef SSF_H
#define SSF_H
#include "cell.h"
//-------------------------------
// Static Structure Factor (SSF)
//-------------------------------
class SSF
{
public:
SSF(){};
~SSF(){};
void Routine();
private:
// check if the ssf file exists.
void check_file_exist( const string &name );
// Calculate all the ssf issues inside this function.
void cal();
// Calculate the static structure factor.
void ssf_3D( const Cell &cel, float *sf ) const;
// Sum up the terms involing phase (k \dot x)
void sumup( float *sum_exp, const float dr[3] ) const;
// Calculate how many |G|.
int cal_diff_norm(
int *nG_1D,
int *which_norm
) const;
// Calculate the 1D SSF in sf_1D.
void ssf_1D(
float *G_1D,
float *sf_1D,
const int *norm_index,
const int *nG_1D,
const float *sf
) const;
// Output the static structure factor.
void write_ssf(
const float *G_1D,
const float *sf_1D
) const;
private:
float dgx; // dG between nearest G points. 2pi/a1
float dgy; // 2pi / a2
float dgz; // 2pi / a3
int ngx, ngy, ngz; // Number of G in each direction.
int ngtot; // Total number of G.
int diff_norm; // Number of differnt |G|.
};
#endif