39 |
|
* such damages. |
40 |
|
*/ |
41 |
|
|
42 |
< |
#ifndef LATTICE_LATTICE_HPP |
43 |
< |
#define LATTICE_LATTICE_HPP |
44 |
< |
#include "lattice/BaseLattice.hpp" |
45 |
< |
#include <string> |
42 |
> |
#ifndef LATTICE_BASELATTICE_HPP |
43 |
> |
#define LATTICE_BASELATTICE_HPP |
44 |
> |
|
45 |
|
#include <vector> |
46 |
+ |
#include "math/Vector3.hpp" |
47 |
|
|
48 |
|
namespace oopse { |
49 |
|
|
50 |
< |
class CubicLattice : public BaseLattice{ |
50 |
> |
class Lattice{ |
51 |
|
protected: |
52 |
< |
CubicLattice(); |
52 |
> |
Lattice(){ |
53 |
> |
|
54 |
> |
setOrigin(V3Zero); |
55 |
> |
} |
56 |
> |
|
57 |
|
public: |
58 |
+ |
|
59 |
+ |
//virtual destructor of Lattice |
60 |
+ |
virtual ~Lattice() {} |
61 |
+ |
|
62 |
+ |
int getNumSitesPerCell() {return nCellSites;} |
63 |
+ |
|
64 |
+ |
void getLatticePointsPos(std::vector<Vector3d>& latticePos, int nx, int ny, int nz); |
65 |
+ |
|
66 |
+ |
std::vector<Vector3d> getLatticePointsOrt() {return cellSitesOrt;} |
67 |
+ |
|
68 |
|
//get lattice constant of unit cell |
69 |
< |
virtual std::vector<double> getLatticeConstant(); |
69 |
> |
virtual std::vector<double> getLatticeConstant() =0; |
70 |
|
|
71 |
|
//set lattice constant of unit cell |
72 |
< |
virtual void setLatticeConstant(const std::vector<double>& lc); |
59 |
< |
protected: |
60 |
< |
double latticeParam; |
61 |
< |
}; |
72 |
> |
virtual void setLatticeConstant(const std::vector<double>& lc)=0; |
73 |
|
|
74 |
+ |
//get origin of unit cell |
75 |
+ |
Vector3d getOrigin( ) {return origin;} |
76 |
|
|
77 |
< |
class FCCLattice : public CubicLattice{ |
78 |
< |
public: |
79 |
< |
FCCLattice(); |
80 |
< |
virtual const std::string getLatticeType() {return FCCLatticeType;} |
81 |
< |
virtual void update(); |
77 |
> |
//set origin of unit cell |
78 |
> |
void setOrigin(const Vector3d& newOrigin){ |
79 |
> |
this->origin = newOrigin; |
80 |
> |
} |
81 |
> |
|
82 |
> |
protected: |
83 |
> |
virtual void update() =0; |
84 |
|
|
85 |
+ |
int nCellSites; |
86 |
+ |
Vector3d origin; |
87 |
+ |
std::vector<Vector3d> cellSitesPos; |
88 |
+ |
std::vector<Vector3d> cellSitesOrt; |
89 |
+ |
Vector3d cellLen; |
90 |
|
}; |
91 |
|
|
92 |
+ |
|
93 |
|
} |
94 |
+ |
|
95 |
|
#endif |