Greens-code
A modular quantum transport code
Public Member Functions | Static Public Member Functions | List of all members
orbital_dropper_Matrix Class Reference

Simulate a larger square matrix and ignore accesses to given rows and columns. More...

#include <matrix.hpp>

Inheritance diagram for orbital_dropper_Matrix:
Inheritance graph
[legend]
Collaboration diagram for orbital_dropper_Matrix:
Collaboration graph
[legend]

Public Member Functions

 orbital_dropper_Matrix (Matrix &t, std::vector< int > orbitals_to_drop)
 
- Public Member Functions inherited from Matrix
void assert_size (row r, column c)
 assert that the Matrix has a minimum number of rows and columns, if not try to resize
 
void assert_size (row r, column c) const
 assert that the Matrix has a minimum number of rows and columns, if not throw an exception
 
void Insert (row r, column c, complex v)
 Insert an element at a given position (overwritten if already there)
 
void Add (row r, column c, complex v)
 Add an element at a given position.
 
complex Get (row r, column c) const
 Obtain an element at a given position.
 
row nrows () const
 Number of rows.
 
size_t num_of_rows () const
 
column ncols () const
 Number of Columns.
 
size_t num_of_cols () const
 
void add_diagonal (complex e)
 Add a number to the entire diagonal of the Matrix.
 
void insert_diagonal (complex e)
 Insert a number to the entire diagonal of the Matrix.
 
void multiply_by_number (complex v)
 multiply whole Matrix by a complex number
 
void print (std::ostream &) const
 Output matrix to the stream.
 
void formatted_print (std::ostream &) const
 
bool check_hermitian () const
 
bool check_realsymmetric () const
 
Matrixoperator+= (Matrix const &rhs)
 

Static Public Member Functions

static std::vector< int > create_correspondence_list (std::vector< int > orbitals_to_drop, int n)
 Function describes the relation between real matrix elements and fake matrix elements (realplus to-be-dropped). More...
 

Detailed Description

Simulate a larger square matrix and ignore accesses to given rows and columns.

If the dimension of a linear space is decreased (e.g. atomic orbitals are dropped), the corresponding row and column of the matrix is deleted, e.g. if you delete orbital Nr. 10, the 10th row and 10th column are deleted. Because a non-square matrix doesn't make sense, the simulated matrix is square and has the size of the smaller axis.

This class takes a square matrix of size n1 to write to and a list L (must be sorted!) containing the orbital numbers to delete. It simulates a square matrix of the size n1+length(L), but all add() or get() commands to the rows or columns contained in L are ignored.

Member Function Documentation

◆ create_correspondence_list()

std::vector< int > orbital_dropper_Matrix::create_correspondence_list ( std::vector< int >  orbitals_to_drop,
int  n 
)
static

Function describes the relation between real matrix elements and fake matrix elements (realplus to-be-dropped).

correspondence_list[simulated_index] = real_index. real_index = -1 if the element shall be dropped.

correspondence_list[simulated_index] = real_index. real_index = -1 if the element shall be dropped. For each index in the bigger, simulated matrix, the correspondence list tells you the corresponding index in the smaller, real matrix and contains -1 if the index is dropped.

n: size of the real matrix orbitals_to_drop: indices of the bigger, fake matrix to drop (resulting in a matrix of size n)


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