TRIQS/triqs_ctint 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
average_k.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 "../container_set.hpp"
9#include <triqs/stat/lin_binning.hpp>
10
11namespace triqs_ctint::measures {
12
14 struct average_k {
15
16 average_k(params_t const &, qmc_config_t const &qmc_config_, container_set *results);
17
19 void accumulate(mc_weight_t);
20
22 void collect_results(mpi::communicator const &comm);
23
25 std::string report() const;
26
27 private:
28 // The Monte-Carlo configuration
29 qmc_config_t const &qmc_config;
30
31 // Reference to double for accumulation
32 double &average_k_;
33 std::optional<double> &average_k_error_;
34
35 // Linear binning for error estimation
36 triqs::stat::lin_binning<dcomplex> k_bins_;
37
38 // Accumulation counter
39 long long N = 0;
40 };
41
42} // namespace triqs_ctint::measures
Type of the Monte-Carlo configuration.
Container for all (optional) quantities measured and post-processed by the solver.
std::string report() const
Report current value representation.
Definition average_k.cpp:31
void accumulate(mc_weight_t)
Accumulate average perturbation order.
Definition average_k.cpp:15
void collect_results(mpi::communicator const &comm)
Reduce and normalize.
Definition average_k.cpp:22
A struct combining both constr_params_t and solve_params_t.
Definition params.hpp:210