forked from chengchen1987/simple_ed_cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hmatrix.h
54 lines (41 loc) · 960 Bytes
/
hmatrix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <vector>
#include <algorithm>
#include "basis.h"
#define PI 3.14159265358979323846
class Ham_1dXXZ
{
private:
Basis* basis;
public:
Ham_1dXXZ(Basis* _basis, const double& _g, const int& _bc);
~Ham_1dXXZ();
int LatticeSize;
l_int Dim;
int bc; //boundary condition: 0->pbc; 1->obc;
double g;
// Build Hamiltonian matrix for
// 1d XXZ model
void DenseMat_Build();
double* DMat;
double* spec;
void DenseMat_Eig();
void DenseMat_SpecificHeat();
// sparse matrix
l_int SparaseMat_Counts();
void SparseMat_Build();
double* SMat_vals;
l_int* SMat_cols;
l_int* SMat_PointerBE;
void SparseMat_Eigs();
void SparseMat_SpecificHeat(); // finite temperature Lanczos method
// debug
//inline void PrintHMatrix(int aindex);
};