7#include <triqs/utility/macros.hpp>
9#include "./qmc_config.hpp"
10#include "./container_set.hpp"
12namespace triqs_ctint {
25 std::optional<block2_gf<mesh::dlr_imfreq, matrix_valued>>
D0_iw;
28 std::optional<gf<mesh::dlr_imfreq, matrix_valued>>
Jperp_iw;
68 mpi::communicator world;
80 if (not
last_solve_params) TRIQS_RUNTIME_ERROR <<
"You need to run the solver once before you post-process";
84 static std::string hdf5_format() {
return "CTINT_SolverCore"; }
87 friend void h5_write(h5::group h5group, std::string subgroup_name,
solver_core const &s) {
88 auto grp = h5group.create_group(subgroup_name);
89 write_hdf5_format(grp, s);
90 h5_write_attribute(grp,
"TRIQS_GIT_HASH", std::string(STRINGIZE(TRIQS_GIT_HASH)));
91 h5_write_attribute(grp,
"CTINT_GIT_HASH", std::string(STRINGIZE(CTINT_GIT_HASH)));
92 h5_write(grp,
"", s.result_set());
93 h5_write(grp,
"constr_params", s.constr_params);
94 h5_write(grp,
"last_solve_params", s.last_solve_params);
95 h5_write(grp,
"G0_iw", s.G0_iw);
96 h5_write(grp,
"G0_iw_inv", s.G0_iw_inv);
97 h5_write(grp,
"G0_shift_iw", s.G0_shift_iw);
98 h5_write(grp,
"G0_shift_tau", s.G0_shift_tau);
99 h5_write(grp,
"D0_iw", s.D0_iw);
100 h5_write(grp,
"Jperp_iw", s.Jperp_iw);
105 static solver_core h5_read_construct(h5::group h5group, std::string subgroup_name) {
106 auto grp = h5group.open_group(subgroup_name);
109 h5_read(grp,
"", s.result_set());
110 h5_read(grp,
"last_solve_params", s.last_solve_params);
111 h5_read(grp,
"G0_iw", s.G0_iw);
112 h5::try_read(grp,
"G0_iw_inv", s.G0_iw_inv);
113 h5_read(grp,
"G0_shift_iw", s.G0_shift_iw);
114 h5_read(grp,
"G0_shift_tau", s.G0_shift_tau);
115 h5_read(grp,
"D0_iw", s.D0_iw);
116 h5_read(grp,
"Jperp_iw", s.Jperp_iw);
g_iw_t G0_iw
Non-interacting Green's function in Matsubara frequencies.
solver_core(constr_params_t const &constr_params_)
Construct a CT-INT solver.
void solve(solve_params_t const &solve_params)
void post_process()
Retrigger post-processing with the last set of parameters.
constr_params_t constr_params
Parameters used to construct the solver.
C2PY_IGNORE void prepare_G0_shift_iw(params_t const ¶ms)
Calculate the shifted non-interacting Green's function given .
std::optional< solve_params_t > last_solve_params
Parameters used in the last solve (empty until the solver has been run).
g_iw_t G0_shift_iw
The shifted non-interacting Green's function in Matsubara frequencies.
std::optional< block2_gf< mesh::dlr_imfreq, matrix_valued > > D0_iw
Dynamic density-density interaction in Matsubara frequencies (DLR mesh).
std::optional< gf< mesh::dlr_imfreq, matrix_valued > > Jperp_iw
Dynamic spin-spin interaction in Matsubara frequencies (DLR mesh).
g_tau_t G0_shift_tau
The shifted non-interacting Green's function in imaginary time.
g_iw_t G0_iw_inv
Inverse of the non-interacting Green's function .
Parameters used for constructing the solver class.
Container for all (optional) quantities measured and post-processed by the solver.
friend void h5_read(h5::group h5group, std::string subgroup_name, container_set &c)
Function that reads all containers from hdf5 file.
A struct combining both constr_params_t and solve_params_t.
Parameters passed to the solve method of the solver class.