NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library
cntr::herm_matrix< T > Class Template Reference

Class herm_matrix for two-time contour objects \( C(t,t') \) with hermitian symmetry. More...

#include <cntr_convolution_decl.hpp>

Public Types

typedef std::complex< T > cplx
 
typedef T scalar_type
 

Public Member Functions

void Bcast_timestep (int tstp, int root)
  Broadcasts the herm_matrix at a given time step to all tasks. More...
 
void clear (void)
  Sets all values to zero. More...
 
template<class Matrix >
void density_matrix (int tstp, Matrix &M) const
  Returns the density matrix at given time step. More...
 
void get_timestep (int tstp, herm_matrix_timestep< T > &timestep) const
 
void get_timestep (int tstp, herm_matrix< T > &timestep) const
 
 herm_matrix ()
 
 herm_matrix (int nt, int ntau, int size1=1, int sig=-1)
  Initializes the herm_matrix class for a square-matrix two-time contour function. More...
 
 herm_matrix (int nt, int ntau, int size1, int size2, int sig)
  Initializes the herm_matrix class for a general matrix two-time contour function. More...
 
 herm_matrix (const herm_matrix &g)
  Initializes the herm_matrix class with the same layout as a given herm_matrix. More...
 
 herm_matrix (herm_matrix &&g) noexcept
 
void incr (herm_matrix< T > &g, cplx alpha)
  Adds a herm_matrix with given weight to the herm_matrix at all time steps. More...
 
void incr (herm_matrix< T > &g)
  Adds a herm_matrix 'g' to the herm_matrix at all time steps. More...
 
void incr_timestep (int tstp, herm_matrix_timestep< T > &timestep, cplx alpha)
  Adds a herm_matrix_timestep with given weight to the herm_matrix. More...
 
void incr_timestep (int tstp, herm_matrix_timestep< T > &timestep)
  Adds a herm_matrix_timestep with given weight to the herm_matrix. More...
 
void incr_timestep (int tstp, herm_matrix< T > &g, cplx alpha)
  Adds a herm_matrix with given weight to the herm_matrix at given time step. More...
 
void incr_timestep (int tstp, herm_matrix< T > &g)
  Adds a herm_matrix with given weight to the herm_matrix at given time step. More...
 
void left_multiply (int tstp, function< T > &ft, T weight=1.0)
  Left-multiplies the herm_matrix with contour function. Preferred interface. More...
 
void left_multiply_hermconj (int tstp, function< T > &ft, T weight=1.0)
  Left-multiplies the herm_matrix with the hermitian conjugate of a contour function. More...
 
int nt (void) const
 
int ntau (void) const
 
herm_matrixoperator= (const herm_matrix &g)
 
herm_matrixoperator= (herm_matrix &&g) noexcept
 
void print_to_file (const char *file, int precision=16) const
  Saves the herm_matrix to file in text format. More...
 
void read_from_file (const char *file)
  Reads the herm_matrix from file in text format. More...
 
void read_from_file (int nt1, const char *file)
  Reads the herm_matrix up to a given number of time steps from file in text format. More...
 
void read_from_hdf5 (hid_t group_id)
  Reads herm_matrix from a given HDF5 group handle. More...
 
void read_from_hdf5 (hid_t group_id, const char *groupname)
  Reads herm_matrix from a given HDF5 group handle and given group name. More...
 
void read_from_hdf5 (const char *filename, const char *groupname)
  Reads herm_matrix from a given HDF5 file and given group name. More...
 
void read_from_hdf5 (int nt1, hid_t group_id)
  Reads the herm_matrix up to a given number of time steps from an HDF5 group. More...
 
void read_from_hdf5 (int nt1, hid_t group_id, const char *groupname)
  Reads the herm_matrix up to a given number of time steps from an HDF5 group. More...
 
void read_from_hdf5 (int nt1, const char *filename, const char *groupname)
  Reads the herm_matrix up to a given number of time steps from an HDF5 file. More...
 
void Recv_timestep (int tstp, int root, int tag)
  Recevies the herm_matrix at a given time step from a specific task. More...
 
void Reduce_timestep (int tstp, int root)
  MPI reduce for the herm_matrix at a given time step. More...
 
void resize (int nt, int ntau, int size1)
  Resizes herm_matrix object with respect to the number of time points nt, points on the Matsubara branch ntau or the matrix size size1. More...
 
void resize_discard (int nt, int ntau, int size1)
  Discards the herm_matrix object and resize with respect to the number of time points nt, points on the Matsubara branch ntau and the square-matrix size size1. More...
 
void resize_nt (int nt)
  Resizes herm_matrix object with respect to the number of time points nt. Internal routine; see top-level interface resize. More...
 
void right_multiply (int tstp, function< T > &ft, T weight=1.0)
  Right-multiplies the herm_matrix with contour function. Preferred interface. More...
 
void right_multiply_hermconj (int tstp, function< T > &ft, T weight=1.0)
  Right-multiplies the herm_matrix with the hermitian conjugate of a contour function. More...
 
void Send_timestep (int tstp, int dest, int tag)
  Sends the herm_matrix at a given time step to a specific task. More...
 
void set_matrixelement (int tstp, int i1, int i2, herm_matrix_timestep< T > &timestep)
  Sets given matrix elements of all components at time step tstp to the components of a given herm_matrix_timestep of a scaler type. More...
 
void set_matrixelement (int tstp, int i1, int i2, herm_matrix< T > &g)
  Sets given matrix elements of all components at time step tstp to the components of a given herm_matrix of scaler type. More...
 
void set_matrixelement (int tstp, int i1, int i2, herm_matrix_timestep< T > &g, int j1, int j2)
  Sets given matrix elements of all components at time step tstp to given matrix elements of the corresponding components of a given herm_matrix_timestep of matrix type. More...
 
void set_matrixelement (int tstp, int i1, int i2, herm_matrix< T > &g, int j1, int j2)
  Sets given matrix elements of all components at time step tstp to given matrix elements the components of a given herm_matrix of matrix type. More...
 
void set_matrixelement (int i1, int i2, herm_matrix< T > &g)
  Sets given matrix elements of all components to the for all the time components of a given herm_matrix of scaler type for all the time. More...
 
void set_matrixelement (int i1, int i2, herm_matrix< T > &g, int j1, int j2)
  Sets given matrix elements of all components to given matrix elements of the correponding components of a given herm_matrix of matrix type for all the time. More...
 
void set_sig (int sig)
 
void set_submatrix (std::vector< int > &i1, std::vector< int > &i2, herm_matrix< T > &g, std::vector< int > &j1, std::vector< int > &j2)
  Sets a (sub-) matrix of this contour object at all time steps to a (sub-) matrix of a given herm_matrix. More...
 
void set_submatrix (int tstp, std::vector< int > &i1, std::vector< int > &i2, herm_matrix< T > &g, std::vector< int > &j1, std::vector< int > &j2)
  Sets a (sub-) matrix of this contour object at a given time step to a (sub-) matrix of a given herm_matrix. More...
 
void set_timestep (int tstp, herm_matrix &g1)
  Sets all components at time step tstp to the components of a given herm_matrix. More...
 
void set_timestep (int tstp, herm_matrix_timestep< T > &timestep)
  Sets all components at time step tstp to the components of a given herm_matrix_timestep. More...
 
void set_timestep_zero (int tstp)
  Sets all components at time step tstp to zero. More...
 
int sig (void) const
 
int size1 (void) const
 
int size2 (void) const
 
void smul (int tstp, T weight)
  Multiplies all component of the herm_matrix with a real scalar. More...
 
void smul (int tstp, cplx weight)
  Multiplies all component of the herm_matrix with a complex scalar. More...
 
void write_to_hdf5 (hid_t group_id)
  Stores herm_matrix to a given group in HDF5 format. More...
 
void write_to_hdf5 (hid_t group_id, const char *groupname)
  Stores herm_matrix to a given group in HDF5 format. More...
 
void write_to_hdf5 (const char *filename, const char *groupname)
  Stores herm_matrix to a given file in HDF5 format. More...
 
void write_to_hdf5_slices (hid_t group_id, int dt)
  Stores time slices of herm_matrix with a given interval to a HDF5 group handle. More...
 
void write_to_hdf5_slices (hid_t group_id, const char *groupname, int dt)
  Stores time slices of herm_matrix with a given interval to a HDF5 group handle and group name. More...
 
void write_to_hdf5_slices (const char *filename, const char *groupname, int dt)
  Stores time slices of herm_matrix with a given interval to a HDF5 file under a given and group name. More...
 
void write_to_hdf5_tavtrel (hid_t group_id, int dt)
  Stores greater and lesser components of herm_matrix average-relative time representation to a given HDF5 group handle. More...
 
void write_to_hdf5_tavtrel (hid_t group_id, const char *groupname, int dt)
  Stores greater and lesser components of herm_matrix average-relative time representation to a given HDF5 group handle and group name. More...
 
void write_to_hdf5_tavtrel (const char *filename, const char *groupname, int dt)
  Stores greater and lesser components of herm_matrix average-relative time representation to a given HDF5 file under given group name. More...
 
 ~herm_matrix ()
 

Detailed Description

template<typename T>
class cntr::herm_matrix< T >

Class herm_matrix for two-time contour objects \( C(t,t') \) with hermitian symmetry.

Purpose


This class contains the data structures for representing bosonic ( \(\eta = +1 \)) or fermionic ( \(\eta = -1 \)) or two-time contour functions \( C(t,t') \) and provides a number of tools to perform operations on such functions. The class herm_matrix stores the non-redundant Keldysh components

  • Matsubara component \( C^\mathrm{M}(\tau_k) \) for i=0,...,nt,
  • retarded component \( C^\mathrm{R}(t_i,t_j) \) for i=0,...,nt, j=0,...,i ,
  • lesser component \( C^<(t_j,t_i) \) for i=0,...,nt, j=0,...,i ,
  • left-mixing component \( C^\rceil(t_i,\tau_k) \) for i=0,...,nt, i=0,...,nt.

All other Keldysh components can be expressed by the hermitian symmetries

\begin{align*} C^<(t_i,t_j) &= - [C^<(t_j,t_i)]^\ddagger \ , \\ C^\mathrm{R}(t_i,t_j) &= [C^\mathrm{A}(t_j,t_i)]^\ddagger \ , \\ C^\lceil(\tau_k,t_i) &= -\eta [C^\rceil(t_i,\beta - \tau_k)]^\ddagger \ . \end{align*}

The contour function \( C(t,t') \) can be of scalar type or matrix-valued. Square-matrix-type contour functions are fully supported, while non-square- matrix contour functions are under development.

If nt = 0, only the Matsubara component is stored.

Definition at line 10 of file cntr_convolution_decl.hpp.


The documentation for this class was generated from the following files: