Template Struct Q_matrix

Struct Documentation

template<typename HilbertField>
struct Q_matrix

Used to store the Lehman representation of a part of the Green function (a given symmetry block)

Public Functions

Q_matrix()

default constructor

Q_matrix(size_t _L, size_t _M)

constructor from sizes

Q_matrix(const Q_matrix<HilbertField> &q)

copy constructor

Q_matrix(const vector<double> &_e, const matrix<HilbertField> &_v)

constructor from arrays

Q_matrix<HilbertField> &operator=(const Q_matrix<HilbertField> &q)
void append(Q_matrix &q)

Appends to the qmatrix another one (increasing the number of columns for the same number of rows)

Parameters:

q – q_matrix to append

void check_norm(double threshold, double norm = 1.0)

Checks the normalization.

Parameters:
  • threshold – limit under which a normalization violation is signaled

  • norm – expected norm of the Q matrix (1.0 by default)

void Green_function(const Complex &z, matrix<Complex> &G)

partial Green function evaluation

Parameters:
  • z – complex frequency

  • G[out] Green function (adds to previous value)

void integrated_Green_function(matrix<Complex> &G)

frequency-integrated Green function

Parameters:

G[out] integrated Green function (adds to previous value)

void streamline(bool verb = false)

Eliminates the small contributions from the Q matrix.

matrix<HilbertField> streamlineQ(const matrix<HilbertField> &Q, double threshold)

From Q^dagger Q, eliminates the small contributions and returns a new Q with fewer columns.

void write_hdf5(H5::Group &grp) const

Writes a Q_matrix to an HDF5 group.

Layout: attributes “L”,”M”; dataset “e”; sub-group “v” (via h5_write_mat).

void read_hdf5(H5::Group &grp)

Reads a Q_matrix from an HDF5 group written by write_hdf5.

Public Members

size_t L

number of orbital indices (number of rows)

size_t M

number of eigenvalues (number of columns)

vector<double> e

eigenvalues

matrix<HilbertField> v

matrix itself