2013-07-19 13:28:30 +02:00
|
|
|
#define TRIQS_ARRAYS_ENFORCE_BOUNDCHECK
|
|
|
|
|
|
|
|
#include <triqs/utility/first_include.hpp>
|
|
|
|
#include <iostream>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <fstream>
|
2013-07-29 09:57:07 +02:00
|
|
|
#include <triqs/gfs/gf.hpp>
|
|
|
|
#include <triqs/gfs/two_real_times.hpp>
|
2013-07-19 13:28:30 +02:00
|
|
|
#include <complex>
|
2013-07-28 13:28:19 +02:00
|
|
|
using namespace triqs::gfs;
|
2013-07-19 13:28:30 +02:00
|
|
|
using namespace std;
|
|
|
|
using triqs::arrays::make_shape;
|
|
|
|
|
|
|
|
int main(){
|
|
|
|
|
|
|
|
double dt=0.001;
|
|
|
|
double tmax=0.005;
|
|
|
|
int nt=tmax/dt;
|
|
|
|
auto R= make_gf<two_real_times> (tmax,nt,make_shape(1,1));//results
|
|
|
|
|
2013-07-28 13:47:42 +02:00
|
|
|
for(auto point:R.mesh()) R[point]=0;
|
2013-07-19 13:28:30 +02:00
|
|
|
|
|
|
|
const auto rg = on_mesh(R);
|
|
|
|
R.on_mesh(1,1) = 10;
|
|
|
|
|
|
|
|
std::cout << rg (1,1)<< std::endl ;
|
|
|
|
std::cout << R.on_mesh(1,1)<< std::endl ;
|
|
|
|
std::cout << R(0.001,0.001)<< std::endl ;
|
|
|
|
|
|
|
|
auto R2 = R;
|
|
|
|
|
|
|
|
//on_mesh(R2)(1,1) = on_mesh(R)(1,1) * on_mesh(R)(1,1);
|
|
|
|
on_mesh(R2)(1,1)() = on_mesh(R)(1,1) * on_mesh(R)(1,1);
|
|
|
|
|
|
|
|
std::cout << on_mesh(R2)(1,1)<< std::endl;
|
|
|
|
return 0;
|
|
|
|
};
|