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

gf : imfreq : clean evaluator on int

- evaluator on int was not using the same algorithm
as matsubara_freq, which can be surprising...
This commit is contained in:
Olivier Parcollet 2014-03-04 22:11:36 +01:00
parent 05c717e70f
commit 2f2044e74b

View File

@ -69,8 +69,6 @@ namespace gfs {
// handle the case where the matsu. freq is out of grid...
template <typename Target, typename Opt> struct evaluator<imfreq, Target, Opt> {
static constexpr int arity = 1;
// TO BE REMOVED
template <typename G> auto operator()(G const *g, int n) const DECL_AND_RETURN((*g)[n]);
private:
template <typename G> int sh(G const * g) const { return (g->mesh().domain().statistic == Fermion ? 1 : 0);}
@ -144,6 +142,9 @@ namespace gfs {
return _call_impl(g, f, Target{}, std::integral_constant<bool, std::is_same<Opt, no_tail>::value>{});
}
// int -> replace by matsubara_freq
template <typename G> auto operator()(G const *g, int n) const DECL_AND_RETURN((*g)(matsubara_freq(n,g->mesh().domain().beta,g->mesh().domain().statistic)));
#ifdef __clang__
// to generate a clearer error message ? . Only ok on clang ?
template <int n> struct error {