Skip to content

Commit

Permalink
Formatting and minor simplifications in nn_tau.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Jun 26, 2024
1 parent fef621e commit ae2206c
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions c++/triqs_ctseg/measures/nn_tau.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ namespace measures {
nn_tau::nn_tau(params_t const &p, work_data_t const &wdata, configuration_t const &config, results_t &results)
: wdata{wdata}, config{config}, results{results} {

beta = p.beta;
ntau = p.n_tau_chi2;
dtau = p.beta / (ntau - 1);
n_color = config.n_color();
block_number = wdata.block_number;
beta = p.beta;
ntau = p.n_tau_chi2;
dtau = p.beta / (ntau - 1);
n_color = config.n_color();
block_number = wdata.block_number;
index_in_block = wdata.index_in_block;

q_tau = gf<imtime>({beta, Boson, ntau}, {n_color, n_color});
q_tau() = 0;
q_tau = gf<imtime>({beta, Boson, ntau}, {n_color, n_color});
q_tau() = 0;
q_tau_block = make_block2_gf<imtime>({beta, Boson, ntau}, p.gf_struct);
}

Expand Down Expand Up @@ -68,10 +68,11 @@ namespace measures {
q_tau = mpi::all_reduce(q_tau, c);
q_tau = q_tau / Z; //(beta * Z * q_tau.mesh().delta());

// store the result
for (auto const &c1 : range(n_color)) {
for (auto const &c2 : range(n_color)) {
q_tau_block(block_number[c1], block_number[c2]).data()(range::all, index_in_block[c1], index_in_block[c2]) = q_tau.data()(range::all, c1, c2);
// store the result
for (int c1 : range(n_color)) {
for (int c2 : range(n_color)) {
q_tau_block(block_number[c1], block_number[c2]).data()(range::all, index_in_block[c1], index_in_block[c2]) =
q_tau.data()(range::all, c1, c2);
}
}
results.nn_tau = std::move(q_tau_block);
Expand Down

0 comments on commit ae2206c

Please sign in to comment.