3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-01 03:33:50 +01:00
dft_tools/test/triqs/gfs/gf3.cpp
Olivier Parcollet 9583afc671 Fix #98
- A silly copy paste error : the operator - for matrix expression was
  defined twice.
- second error : a typo in unary method.
2014-07-02 18:22:25 +02:00

34 lines
727 B
C++

#define TRIQS_ARRAYS_ENFORCE_BOUNDCHECK
#include <triqs/gfs.hpp>
using namespace triqs::gfs;
using namespace triqs::arrays;
namespace h5 = triqs::h5;
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
#include <triqs/gfs/local/functions.hpp>
// example
//template<typename T> using block_gf = gf<block_index, gf<T>>;
// block_gf<imtime> ...
// but not on gcc 4.6 !
//
int main() {
try {
double beta =1;
auto G = gf<imfreq>{ {beta, Fermion}, {2,2} };
auto Gc = gf<imfreq>{ {beta, Fermion}, {2,2} };
auto G3 = gf<imfreq>{ {beta, Fermion}, {2,2} };
triqs::clef::placeholder<0> om_;
G(om_) << om_ + 2 - G3(om_);
G = -G3;
}
TRIQS_CATCH_AND_ABORT;
}