TRIQS/triqs_cthyb 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
O_tau_ins.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 <triqs/gfs.hpp>
25#include <triqs/mesh.hpp>
26
27#include "../qmc_data.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 class measure_O_tau_ins {
36
37 public:
38 measure_O_tau_ins(std::optional<gf<imtime, scalar_valued>> &O_tau_opt, qmc_data const &data, int n_tau, many_body_op_t const &op1, many_body_op_t const &op2, int min_ins, mc_tools::random_generator &rng);
39 void accumulate(mc_weight_t s);
40 void collect_results(mpi::communicator const &c);
41
42 private:
43 qmc_data const &data;
44 mc_weight_t average_sign;
45 gf<imtime, scalar_valued>::view_type O_tau;
46 many_body_op_t op1, op2;
47 op_desc op1_d, op2_d;
48 int min_ins;
49 mc_tools::random_generator &rng;
50
51 };
52
53} // namespace triqs_cthyb