1 #ifndef CNTR_HERM_PSEUDE_DECL_H 2 #define CNTR_HERM_PSEUDE_DECL_H 8 template <
typename T>
class function;
9 template <
typename T>
class herm_matrix;
10 template <
typename T>
class herm_matrix_timestep;
20 template <
typename T>
class herm_pseudo {
22 typedef std::complex<T>
cplx;
26 herm_pseudo(
int nt,
int ntau,
int size1 = 1,
int sig = -1);
27 herm_pseudo(
const herm_pseudo &g);
28 herm_pseudo &operator=(
const herm_pseudo &g);
30 void resize_discard(
int nt,
int ntau,
int size1);
31 void resize_nt(
int nt);
32 void resize(
int nt,
int ntau,
int size1);
36 int element_size(
void)
const {
return element_size_; }
37 int size1(
void)
const {
return size1_; }
38 int size2(
void)
const {
return size2_; }
39 int ntau(
void)
const {
return ntau_; }
40 int nt(
void)
const {
return nt_; }
41 int sig(
void)
const {
return sig_; }
42 void set_sig(
int sig) { sig_ = sig; }
50 inline cplx *lesptr(
int i,
int j);
51 inline cplx *retptr(
int i,
int j);
52 inline cplx *tvptr(
int i,
int j);
53 inline cplx *matptr(
int i);
55 template <
class Matrix>
void get_les(
int i,
int j, Matrix &M);
56 template <
class Matrix>
void get_gtr(
int i,
int j, Matrix &M);
57 template <
class Matrix>
void get_ret(
int i,
int j, Matrix &M);
58 template <
class Matrix>
void get_vt(
int i,
int j, Matrix &M);
59 template <
class Matrix>
void get_tv(
int i,
int j, Matrix &M);
60 template <
class Matrix>
void get_mat(
int i, Matrix &M);
61 template <
class Matrix>
void get_matminus(
int i, Matrix &M);
70 inline void get_matminus(
int i,
cplx &x);
72 template <
class Matrix>
void set_les(
int i,
int j, Matrix &M);
73 template <
class Matrix>
void set_ret(
int i,
int j, Matrix &M);
74 template <
class Matrix>
void set_tv(
int i,
int j, Matrix &M);
75 template <
class Matrix>
void set_mat(
int i, Matrix &M);
76 inline void set_les(
int i,
int j,
cplx x);
77 inline void set_ret(
int i,
int j,
cplx x);
78 inline void set_tv(
int i,
int j,
cplx x);
79 inline void set_mat(
int i,
cplx x);
81 cplx density_matrix(
int i);
82 template <
class Matrix>
void density_matrix(
int tstp, Matrix &M);
84 void print_to_file(
const char *file,
int precision = 16);
85 void read_from_file(
const char *file);
87 #if CNTR_USE_HDF5 == 1 88 void write_to_hdf5(hid_t group_id);
89 void write_to_hdf5(hid_t group_id,
const char *groupname);
90 void write_to_hdf5(
const char *filename,
const char *groupname);
91 void read_from_hdf5(hid_t group_id);
92 void read_from_hdf5(hid_t group_id,
const char *groupname);
93 void read_from_hdf5(
const char *filename,
const char *groupname);
95 void read_from_hdf5(
int nt1, hid_t group_id);
96 void read_from_hdf5(
int nt1, hid_t group_id,
const char *groupname);
97 void read_from_hdf5(
int nt1,
const char *filename,
const char *groupname);
101 void set_timestep_zero(
int tstp);
103 void set_timestep(
int tstp, herm_matrix_timestep<T> ×tep);
104 void get_timestep(
int tstp, herm_matrix_timestep<T> ×tep);
105 void incr_timestep(
int tstp, herm_matrix_timestep<T> ×tep,
cplx alpha = 1.0);
106 void left_multiply(
int tstp,
cplx *f0,
cplx *ft,
108 void right_multiply(
int tstp,
cplx *f0,
cplx *ft,
110 void left_multiply(
int tstp, function<T> &ft, T weight = 1.0);
111 void right_multiply(
int tstp, function<T> &ft, T weight = 1.0);
113 void smul(
int tstp, T alpha);
114 void smul(
int tstp,
cplx alpha);
141 #endif // CNTR_HERM_PSEUDE_DECL_H void get_mat(const int m, std::complex< T > &G_mat, herm_matrix< T > &G, herm_matrix< T > &Gcc)
void get_timestep(int tstp, std::vector< Matrix > &data)
void get_tv(const int i, const int m, std::complex< T > &G_tv, herm_matrix< T > &G, herm_matrix< T > &Gcc)
std::complex< double > cplx
void get_vt(const int m, const int i, std::complex< T > &G_vt, herm_matrix< T > &G, herm_matrix< T > &Gcc)
void get_ret(const int i, const int j, std::complex< T > &G_ret, herm_matrix< T > &G, herm_matrix< T > &Gcc)
void get_les(const int i, const int j, std::complex< T > &G_les, herm_matrix< T > &G, herm_matrix< T > &Gcc)
void get_gtr(const int i, const int j, std::complex< T > &G_gtr, herm_matrix< T > &G, herm_matrix< T > &Gcc)
void set_timestep(int tstp, std::vector< Matrix > &data)