1 |
#ifndef __LATTICEBUILDER_H__ |
2 |
#define __LATTICEBUILDER_H__ |
3 |
|
4 |
#define FCC_LATTICE_TYPE 1 |
5 |
#define BCC_LATTICE_TYPE 2 |
6 |
#define HCP_LATTICE_TYPE 3 |
7 |
#define HCPWATER_LATTICE_TYPE 4 |
8 |
#define DIAMOND_LATTICE_TYPE 5 |
9 |
#define UNKNOWN_LATTICE_TYPE 0 |
10 |
|
11 |
class Lattice{ |
12 |
|
13 |
public: |
14 |
Lattice(int latticeType,double latticeSpacing); |
15 |
~Lattice(void); |
16 |
|
17 |
int getLatticePoints(double** thePosX, double** thePosY, |
18 |
double** thePosZ, |
19 |
int ix, int iy, int iz); |
20 |
|
21 |
int getNpoints(void){return nCellSites;} |
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
private: |
28 |
|
29 |
|
30 |
int createFccLattice(double latticeSpacing); |
31 |
int createBccLattice(double latticeSpacing); |
32 |
int createHcpLattice(double latticeSpacing); |
33 |
int createHcpWaterLattice(double latticeSpacing); |
34 |
|
35 |
int myLatticeType; |
36 |
double cellLength; |
37 |
int nCellSites; |
38 |
double* latticePosX; |
39 |
double* latticePosY; |
40 |
double* latticePosZ; |
41 |
|
42 |
struct unitCell{ |
43 |
double* sx; |
44 |
double* sy; |
45 |
double* sz; |
46 |
double* s_ex; |
47 |
double* s_ey; |
48 |
double* s_ez; |
49 |
}thisUnitCell; |
50 |
|
51 |
|
52 |
}; |
53 |
|
54 |
|
55 |
#endif |