TRIQS/triqs_tprf 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
types.hpp
1/*******************************************************************************
2 *
3 * TRIQS: a Toolbox for Research in Interacting Quantum Systems
4 *
5 * Copyright (C) 2017, H. U.R. Strand
6 *
7 * TRIQS is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU General Public License as published by the Free Software
9 * Foundation, either version 3 of the License, or (at your option) any later
10 * version.
11 *
12 * TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * TRIQS. If not, see <http://www.gnu.org/licenses/>.
19 *
20 ******************************************************************************/
21#pragma once
22
23#include <triqs/gfs.hpp>
24#include <triqs/mesh.hpp>
25#include <nda/nda.hpp>
26
27namespace triqs_tprf {
28
29using namespace triqs::gfs;
30using namespace triqs;
31using namespace nda;
32
34enum class Channel_t { PP, PH, PH_bar };
35
36typedef std::array<int,3> kpt_t;
37
39typedef gf<brzone, matrix_valued> ek_t;
40typedef ek_t::const_view_type ek_cvt;
41typedef ek_t::view_type ek_vt;
42
44typedef gf<imfreq, matrix_valued> g_iw_t;
45typedef g_iw_t::const_view_type g_iw_cvt;
46typedef g_iw_t::view_type g_iw_vt;
47
48typedef gf<prod<imfreq, brzone>, matrix_valued> gk_iw_t;
49typedef gk_iw_t::const_view_type gk_iw_cvt;
50typedef gk_iw_t::view_type gk_iw_vt;
51
52typedef gf<prod<imfreq, cyclat>, matrix_valued> gr_iw_t;
53typedef gr_iw_t::const_view_type gr_iw_cvt;
54typedef gr_iw_t::view_type gr_iw_vt;
55
56typedef gf<prod<imtime, cyclat>, matrix_valued> gr_tau_t;
57typedef gr_tau_t::const_view_type gr_tau_cvt;
58typedef gr_tau_t::view_type gr_tau_vt;
59
60typedef gf<prod<imfreq, imfreq>, tensor_valued<4>> chi0_t;
61typedef chi0_t::const_view_type chi0_cvt;
62typedef chi0_t::view_type chi0_vt;
63
64 // old style
65
66typedef gf<prod<imfreq, imfreq, brzone>, tensor_valued<4>> chi0q_t;
67typedef chi0q_t::const_view_type chi0q_cvt;
68typedef chi0q_t::view_type chi0q_vt;
69
70typedef gf<prod<imfreq, imfreq, cyclat>, tensor_valued<4>> chi0r_t;
71typedef chi0r_t::const_view_type chi0r_cvt;
72typedef chi0r_t::view_type chi0r_vt;
73
74 // new style
75
76typedef gf<prod<imfreq, cyclat>, tensor_valued<4>> chi_nr_t;
77typedef chi_nr_t::const_view_type chi_nr_cvt;
78typedef chi_nr_t::view_type chi_nr_vt;
79
80typedef gf<prod<imfreq, imfreq, cyclat>, tensor_valued<4>> chi_wnr_t;
81typedef chi_wnr_t::const_view_type chi_wnr_cvt;
82typedef chi_wnr_t::view_type chi_wnr_vt;
83
84typedef gf<prod<imfreq, imfreq, brzone>, tensor_valued<4>> chi_wnk_t;
85typedef chi_wnk_t::const_view_type chi_wnk_cvt;
86typedef chi_wnk_t::view_type chi_wnk_vt;
87
88typedef gf<prod<imfreq, imfreq, imfreq>, tensor_valued<4>> chi_wnn_t;
89typedef chi_wnn_t::const_view_type chi_wnn_cvt;
90typedef chi_wnn_t::view_type chi_wnn_vt;
91
92typedef gf<prod<imfreq, imfreq>, tensor_valued<4>> chi_nn_t;
93typedef chi_nn_t::const_view_type chi_nn_cvt;
94typedef chi_nn_t::view_type chi_nn_vt;
95
96typedef gf<prod<brzone, imfreq, imfreq, imfreq>, tensor_valued<4>> chi_kwnn_t;
97typedef chi_kwnn_t::const_view_type chi_kwnn_cvt;
98typedef chi_kwnn_t::view_type chi_kwnn_vt;
99
100// -- New style types FIXME notation
101
102// bosonic freq w for "\omega"
103// fermionic freq "n" for "\nu"
104// imagnary time "t" for "\tau"
105// real freq f
106// real space "r"
107// momentum space "k"
108
109typedef gf<brzone, matrix_valued> e_k_t;
110typedef e_k_t::const_view_type e_k_cvt;
111typedef e_k_t::view_type e_k_vt;
112
113typedef gf<cyclat, matrix_valued> e_r_t;
114typedef e_r_t::const_view_type e_r_cvt;
115typedef e_r_t::view_type e_r_vt;
116
117typedef gf<imfreq, matrix_valued> g_w_t;
118typedef g_w_t::const_view_type g_w_cvt;
119typedef g_w_t::view_type g_w_vt;
120
121typedef gf<imtime, matrix_valued> g_t_t;
122typedef g_t_t::const_view_type g_t_cvt;
123typedef g_t_t::view_type g_t_vt;
124
125// DLR
126
127typedef gf<dlr_imfreq, matrix_valued> g_Dw_t;
128typedef g_Dw_t::const_view_type g_Dw_cvt;
129typedef g_Dw_t::view_type g_Dw_vt;
130
131typedef gf<dlr_imtime, matrix_valued> g_Dt_t;
132typedef g_Dt_t::const_view_type g_Dt_cvt;
133typedef g_Dt_t::view_type g_Dt_vt;
134
135typedef gf<dlr, matrix_valued> g_Dc_t;
136typedef g_Dc_t::const_view_type g_Dc_cvt;
137typedef g_Dc_t::view_type g_Dc_vt;
138
139// Real-freq
140
141typedef gf<refreq, matrix_valued> g_f_t;
142typedef g_f_t::const_view_type g_f_cvt;
143typedef g_f_t::view_type g_f_vt;
144
145// On lattice in real- and k-space
146
147typedef gf<prod<refreq, brzone>, matrix_valued> g_fk_t;
148typedef g_fk_t::const_view_type g_fk_cvt;
149typedef g_fk_t::view_type g_fk_vt;
150
151typedef gf<prod<retime, brzone>, matrix_valued> g_Tk_t;
152typedef g_Tk_t::const_view_type g_Tk_cvt;
153typedef g_Tk_t::view_type g_Tk_vt;
154
155typedef gf<prod<refreq, cyclat>, matrix_valued> g_fr_t;
156typedef g_fr_t::const_view_type g_fr_cvt;
157typedef g_fr_t::view_type g_fr_vt;
158
159typedef gf<prod<retime, cyclat>, matrix_valued> g_Tr_t;
160typedef g_Tr_t::const_view_type g_Tr_cvt;
161typedef g_Tr_t::view_type g_Tr_vt;
162
163typedef gf<prod<imfreq, brzone>, matrix_valued> g_wk_t;
164typedef g_wk_t::const_view_type g_wk_cvt;
165typedef g_wk_t::view_type g_wk_vt;
166
167typedef gf<prod<imfreq, cyclat>, matrix_valued> g_wr_t;
168typedef g_wr_t::const_view_type g_wr_cvt;
169typedef g_wr_t::view_type g_wr_vt;
170
171typedef gf<prod<imtime, cyclat>, matrix_valued> g_tr_t;
172typedef g_tr_t::const_view_type g_tr_cvt;
173typedef g_tr_t::view_type g_tr_vt;
174
175typedef gf<prod<imtime, brzone>, matrix_valued> g_tk_t;
176typedef g_tk_t::const_view_type g_tk_cvt;
177typedef g_tk_t::view_type g_tk_vt;
178
179// DLR
180
181typedef gf<prod<dlr_imfreq, brzone>, matrix_valued> g_Dwk_t;
182typedef g_Dwk_t::const_view_type g_Dwk_cvt;
183typedef g_Dwk_t::view_type g_Dwk_vt;
184
185typedef gf<prod<dlr_imfreq, cyclat>, matrix_valued> g_Dwr_t;
186typedef g_Dwr_t::const_view_type g_Dwr_cvt;
187typedef g_Dwr_t::view_type g_Dwr_vt;
188
189typedef gf<prod<dlr_imfreq, cyclat>, matrix_valued> g_Dwr_t;
190typedef g_Dwr_t::const_view_type g_Dwr_cvt;
191typedef g_Dwr_t::view_type g_Dwr_vt;
192
193typedef gf<prod<dlr_imtime, cyclat>, matrix_valued> g_Dtr_t;
194typedef g_Dtr_t::const_view_type g_Dtr_cvt;
195typedef g_Dtr_t::view_type g_Dtr_vt;
196
197// Susceptibilities
198
199typedef gf<imtime, tensor_valued<4>> chi_t_t;
200typedef chi_t_t::const_view_type chi_t_cvt;
201typedef chi_t_t::view_type chi_t_vt;
202
203typedef gf<prod<imtime, cyclat>, tensor_valued<4>> chi_tr_t;
204typedef chi_tr_t::const_view_type chi_tr_cvt;
205typedef chi_tr_t::view_type chi_tr_vt;
206
207typedef gf<prod<imfreq, cyclat>, tensor_valued<4>> chi_wr_t;
208typedef chi_wr_t::const_view_type chi_wr_cvt;
209typedef chi_wr_t::view_type chi_wr_vt;
210
211typedef gf<prod<imfreq, brzone>, tensor_valued<4>> chi_wk_t;
212typedef chi_wk_t::const_view_type chi_wk_cvt;
213typedef chi_wk_t::view_type chi_wk_vt;
214
215typedef gf<prod<refreq, brzone>, tensor_valued<4>> chi_fk_t;
216typedef chi_fk_t::const_view_type chi_fk_cvt;
217typedef chi_fk_t::view_type chi_fk_vt;
218
219typedef gf<prod<retime, brzone>, tensor_valued<4>> chi_Tk_t;
220typedef chi_Tk_t::const_view_type chi_Tk_cvt;
221typedef chi_Tk_t::view_type chi_Tk_vt;
222
223typedef gf<prod<retime, cyclat>, tensor_valued<4>> chi_Tr_t;
224typedef chi_Tr_t::const_view_type chi_Tr_cvt;
225typedef chi_Tr_t::view_type chi_Tr_vt;
226
227typedef gf<prod<brzone, imfreq>, tensor_valued<4>> chi_kw_t;
228typedef chi_kw_t::const_view_type chi_kw_cvt;
229typedef chi_kw_t::view_type chi_kw_vt;
230
231typedef gf<brzone, tensor_valued<4>> chi_k_t;
232typedef chi_k_t::const_view_type chi_k_cvt;
233typedef chi_k_t::view_type chi_k_vt;
234
235typedef gf<cyclat, tensor_valued<4>> chi_r_t;
236typedef chi_r_t::const_view_type chi_r_cvt;
237typedef chi_r_t::view_type chi_r_vt;
238
239typedef gf<imfreq, tensor_valued<4>> chi_w_t;
240typedef chi_w_t::const_view_type chi_w_cvt;
241typedef chi_w_t::view_type chi_w_vt;
242
243// DLR
244
245typedef gf<dlr_imtime, tensor_valued<4>> chi_Dt_t;
246typedef chi_Dt_t::const_view_type chi_Dt_cvt;
247typedef chi_Dt_t::view_type chi_Dt_vt;
248
249typedef gf<dlr_imfreq, tensor_valued<4>> chi_Dw_t;
250typedef chi_Dw_t::const_view_type chi_Dw_cvt;
251typedef chi_Dw_t::view_type chi_Dw_vt;
252
253typedef gf<dlr, tensor_valued<4>> chi_Dc_t;
254typedef chi_Dc_t::const_view_type chi_Dc_cvt;
255typedef chi_Dc_t::view_type chi_Dc_vt;
256
257
258typedef gf<prod<dlr_imtime, cyclat>, tensor_valued<4>> chi_Dtr_t;
259typedef chi_Dtr_t::const_view_type chi_Dtr_cvt;
260typedef chi_Dtr_t::view_type chi_Dtr_vt;
261
262typedef gf<prod<dlr_imfreq, cyclat>, tensor_valued<4>> chi_Dwr_t;
263typedef chi_Dwr_t::const_view_type chi_Dwr_cvt;
264typedef chi_Dwr_t::view_type chi_Dwr_vt;
265
266typedef gf<prod<dlr_imfreq, brzone>, tensor_valued<4>> chi_Dwk_t;
267typedef chi_Dwk_t::const_view_type chi_Dwk_cvt;
268typedef chi_Dwk_t::view_type chi_Dwk_vt;
269
270// -- back to old style
271
272typedef gf<prod<brzone, imfreq, imfreq, imfreq>, tensor_valued<4>> chiq_t;
273typedef chiq_t::const_view_type chiq_cvt;
274typedef chiq_t::view_type chiq_vt;
275
277typedef gf<prod<imfreq, imfreq, imfreq>, tensor_valued<4>> g2_iw_t;
278typedef g2_iw_t::const_view_type g2_iw_cvt;
279typedef g2_iw_t::view_type g2_iw_vt;
280
281// block greens functions
282typedef block2_gf<prod<imfreq, imfreq, imfreq>, tensor_valued<4>> b_g2_iw_t;
283typedef b_g2_iw_t::view_type b_g2_iw_vt;
284typedef b_g2_iw_t::const_view_type b_g2_iw_cvt;
285
286typedef block_gf<imfreq, matrix_valued> b_g_iw_t;
287typedef b_g_iw_t::view_type b_g_iw_vt;
288typedef b_g_iw_t::const_view_type b_g_iw_cvt;
289
291//using g_iw_t = gf<imfreq, matrix_valued>;
292
294using g_tau_t = gf<imtime, matrix_valued>;
295typedef g_tau_t::const_view_type g_tau_cvt;
296typedef g_tau_t::view_type g_tau_vt;
297
299using chi2_iw_t = gf<imfreq, tensor_valued<4>>;
300
302using chi2_tau_t = gf<imtime, tensor_valued<4>>;
303
305using chi3_iw_t = gf<prod<imfreq, imfreq>, tensor_valued<4>>;
306
308using chi3_tau_t = gf<prod<imtime, imtime>, tensor_valued<4>>;
309
311using chi4_iw_t =
312 gf<prod<imfreq, imfreq, imfreq>, tensor_valued<4>>;
313
315using chi4_tau_t =
316 gf<prod<imtime, imtime, imtime>, tensor_valued<4>>;
317
318} // namespace triqs_tprf