TRIQS/triqs_cthyb 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
G2_iw.hpp
1/*******************************************************************************
2 *
3 * TRIQS: a Toolbox for Research in Interacting Quantum Systems
4 *
5 * Copyright (C) 2018, The Simons Foundation
6 * Author: H. U.R. Strand
7 *
8 * TRIQS is free software: you can redistribute it and/or modify it under the
9 * terms of the GNU General Public License as published by the Free Software
10 * Foundation, either version 3 of the License, or (at your option) any later
11 * version.
12 *
13 * TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 * details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * TRIQS. If not, see <http://www.gnu.org/licenses/>.
20 *
21 ******************************************************************************/
22#pragma once
23
24#include "G2_iw_acc.hpp"
25
26namespace triqs_cthyb {
27
28 // Measure the two-particle Green's function in Matsubara frequency
29 template <G2_channel Channel> class measure_G2_iw : public G2_iw::measure_G2_iw_base<Channel> {
30
31 public:
32 measure_G2_iw(std::optional<G2_iw_t> &G2_iw_opt, qmc_data const &data,
33 G2_measures_t const &G2_measures);
34 void accumulate(mc_weight_t s);
35 void accumulate_M_opt();
36
37 using B = G2_iw::measure_G2_iw_base<Channel>;
38 using B::collect_results;
39
40 private:
41 G2_iw::M_block_arr_t M_block_arr;
42 using B::M, B::M_mesh, B::G2_measures, B::data, B::timer_M, B::accumulate_G2;
43 };
44
45} // namespace triqs_cthyb