Skip to content

Commit b20d6b3

Browse files
committed
[doc] documentation and cleanup
1 parent b048635 commit b20d6b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+874
-127
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
[![build](https://github.com/TRIQS/cthyb/workflows/build/badge.svg)](https://github.com/TRIQS/cthyb/actions?query=workflow%3Abuild)
1+
[![build](https://github.com/TRIQS/ctseg_J/workflows/build/badge.svg)](https://github.com/TRIQS/ctseg_J/actions?query=workflow%3Abuild)
22

3-
## TRIQS segment picture impurity solver with spin-spin interactions (CTSEG-J)
3+
## TRIQS segment picture solver with spin-spin interactions (CTSEG-J)
44

5-
Copyright (C) 2024, N. Kavokine, H. Lu and O. Parcollet \
5+
Copyright (C) 2024, N. Kavokine, H. Lu, N. Wentzell and O. Parcollet.
66

77
### Documentation
88

9-
For documentation and installation instructions see [triqs.github.io/ctseg-j](https://triqs.github.io/ctseg-j).
9+
For documentation and installation instructions see [triqs.github.io/ctseg-J](https://triqs.github.io/ctseg-J).
1010

1111
### License
1212

c++/triqs_ctseg/README.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

c++/triqs_ctseg/configuration.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ struct segment_t {
4141
static segment_t full_line() { return {tau_t::beta(), tau_t::zero()}; }
4242
};
4343

44-
// operator descriptor: time, color, is_cdag[creation/annihilation]
45-
struct colored_ops_t {
46-
tau_t tau;
47-
int color;
48-
bool is_cdag;
49-
};
50-
5144
// simple alias
5245
using vec_seg_iter_t = std::vector<segment_t>::const_iterator;
5346

@@ -59,6 +52,14 @@ struct jperp_line_t {
5952
tau_t tau_Sminus, tau_Splus; // times of the S-, S+
6053
};
6154

55+
// ----------------- Operator -------------------
56+
// (used by measure state_hist)
57+
struct colored_ops_t {
58+
tau_t tau;
59+
int color;
60+
bool is_cdag;
61+
};
62+
6263
// --------------- Configuration ----------------------
6364
// The configuration is a list of of segments for each color,
6465
// and a list of J_perp lines.

c++/triqs_ctseg/dets.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
using namespace triqs::gfs;
88
using namespace triqs::mesh;
99

10-
// ----------- dets ----------------------------------------
11-
12-
/// A lambda to adapt the Delta function for the call of the det.
10+
/// A lambda to adapt Delta(tau) for the call by det_manip.
1311
struct delta_block_adaptor {
14-
gf<imtime, matrix_real_valued> delta; // make a copy. Needed in the real case anyway.
12+
gf<imtime, matrix_real_valued> delta;
1513

1614
double operator()(std::pair<tau_t, int> const &x, std::pair<tau_t, int> const &y) const {
1715
double res = delta(double(x.first - y.first))(x.second, y.second);
18-
return (x.first >= y.first ? res : -res); // x,y first are time_pt, wrapping is automatic in
16+
return (x.first >= y.first ? res : -res); // x,y first are tau_t, wrapping is automatic in
1917
// the - operation, but need to compute the sign
2018
}
2119
};

c++/triqs_ctseg/measures/nn_static.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include "./nn_static.hpp"
22
#include "../logs.hpp"
33

4-
// TODO : add non regression test.
5-
64
namespace measures {
75

86
nn_static::nn_static(params_t const &p, work_data_t const &wdata, configuration_t const &config, results_t &results)
@@ -21,10 +19,6 @@ namespace measures {
2119

2220
Z += s;
2321

24-
// FIXME : this is a simple O(n_color^2) algo
25-
// If profiling says it is too slow,
26-
// then improve by progressing on the 2 seglists in //
27-
// but it is a bit more complex to write
2822
for (int a = 0; a < n_color; ++a)
2923
for (int b = 0; b < n_color; ++b) {
3024
for (auto const &sa : config.seglists[a]) {

c++/triqs_ctseg/measures/nn_static.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "../configuration.hpp"
33
#include "../work_data.hpp"
44
#include "../results.hpp"
5-
//#include "../precompute_fprefactor.hpp"
65

76
namespace measures {
87

c++/triqs_ctseg/measures/perturbation_order_histo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
namespace measures {
55

6-
perturbation_order_histo::perturbation_order_histo(params_t const &, work_data_t const &wdata,
6+
perturbation_order_histo::perturbation_order_histo(params_t const &p, work_data_t const &wdata,
77
configuration_t const &config, results_t &results)
88
: wdata{wdata}, config{config}, results{results} {
99

10-
histo_delta = triqs::stat::histogram{0, 1000}; // FIXME : put as params ?
11-
histo_Jperp = triqs::stat::histogram{0, 1000}; // FIXME : put as params ?
10+
histo_delta = triqs::stat::histogram{0, p.histogram_max_order};
11+
histo_Jperp = triqs::stat::histogram{0, p.histogram_max_order};
1212
}
1313

1414
// -------------------------------------

c++/triqs_ctseg/measures/state_hist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace measures {
1414

1515
void state_hist::accumulate(double s) {
1616

17-
LOG("\n =================== MEASURE <state histogram> ================ \n");
17+
LOG("\n =================== MEASURE STATE HISTOGRAM ================ \n");
1818

1919
/// Measure the state histogram
2020
/**

c++/triqs_ctseg/moves/README.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

c++/triqs_ctseg/params.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ void h5_write(h5::group h5group, std::string subgroup_name, solve_params_t const
2929
h5::group grp = subgroup_name.empty() ? h5group : h5group.create_group(subgroup_name);
3030

3131
h5_write(grp, "h_int", c.h_int);
32+
h5_write(grp, "hartree_shift", c.hartree_shift);
3233
h5_write(grp, "n_cycles", c.n_cycles);
3334
h5_write(grp, "length_cycle", c.length_cycle);
3435
h5_write(grp, "n_warmup_cycles", c.n_warmup_cycles);
@@ -55,12 +56,12 @@ void h5_write(h5::group h5group, std::string subgroup_name, solve_params_t const
5556
h5_write(grp, "measure_nnt", c.measure_nnt);
5657
h5_write(grp, "measure_sperpt", c.measure_sperpt);
5758
h5_write(grp, "measure_statehist", c.measure_statehist);
58-
h5_write(grp, "hartree_shift", c.hartree_shift);
5959
h5_write(grp, "det_init_size", c.det_init_size);
6060
h5_write(grp, "det_n_operations_before_check", c.det_n_operations_before_check);
6161
h5_write(grp, "det_precision_warning", c.det_precision_warning);
6262
h5_write(grp, "det_precision_error", c.det_precision_error);
6363
h5_write(grp, "det_singular_threshold", c.det_singular_threshold);
64+
h5_write(grp, "histogram_max_order", c.histogram_max_order);
6465

6566
}
6667

@@ -71,6 +72,7 @@ void h5_read(h5::group h5group, std::string subgroup_name, solve_params_t &c) {
7172
h5::group grp = subgroup_name.empty() ? h5group : h5group.open_group(subgroup_name);
7273

7374
h5_read(grp, "h_int", c.h_int);
75+
h5_read(grp, "hartree_shift", c.hartree_shift);
7476
h5_read(grp, "n_cycles", c.n_cycles);
7577
h5_read(grp, "length_cycle", c.length_cycle);
7678
h5_read(grp, "n_warmup_cycles", c.n_warmup_cycles);
@@ -97,12 +99,12 @@ void h5_read(h5::group h5group, std::string subgroup_name, solve_params_t &c) {
9799
h5_read(grp, "measure_nnt", c.measure_nnt);
98100
h5_read(grp, "measure_sperpt", c.measure_sperpt);
99101
h5_read(grp, "measure_statehist", c.measure_statehist);
100-
h5_read(grp, "hartree_shift", c.hartree_shift);
101102
h5_read(grp, "det_init_size", c.det_init_size);
102103
h5_read(grp, "det_n_operations_before_check", c.det_n_operations_before_check);
103104
h5_read(grp, "det_precision_warning", c.det_precision_warning);
104105
h5_read(grp, "det_precision_error", c.det_precision_error);
105106
h5_read(grp, "det_singular_threshold", c.det_singular_threshold);
107+
h5_read(grp, "histogram_max_order", c.histogram_max_order);
106108

107109
}
108110

0 commit comments

Comments
 (0)