TRIQS/triqs_cthyb 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
container_set.cpp
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
22#include "./container_set.hpp"
23
24namespace triqs_cthyb {
25
27 void h5_write(h5::group h5group, std::string subgroup_name, container_set_t const &c) {
28
29 h5::group grp = subgroup_name.empty() ? h5group : h5group.create_group(subgroup_name);
30
31 h5_write(grp, "G_tau", c.G_tau);
32 h5_write(grp, "G_tau_accum", c.G_tau_accum);
33 h5_write(grp, "asymmetry_G_tau", c.asymmetry_G_tau);
34 h5_write(grp, "G_l", c.G_l);
35 h5_write(grp, "O_tau", c.O_tau);
36 h5_write(grp, "perturbation_order", c.perturbation_order);
37 h5_write(grp, "perturbation_order_total", c.perturbation_order_total);
38
39 h5_write(grp, "G2_tau", c.G2_tau);
40 h5_write(grp, "G2_iw", c.G2_iw);
41 h5_write(grp, "G2_iw_nfft", c.G2_iw_nfft);
42 h5_write(grp, "G2_iw_pp", c.G2_iw_pp);
43 h5_write(grp, "G2_iw_pp_nfft", c.G2_iw_pp_nfft);
44 h5_write(grp, "G2_iw_ph", c.G2_iw_ph);
45 h5_write(grp, "G2_iw_ph_nfft", c.G2_iw_ph_nfft);
46 h5_write(grp, "G2_iwll_pp", c.G2_iwll_pp);
47 h5_write(grp, "G2_iwll_ph", c.G2_iwll_ph);
48 }
49
51 void h5_read(h5::group h5group, std::string subgroup_name, container_set_t &c) {
52
53 h5::group grp = subgroup_name.empty() ? h5group : h5group.open_group(subgroup_name);
54
55 h5_read(grp, "G_tau", c.G_tau);
56 h5_read(grp, "G_tau_accum", c.G_tau_accum);
57 h5_read(grp, "asymmetry_G_tau", c.asymmetry_G_tau);
58 h5_read(grp, "G_l", c.G_l);
59 h5::try_read(grp, "O_tau", c.O_tau);
60 h5::try_read(grp, "perturbation_order", c.perturbation_order);
61 h5::try_read(grp, "perturbation_order_total", c.perturbation_order_total);
62
63 h5_read(grp, "G2_tau", c.G2_tau);
64 h5_read(grp, "G2_iw", c.G2_iw);
65 h5_read(grp, "G2_iw_nfft", c.G2_iw_nfft);
66 h5_read(grp, "G2_iw_pp", c.G2_iw_pp);
67 h5_read(grp, "G2_iw_pp_nfft", c.G2_iw_pp_nfft);
68 h5_read(grp, "G2_iw_ph", c.G2_iw_ph);
69 h5_read(grp, "G2_iw_ph_nfft", c.G2_iw_ph_nfft);
70 h5_read(grp, "G2_iwll_pp", c.G2_iwll_pp);
71 h5_read(grp, "G2_iwll_ph", c.G2_iwll_ph);
72 }
73
74} // namespace triqs_cthyb
Container for all results accumulated by the simulation.
friend void h5_read(h5::group h5group, std::string subgroup_name, container_set_t &c)
Function that reads all containers to hdf5 file.
std::optional< G_l_t > G_l
Single-particle Green's function in the Legendre representation.
std::optional< G2_tau_t > G2_tau
Two-particle Green's function with three fermionic times.
friend void h5_write(h5::group h5group, std::string subgroup_name, container_set_t const &c)
Function that writes all containers to hdf5 file.
std::optional< G_tau_G_target_t > asymmetry_G_tau
Violation of the property after the measurement.
std::optional< G2_iw_t > G2_iw_nfft
Two-particle Green's function with three fermionic frequencies.
std::optional< histogram > perturbation_order_total
Histogram of the total perturbation order.
std::optional< histo_map_t > perturbation_order
Histograms of the perturbation order for each block.
std::optional< G2_iw_t > G2_iw_pp_nfft
Two-particle Green's function in the particle-particle channel.
std::optional< G2_iw_t > G2_iw_ph
Two-particle Green's function in the particle-hole channel.
std::optional< G2_iw_t > G2_iw_ph_nfft
Two-particle Green's function in the particle-hole channel.
std::optional< G_tau_G_target_t > G_tau_accum
Intermediate Green's function used to accumulate (real or complex).
std::optional< G_tau_t > G_tau
Single-particle Green's function in imaginary time.
std::optional< G2_iwll_t > G2_iwll_ph
Two-particle Green's function in the particle-hole channel.
std::optional< G2_iwll_t > G2_iwll_pp
Two-particle Green's function in the particle-particle channel.
std::optional< gf< imtime, scalar_valued > > O_tau
General operator Green's function in imaginary time.
std::optional< G2_iw_t > G2_iw
Two-particle Green's function with three fermionic frequencies.
std::optional< G2_iw_t > G2_iw_pp
Two-particle Green's function in the particle-particle channel.