Partial evaluation
Multivariable Green functions can be both partially evalued.
Partial evaluation
Purpose :
Having a function (x,y) -> f(x,y), fix x = x0 in order to obtain a function of y only.
Synopsis
If g is a multivar function, and
auto _ = var_t{};
g[w][_] // is the gf partially evaluated for the first mesh.
When a Green function is evaluated with [][], and there is at least once var_t as an argument, the result is a view of the partially evaluated gf with :
a mesh corresponding of the mesh components of the _ variables.
the tag type is computed accordingly
the target is unchanged.
the data is a sliced view of the original function
singularity : in the case where the singularity is non trivial, is it also partially evaluated (in practice, G(k,omega). EXPLAIN).
Example :
#include <triqs/gfs.hpp>
#include <triqs/mesh.hpp>
using namespace triqs::gfs;
using namespace triqs;
using nda::clef::placeholder;
int main() {
double beta = 1, tmin = 0, tmax = 1.0;
int n_re_time = 5, n_im_time = 10;
using g_t_tau_s = gf<prod<retime, imtime>, scalar_valued>;
// a scalar valued function
auto g = g_t_tau_s{{{tmin, tmax, n_re_time}, {beta, Fermion, n_im_time}}};
auto _ = all_t{}; // a dedicated placeholder for partial evaluation
auto g_sliced = g[3, _]; // 3 is the index of the point
// or if we loop over the first component of the mesh of g
for (auto w : std::get<0>(g.mesh())) {
std::cout << g[w, _] << std::endl; // or do anything with it ...
}
}
this_t
this_t
this_t
this_t
this_t