-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbdg.h
More file actions
80 lines (74 loc) · 2.07 KB
/
bdg.h
File metadata and controls
80 lines (74 loc) · 2.07 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! Abstract base class cBdG
/*!
The base class sets up virtual process of reading input parameters
and common components of matrix construction
@author Lin Dong
@date Oct 2014
Created by Dong Lin on 10/22/14.
Copyright (c) 2014 Dong Lin. All rights reserved.
*/
#ifndef BDG_H_
#define BDG_H_
#include "stdcpp.h"
#include "floquet.h"
#include "dist.h"
#include "lgwt.h"
class cBdG: public cFloquet {
protected:
int _pblock4, _ibdg;
double _h, _mu, _T, _Delta0, _v, _kmax;
public:
virtual void file_input() =0; // this->file_input()
virtual void file_output() =0; // this->file_output()
virtual void construction() =0; // this->construction()
virtual void compute() =0; // this->compute()
};
class cBdG_Bulk : public cBdG, public cDistribute{
// Bulk property: Chern number
// Wavefunction is expanded in frequency domain for time-dependent problem;
// p = 0 for time-independent problem.
private:
int _NKX2;
int _lowerbound, _upperbound;
double *curvature_rank, *curvature;
double _temp_curv;
complex<double> _chern;
double _chern_rank, _total_chern;
char* _chernSolver;
public:
cBdG_Bulk (const int rank, const int size, const int root) : cDistribute(rank,size,root){
_chernSolver = new char [100];
}
~cBdG_Bulk(){
delete []_chernSolver;
if (_root==_rank) {
delete []curvature;
}
delete []curvature_rank;
}
void file_input();
void file_output();
void construction();
void update(int nk, double kx, double ky);
void compute();
double chern(int nk, double kx, double ky);
void BrillouinZone();
};
class cBdG_Edge : public cBdG, public cDistribute{
// Edge property: spectrum under hard wall boundary condition.
// Wavefunction is expanded in both y-direction and frequency domain for time-dependent problem;
// p = 0 for time-independent problem.
private:
int _NMAX;
double _L;
double *localEig, *TotalEig;
public:
cBdG_Edge (const int rank, const int size, const int root) : cDistribute(rank,size,root){}
~cBdG_Edge(){}
void file_input();
void file_output();
void construction();
void update(int nkx);
void compute();
};
#endif // BDG_H_