mirror of
https://github.com/triqs/dft_tools
synced 2024-11-01 19:53:45 +01:00
27 lines
533 B
C++
27 lines
533 B
C++
|
|
||
|
#include <triqs/gfs/block.hpp>
|
||
|
#include <triqs/gfs/imtime.hpp>
|
||
|
#include <triqs/gfs/imfreq.hpp>
|
||
|
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||
|
|
||
|
using namespace triqs::gfs;
|
||
|
|
||
|
int main(int argc, char* argv[]) {
|
||
|
|
||
|
try {
|
||
|
|
||
|
double beta = 10.0;
|
||
|
|
||
|
auto A = make_block_gf<imfreq> ( {"up","down"}, {gf<imfreq>{ {beta, Fermion}, {1,1} },gf<imfreq>{ {beta, Fermion}, {1,1} }});
|
||
|
auto B = A;
|
||
|
auto C = A;
|
||
|
|
||
|
C = A + A * B;
|
||
|
C() = A + A() * B();
|
||
|
|
||
|
TEST( A[0](0) ) ;
|
||
|
}
|
||
|
TRIQS_CATCH_AND_ABORT;
|
||
|
|
||
|
}
|