1 |
#ifndef _BASELATTICE_H_ |
2 |
#define _BASELATTICE_H_ |
3 |
|
4 |
#include <vector> |
5 |
|
6 |
using namespace std; |
7 |
|
8 |
class BaseLattice{ |
9 |
protected: |
10 |
BaseLattice(){ |
11 |
setStart(0, 0, 0); |
12 |
} |
13 |
|
14 |
public: |
15 |
|
16 |
//virtual destructor of BaseLattice |
17 |
virtual ~BaseLattice() {} |
18 |
|
19 |
//get lattice type |
20 |
virtual string getLatticeType() = 0; |
21 |
|
22 |
int getNumSitesPerCell() {return nCellSites;} |
23 |
|
24 |
void getLatticePoints(vector<double>& latticePosX, vector<double>& latticePosY, vector<double>& latticePosZ, |
25 |
int nx, int ny, int nz); |
26 |
|
27 |
//get lattice constant of unit cell |
28 |
vector<double> getLatticeConstant() =0; |
29 |
|
30 |
//set lattice constant of unit cell |
31 |
void setLatticeConstant(const vector<double>& lc)=0; |
32 |
|
33 |
//get origin of unit cell |
34 |
void getStart(double& sx, double& sy, double& sz){ |
35 |
sx = startX; |
36 |
sy = startY; |
37 |
sz = startZ; |
38 |
} |
39 |
|
40 |
//set origin of unit cell |
41 |
void setStart(double sx, double sy, double sz){ |
42 |
startX = sx; |
43 |
startY = sy; |
44 |
startZ = sz; |
45 |
} |
46 |
|
47 |
protected: |
48 |
virtual void update() =0; |
49 |
|
50 |
protected: |
51 |
int nCellSites; |
52 |
double startX; |
53 |
double startY; |
54 |
double startZ; |
55 |
|
56 |
}; |
57 |
|
58 |
|
59 |
#endif |