3
0
mirror of https://github.com/triqs/dft_tools synced 2025-01-11 21:48:22 +01:00

gf: inverse for gf_view and gf

- correction
This commit is contained in:
Olivier Parcollet 2014-06-13 17:58:05 +02:00
parent 0727bddeee
commit 33b120948d

View File

@ -676,12 +676,17 @@ namespace gfs {
g.singularity() = inverse(g.singularity()); g.singularity() = inverse(g.singularity());
} }
template <typename Variable, typename Opt> gf<Variable, matrix_valued, Opt> inverse(gf_view<Variable, matrix_valued, Opt> g) { template <typename Variable, typename Opt> gf<Variable, matrix_valued, Opt> inverse(gf<Variable, matrix_valued, Opt> const & g) {
auto res = gf<Variable, matrix_valued, Opt>(g); auto res = g;
invert_in_place(res); gf_view<Variable, matrix_valued, Opt> v = res;
invert_in_place(v);
return res; return res;
} }
template <typename Variable, typename Opt, bool B> gf<Variable, matrix_valued, Opt> inverse(gf_view<Variable, matrix_valued, Opt, B> g) {
return inverse(gf<Variable, matrix_valued, Opt>(g));
}
// ---- transpose : a new gf // ---- transpose : a new gf
template <typename Variable, typename Opt> template <typename Variable, typename Opt>