Skip to content

Commit 9b72665

Browse files
committed
expose k_if_fermion and k_if_boson
1 parent f7b1006 commit 9b72665

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

Diff for: c++/cppdlr/dlr_kernels.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ namespace cppdlr {
3131
}
3232
}
3333

34-
double k_it(double t, double om, double beta) {
35-
return k_it(t, beta * om);
36-
}
34+
double k_it(double t, double om, double beta) { return k_it(t, beta * om); }
3735

3836
double k_it_abs(double t, double om) {
3937

@@ -61,8 +59,6 @@ namespace cppdlr {
6159
return k_if_boson(n, om);
6260
}
6361

64-
std::complex<double> k_if(int n, double om, statistic_t statistic, double beta) {
65-
return beta * k_if(n, beta * om, statistic);
66-
}
67-
62+
std::complex<double> k_if(int n, double om, statistic_t statistic, double beta) { return beta * k_if(n, beta * om, statistic); }
63+
6864
} // namespace cppdlr

Diff for: c++/cppdlr/dlr_kernels.hpp

+30-2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,34 @@ namespace cppdlr {
6868
*/
6969
double k_it_abs(double t, double om);
7070

71+
/**
72+
* @brief Evaluate fermionic analytic continuation kernel in imaginary frequency using
73+
* dimensionless variables (beta = 1)
74+
*
75+
* @param[in] n Imaginary frequency index
76+
* @param[in] om Real frequency value
77+
*
78+
* @return Value K(i nu_n, om) of analytic continuation kernel
79+
*
80+
* \note The definition of the fermionic analytic continuation kernel using dimensionless
81+
* variables is K(i nu_n, om) = 1 / (i nu_n - om) with i nu_n = (2n+1) * i * pi.
82+
*/
83+
std::complex<double> k_if_fermion(int n, double om);
84+
85+
/**
86+
* @brief Evaluate bosonic analytic continuation kernel in imaginary frequency using
87+
* dimensionless variables (beta = 1)
88+
*
89+
* @param[in] n Imaginary frequency index
90+
* @param[in] om Real frequency value
91+
*
92+
* @return Value K(i nu_n, om) of analytic continuation kernel
93+
*
94+
* \note The definition of the bosonic analytic continuation kernel using dimensionless
95+
* variables is K(i nu_n, om) = 1 / (i nu_n - om) with i nu_n = 2n * i * pi.
96+
*/
97+
std::complex<double> k_if_boson(int n, double om);
98+
7199
/**
72100
* @brief Evaluate analytic continuation kernel in imaginary frequency using
73101
* dimensionless variables (beta = 1)
@@ -76,7 +104,7 @@ namespace cppdlr {
76104
* @param[in] om Real frequency value
77105
* @param[in] statistic Particle Statistic: Boson or Fermion
78106
*
79-
* @return Value K(i nu_n,om) of analytic continuation kernel
107+
* @return Value K(i nu_n, om) of analytic continuation kernel
80108
*
81109
* \note The definition of the analytic continuation kernel using dimensionless
82110
* variables is K(i nu_n, om) = 1 / (i nu_n - om) with i nu_n = (2n+1) * i *
@@ -93,7 +121,7 @@ namespace cppdlr {
93121
* @param[in] statistic Particle Statistic: Boson or Fermion
94122
* @param[in] beta Inverse temperature
95123
*
96-
* @return Value K(i nu_n,om) of analytic continuation kernel
124+
* @return Value K(i nu_n, om) of analytic continuation kernel
97125
*
98126
* \note The definition of the analytic continuation kernel at a given inverse
99127
* temperature beta is K(i nu_n, om) = 1 / (i nu_n - om) with i nu_n = (2n+1) *

0 commit comments

Comments
 (0)