mirror of
https://github.com/triqs/dft_tools
synced 2024-12-24 13:23:37 +01:00
Update tests related to Fourier transforms
This commit is contained in:
parent
cbfecdf623
commit
58659415ad
@ -10,7 +10,7 @@ int main() {
|
||||
auto G = gf<imfreq> {{beta, Fermion}, {2,2}};
|
||||
auto Gc = G;
|
||||
auto G3 = G;
|
||||
auto Gt = gf<imtime> {{beta, Fermion,100}, {2,2}};
|
||||
auto Gt = gf<imtime> {{beta, Fermion, 3000}, {2,2}};
|
||||
|
||||
auto gt = make_gf_from_inverse_fourier(G);
|
||||
auto gw = make_gf_from_fourier(gt);
|
||||
|
@ -13,11 +13,11 @@ int main() {
|
||||
|
||||
// construct
|
||||
auto gw_n = gf<imfreq, matrix_valued, no_tail>{{beta, Fermion}, {2, 2}};
|
||||
auto gt_n = gf<imtime, matrix_valued, no_tail>{{beta, Fermion, 100}, {2, 2}};
|
||||
auto gt_n = gf<imtime, matrix_valued, no_tail>{{beta, Fermion, 10000}, {2, 2}};
|
||||
|
||||
// make a view from a g with a tail
|
||||
auto gw = gf<imfreq, matrix_valued>{{beta, Fermion}, {2, 2}};
|
||||
auto gt = gf<imtime, matrix_valued>{gf_mesh<imtime>{beta, Fermion, 100}, {2, 2}};
|
||||
auto gt = gf<imtime, matrix_valued>{gf_mesh<imtime>{beta, Fermion, 10000}, {2, 2}};
|
||||
|
||||
auto vw = make_gf_view_without_tail(gw);
|
||||
auto vt = make_gf_view_without_tail(gt);
|
||||
@ -36,7 +36,7 @@ int main() {
|
||||
// need to test all this....
|
||||
|
||||
//test antiperiodicity
|
||||
auto Gt = gf<imtime, scalar_valued, no_tail>{ { beta, Fermion, 1000 }, { } };
|
||||
auto Gt = gf<imtime, scalar_valued, no_tail>{ { beta, Fermion, 10000 }, { } };
|
||||
Gt(tau_) << exp(-tau_);
|
||||
|
||||
TEST(Gt(0.01));
|
||||
|
@ -6,9 +6,9 @@
|
||||
|
||||
(Gt(-.1)) ---> -0.40657
|
||||
|
||||
(gt_with_full_tail(.5)) ---> ((0.5 *
|
||||
[[-0.44347,0]
|
||||
[0,-0.44347]]) + (0.5 *
|
||||
(gt_with_full_tail(.5)) ---> ((1 *
|
||||
[[-0.443565,0]
|
||||
[0,-0.443565]]) + (0 *
|
||||
[[-0.443038,0]
|
||||
[0,-0.443038]]))
|
||||
|
||||
@ -44,9 +44,9 @@
|
||||
[[(0,0),(0,0)]
|
||||
[(0,0),(0,0)]]
|
||||
|
||||
(gt_tail_with_one_term(.5)) ---> ((0.5 *
|
||||
[[-0.443626,0]
|
||||
[0,-0.443626]]) + (0.5 *
|
||||
(gt_tail_with_one_term(.5)) ---> ((1 *
|
||||
[[-0.443409,0]
|
||||
[0,-0.443409]]) + (0 *
|
||||
[[-0.443193,0]
|
||||
[0,-0.443193]]))
|
||||
|
||||
|
@ -19,7 +19,7 @@ int main() {
|
||||
Gw1(om_) << 1/(om_-E);
|
||||
h5_write(file, "Gw1", Gw1); // the original lorentzian
|
||||
|
||||
auto Gt1 = gf<imtime> {{beta, Fermion, N}, {1,1}};
|
||||
auto Gt1 = gf<imtime> {{beta, Fermion, 2*N}, {1,1}};
|
||||
Gt1() = inverse_fourier(Gw1);
|
||||
h5_write(file, "Gt1", Gt1); // the lorentzian TF : lorentzian_inverse
|
||||
|
||||
|
@ -54,7 +54,7 @@ void test_1(){
|
||||
|
||||
double beta=10;
|
||||
/* ----- Fourier ----- */
|
||||
auto Gt = gf<imtime> {{beta, Fermion, 100,full_bins}, {1,1}};
|
||||
auto Gt = gf<imtime> {{beta, Fermion, 201, full_bins}, {1,1}};
|
||||
auto Gw = gf<imfreq> {{beta, Fermion, 100}, {1,1}};
|
||||
Gw.singularity()(1) = 1;
|
||||
|
||||
|
10
test/triqs/gfs/test_gf_triqs.output
Normal file
10
test/triqs/gfs/test_gf_triqs.output
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user