3
0
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:
tayral 2014-01-13 16:14:14 +00:00 committed by Olivier Parcollet
parent 3437c2dfe9
commit 2d1dec4c3d
3 changed files with 21 additions and 1 deletions

View File

@ -33,6 +33,17 @@ int main() {
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;
}

View File

@ -0,0 +1,8 @@
(Gt(0.01)) ---> 0.99005
(Gt(.5)) ---> 0.606531
(Gt(.9)) ---> 0.40657
(Gt(-.1)) ---> -0.40657

View File

@ -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;