Template Struct HS_nondiagonal_operator

Inheritance Relationships

Base Type

Derived Types

Struct Documentation

template<typename HS_field>
struct HS_nondiagonal_operator : public HS_Hermitian_operator

Represents a non-diagonal Hermitian operator in a sector of the Hilbert space.

Subclassed by HS_Heisenberg_operator< HS_field >, HS_Hund_operator< HS_field >, HS_anomalous_operator< HS_field >, HS_general_interaction_operator< HS_field >, HS_one_body_operator< HS_field >

Public Functions

HS_nondiagonal_operator(shared_ptr<model> _the_model, const string &_name, sector _sec)

Constructor for an operator acting in a given sector.

~HS_nondiagonal_operator()

destructor

virtual void multiply_add(const vector<double> &x, vector<double> &y, double z)

Multiplies by the operator.

Parameters:
  • y – output vector

  • x – input vector

  • z – multiplies the operator

virtual void multiply_add(const vector<Complex> &x, vector<Complex> &y, double z)
virtual void dense_form(matrix<Complex> &h, double z)
virtual void dense_form(matrix<double> &h, double z)

produces a dense form of the operator

virtual void CSR_map(map<index_pair, double> &elem, vector<double> &diag, double z)

fills a map, in order to construct the CSR form of the Hamiltonian

virtual void CSR_map(map<index_pair, Complex> &elem, vector<double> &diag, double z)
virtual void diag(vector<double> &Y, double z)

populates an array Y with the diagonal elements of the operator useful for prepraring the Hamiltonian for the Davidson method

virtual void Triplet_COO_map(vector<matrix_element<double>> &E, double z, bool sym_store)

populates a vector of matrix_element to build the Hamiltonian

virtual void Triplet_COO_map(vector<matrix_element<Complex>> &E, double z, bool sym_store)

populates a vector of matrix_element to build the Hamiltonian

void insert(uint32_t I, uint32_t J, HS_field z)

inserts an element

void sort_elements()

Public Members

shared_ptr<ED_mixed_basis> B

basis of the sector

vector<pair<HS_field, vector<pair<uint32_t, uint32_t>>>> v
vector<diagonal_matrix_element> diag_elem

elements outside of the diagonal

list of diagonal elements