TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
pade.hpp
Go to the documentation of this file.
1// Copyright (c) 2013-2018 Commissariat à l'énergie atomique et aux énergies alternatives (CEA)
2// Copyright (c) 2013-2018 Centre national de la recherche scientifique (CNRS)
3// Copyright (c) 2018-2023 Simons Foundation
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You may obtain a copy of the License at
16// https://www.gnu.org/licenses/gpl-3.0.txt
17//
18// Authors: Michel Ferrero, Olivier Parcollet, Nils Wentzell
19
24
25#pragma once
26
28#include "../gf/gf_view.hpp"
29#include "../gf/targets.hpp"
31#include "../../mesh/imfreq.hpp"
32#include "../../mesh/refreq.hpp"
34
35#include <tuple>
36
37namespace triqs::gfs {
38
43
57
71 template <MemoryGf<mesh::refreq> GR, MemoryGf<mesh::imfreq> GW>
72 void pade(GR &gr, GW const &gw, int n_points, double freq_offset)
73 requires(GR::target_rank > 0 && GW::target_rank > 0)
74 {
75 EXPECTS(gr.target_shape() == gw.target_shape());
76 for (auto argtpl : gr.target_indices()) {
77 std::apply([&](auto &&...args) { pade(slice_target_to_scalar(gr, args...), slice_target_to_scalar(gw, args...), n_points, freq_offset); },
78 argtpl);
79 }
80 }
81
83
84} // namespace triqs::gfs
A read-only, non-owning view of a Green's function.
A mutable, non-owning view of a Green's function.
Definition gf_view.hpp:48
Provides tail fitting, slicing, inversion, reality and matrix-multiplication functions for Green's fu...
Provides the triqs::gfs::gf_const_view container, a read-only non-owning view of a Green's function.
Provides a mutable non-owning view of a Green's function.
void pade(gf_view< mesh::refreq, scalar_valued > gr, gf_const_view< mesh::imfreq, scalar_valued > gw, int n_points, double freq_offset)
Analytically continue a scalar Matsubara Green's function to the real-frequency axis via Pade.
Definition pade.cpp:34
auto slice_target_to_scalar(G &&g, Args &&...1)
Slice the target of a matrix-valued Green's function down to a scalar-valued one.
Common macros used in TRIQS.
Provides a mesh type on the imaginary frequency axis.
Provides a mesh type on the real frequency axis.
Provides the target types that fix the value stored at each mesh point of a Green's function.