mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 05:43:40 +01:00
Fixed antiperiodicity property of imtime
- the condition p%2 ==1 was wrong if p<0 (never true!) - added corresponding test (gf_notail) Conflicts: triqs/gfs/imtime.hpp Fixed by O.P. : already fixed in Laura's pull request ...
This commit is contained in:
parent
3437c2dfe9
commit
2d1dec4c3d
@ -32,7 +32,18 @@ int main() {
|
||||
// rebuilding a new gf...
|
||||
auto g3 = make_gf_from_g_and_tail(vw, gw.singularity());
|
||||
// need to test all this....
|
||||
|
||||
|
||||
//test antiperiodicity
|
||||
auto Gt = gf<imtime, scalar_valued, no_tail>{ { beta, Fermion, 1000 }, { } };
|
||||
Gt(tau_) << exp(-tau_);
|
||||
|
||||
TEST(Gt(0.01));
|
||||
TEST(Gt(.5));
|
||||
TEST(Gt(.9));
|
||||
TEST(Gt(-.1));//should be equal to line above
|
||||
|
||||
|
||||
|
||||
}
|
||||
TRIQS_CATCH_AND_ABORT;
|
||||
}
|
||||
|
8
test/triqs/gfs/gf_notail.output
Normal file
8
test/triqs/gfs/gf_notail.output
Normal file
@ -0,0 +1,8 @@
|
||||
(Gt(0.01)) ---> 0.99005
|
||||
|
||||
(Gt(.5)) ---> 0.606531
|
||||
|
||||
(Gt(.9)) ---> 0.40657
|
||||
|
||||
(Gt(-.1)) ---> -0.40657
|
||||
|
@ -84,6 +84,7 @@ namespace gfs {
|
||||
double w;
|
||||
bool in;
|
||||
std::tie(in, n, w) = windowing(m, tau);
|
||||
if (!in) TRIQS_RUNTIME_ERROR << " Evaluation out of bounds";
|
||||
if ((m.domain().statistic == Fermion) && (p % 2 != 0)) {
|
||||
w2 = -w;
|
||||
w1 = w - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user