3
0
mirror of https://github.com/triqs/dft_tools synced 2025-01-03 18:16:03 +01:00
dft_tools/doc/reference/c++/gf/cookbook/real.rst

21 lines
517 B
ReStructuredText
Raw Normal View History

Create a real frequency Green function
--------------------------------------
.. compileblock::
#include <triqs/arrays.hpp>
2013-08-22 16:55:51 +02:00
#include <triqs/gfs/refreq.hpp>
2013-08-22 16:55:51 +02:00
using triqs::gfs::make_gf;
using triqs::gfs::refreq;
int main() {
double wmin=0;
double wmax=10;
size_t n_freq=5;
//we want a Green function whose values are 2*2 matrices of complex numbers
auto shape = triqs::arrays::make_shape(2,2);
auto GF=make_gf<refreq>(wmin, wmax, n_freq, shape);
};