-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclean.cpp
118 lines (94 loc) · 5.46 KB
/
clean.cpp
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
/////////////////////////////////////////////////////////////////////////////////////////
void clean()
{
free_dmatrix(matrix_Rx,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(matrix_Ry,0,M_Bar-1,0,M_Bar-1);
free_f3tensor(GAMA,0,M_Bar-1,0,M_Bar-1,0,M_Bar-1);
free_f3tensor(q,0,NMAX,0,LOCAL_SIZE-1,0,M_Bar-1);
free_f3tensor(qstar,0,NMAX,0,LOCAL_SIZE-1,0,M_Bar-1);
free_dvector(WA,0,LOCAL_SIZE-1);
free_dvector(WB,0,LOCAL_SIZE-1);
free_dmatrix(WA_out,0,n_r_WAB,0,LOCAL_SIZE-1);
free_dmatrix(WB_out,0,n_r_WAB,0,LOCAL_SIZE-1);
free_dmatrix(dA_anderson,0,n_r_WAB,0,LOCAL_SIZE-1);
free_dmatrix(dB_anderson,0,n_r_WAB,0,LOCAL_SIZE-1);
free_dmatrix(M11_out,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(M33_out,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(M12_out,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(M13_out,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(M23_out,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(d11_anderson,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(d33_anderson,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(d12_anderson,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(d13_anderson,0,n_r_M,0,LOCAL_SIZE-1);
free_dmatrix(d23_anderson,0,n_r_M,0,LOCAL_SIZE-1);
free_dvector(RA,0,LOCAL_SIZE-1);
free_dvector(RB,0,LOCAL_SIZE-1);
free_dmatrix(RHOA,0,LOCAL_SIZE-1,0,M_Bar-1);
free_dmatrix(RHOB,0,LOCAL_SIZE-1,0,M_Bar-1);
free_f3tensor(M_OP,0,LOCAL_SIZE-1,0,N_dim_ddm-1,0,N_dim_ddm-1);
free_f3tensor(S_OP,0,LOCAL_SIZE-1,0,N_dim_ddm-1,0,N_dim_ddm-1);
free_f3tensor(SA_OP,0,LOCAL_SIZE-1,0,N_dim_ddm-1,0,N_dim_ddm-1);
free_f3tensor(SB_OP,0,LOCAL_SIZE-1,0,N_dim_ddm-1,0,N_dim_ddm-1);
free_f3tensor(THETAij,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(THETAij_M11_M22,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(THETAij_M33,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(THETAij_M12,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(THETAij_M13,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(THETAij_M23,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(J11ij,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(J22ij,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(J12ij,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(J13ij,0,M_Bar-1,0,M_Bar-1);
free_dmatrix(J23ij,0,M_Bar-1,0,M_Bar-1);
free_f3tensor(GA1_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA1_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA1_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GA1_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA1_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA1_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GA2_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA2_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA2_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GA2_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA2_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA2_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GA3_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA3_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA3_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GA3_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA3_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA3_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB3_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB3_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB3_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB3_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB3_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB3_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GA3_star_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA3_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA3_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GA3_star_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GA3_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GA3_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB1_star_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB1_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB1_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB1_star_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB1_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB1_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB2_star_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB2_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB2_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB2_star_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB2_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB2_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB3_star_R_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB3_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB3_star_R_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_f3tensor(GB3_star_I_inverse,0,LOCAL_SIZE-1,0,M_Bar-1,0,M_Bar-1);
free_dmatrix_NR(sa_GB3_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
free_imatrix_NR(ija_GB3_star_I_inverse,1,LOCAL_SIZE,1,M_Bar*M_Bar);
}
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////