TRIQS/triqs_tprf 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
linalg.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 <nda/nda.hpp>
24#include <triqs/gfs.hpp>
25#include <triqs/mesh.hpp>
26
27using namespace triqs::gfs;
28using namespace triqs::mesh;
29using namespace nda;
30
31#include "channel_grouping.hpp"
32#include "types.hpp"
33
34namespace triqs_tprf {
35
36 using g2_n_t = gf<imfreq, tensor_valued<4>>;
37 using g2_n_vt = g2_n_t::view_type;
38 using g2_n_cvt = g2_n_t::const_view_type;
39
40 using g2_nn_t = gf<prod<imfreq, imfreq>, tensor_valued<4>>;
41 using g2_nn_vt = g2_nn_t::view_type;
42 using g2_nn_cvt = g2_nn_t::const_view_type;
43
63 template <Channel_t CH> g2_iw_t inverse(g2_iw_cvt g);
64
83 g2_iw_t inverse_PH(g2_iw_vt g);
84
103 g2_iw_t inverse_PP(g2_iw_vt g);
104
123 g2_iw_t inverse_PH_bar(g2_iw_vt g);
124
125 template <Channel_t CH> g2_nn_t inverse(g2_nn_cvt g);
126
127 g2_nn_t inverse_PH(g2_nn_vt g);
128 g2_nn_t inverse_PP(g2_nn_vt g);
129 g2_nn_t inverse_PH_bar(g2_nn_vt g);
130
155
156 template <Channel_t CH> g2_iw_t product(g2_iw_cvt A, g2_iw_cvt B);
157
182
183 g2_iw_t product_PH(g2_iw_vt A, g2_iw_vt B);
184
209
210 g2_iw_t product_PP(g2_iw_vt A, g2_iw_vt B);
211
236
237 g2_iw_t product_PH_bar(g2_iw_vt A, g2_iw_vt B);
238
239 template <Channel_t CH> g2_nn_t product(g2_nn_cvt A, g2_nn_cvt B);
240
241 g2_nn_t product_PH(g2_nn_vt A, g2_nn_vt B);
242 g2_nn_t product_PP(g2_nn_vt A, g2_nn_vt B);
243 g2_nn_t product_PH_bar(g2_nn_vt A, g2_nn_vt B);
244
266 template <Channel_t CH> g2_iw_t identity(g2_iw_cvt g);
267
289
290 g2_iw_t identity_PH(g2_iw_vt g);
291
313
314 g2_iw_t identity_PP(g2_iw_vt g);
315
337
338 g2_iw_t identity_PH_bar(g2_iw_vt g);
339
340 template <Channel_t CH> g2_nn_t identity(g2_nn_cvt g);
341
342 g2_nn_t identity_PH(g2_nn_vt g);
343 g2_nn_t identity_PP(g2_nn_vt g);
344 g2_nn_t identity_PH_bar(g2_nn_vt g);
345
346 // internal helper, not part of the Python API
347 C2PY_IGNORE array<g2_nn_cvt::scalar_t, 4> scalar_product_PH(g2_n_cvt vL, g2_nn_cvt M, g2_n_cvt vR);
348
349} // namespace triqs_tprf