3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 05:43:40 +01:00

Fix make_mesh_fourier_compatible to correct size

The number of points in imaginary time must be at least twice
as big as the number of pionts in matsubara frequencies.
This commit is contained in:
Michel Ferrero 2014-07-02 22:54:14 +02:00
parent fcfcce8d61
commit cbfecdf623

View File

@ -50,13 +50,13 @@ namespace gfs {
gf_keeper<tags::fourier, imtime, matrix_valued, no_tail> const& L); gf_keeper<tags::fourier, imtime, matrix_valued, no_tail> const& L);
template <typename Opt> gf_mesh<imfreq, Opt> make_mesh_fourier_compatible(gf_mesh<imtime, Opt> const& m) { template <typename Opt> gf_mesh<imfreq, Opt> make_mesh_fourier_compatible(gf_mesh<imtime, Opt> const& m) {
int L = m.size() - (m.kind() == full_bins ? 1 : 0); int L = (m.size() - (m.kind() == full_bins ? 1 : 0))/2;
return {m.domain(), L}; return {m.domain(), L};
} }
template <typename Opt> template <typename Opt>
gf_mesh<imtime, Opt> make_mesh_fourier_compatible(gf_mesh<imfreq, Opt> const& m, mesh_kind mk = full_bins) { gf_mesh<imtime, Opt> make_mesh_fourier_compatible(gf_mesh<imfreq, Opt> const& m, mesh_kind mk = full_bins) {
int L = m.size() + (mk == full_bins ? 1 : 0); int L = 2*m.size() + (mk == full_bins ? 1 : 0);
return {m.domain(), L}; return {m.domain(), L};
} }