TRIQS/triqs_ctint 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
M_iw.hpp
1// Copyright (c) 2017--present, The Simons Foundation
2// This file is part of TRIQS/ctint and is licensed under the terms of GPLv3 or later.
3// SPDX-License-Identifier: GPL-3.0-or-later
4// See LICENSE in the root of this distribution for details.
5
6#pragma once
7#include "../qmc_config.hpp"
8#include "../nfft_buf.hpp"
9#include "../container_set.hpp"
10
11namespace triqs_ctint::measures {
12
18 struct M_iw {
19
20 M_iw(params_t const &params_, qmc_config_t const &qmc_config_, container_set *results);
21
22 // M_iw needs to be uncopyable due to nfft_buf_t
23 M_iw(M_iw const &) = delete;
24 M_iw(M_iw &&) = default;
25 ~M_iw() = default;
26 M_iw &operator=(M_iw const &) = delete;
27 M_iw &operator=(M_iw &&) = delete;
28
30 void accumulate(mc_weight_t sign);
31
33 void collect_results(mpi::communicator const &comm);
34
35 private:
36 // Capture the parameters
37 params_t const &params;
38
39 // The Monte-Carlo configuration
40 qmc_config_t const &qmc_config;
41
42 // Container for the accumulation on DLR mesh
43 g_dlr_iw_v_t M_iw_;
44
45 // The average sign
46 mc_weight_t Z = 0.0;
47
48 // Matrix views for the Hartree term accumulation (equal-time contribution)
49 std::vector<matrix_view<M_tau_scalar_t>> M_hartree_;
50
51 // Intermediate data arrays for each block. M_data[bl](iw_idx, a, b)
52 nda::array<nda::array<dcomplex, 3>, 1> M_data;
53
54 // Target matsubara frequencies for type-3 NFFT
55 std::vector<mesh::matsubara_freq> target_mf;
56
57 // Container of nfft_buffers. buf_vec[block_idx](a,b)
58 std::vector<array<nfft_buf_t<1>, 2>> buf_vec;
59 };
60
61} // namespace triqs_ctint::measures
Type of the Monte-Carlo configuration.
Container for all (optional) quantities measured and post-processed by the solver.
void collect_results(mpi::communicator const &comm)
Collect results and normalize.
Definition M_iw.cpp:89
void accumulate(mc_weight_t sign)
Accumulate M_iw using nfft.
Definition M_iw.cpp:47
A struct combining both constr_params_t and solve_params_t.
Definition params.hpp:210