TRIQS/triqs_cthyb 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
G2_tau.hpp
1/*******************************************************************************
2 *
3 * TRIQS: a Toolbox for Research in Interacting Quantum Systems
4 *
5 * Copyright (C) 2017, H. U.R. Strand, M. Ferrero and O. Parcollet
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
26#include "../qmc_data.hpp"
27#include "util.hpp"
28
29namespace triqs_cthyb {
30
31 using namespace triqs::gfs;
32 using namespace triqs::mesh;
33
34 // Measure imaginary time Green's function (all blocks)
35 struct measure_G2_tau {
36
37 public:
38 measure_G2_tau(std::optional<G2_tau_t> &G2_tau_opt, qmc_data const &data, G2_measures_t const &G2_measures);
39
40 void accumulate(mc_weight_t sign);
41 void collect_results(mpi::communicator const &comm);
42
43 private:
44 qmc_data const &data;
45 G2_tau_t::view_type G2_tau;
46 mc_weight_t average_sign;
47 block_order order;
48 G2_measures_t G2_measures;
49 };
50
51} // namespace triqs_cthyb