ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/applications/simpleBuilder/BaseLattice.hpp
Revision: 1501
Committed: Tue Sep 28 23:24:25 2004 UTC (19 years, 9 months ago) by tim
File size: 1236 byte(s)
Log Message:
change directory structure of application. Every executable file is replaced in seperate directory

File Contents

# User Rev Content
1 tim 1501 #ifndef _BASELATTICE_H_
2     #define _BASELATTICE_H_
3    
4     #include <vector>
5     #include "applications/simpleBuilder/Vector3d.hpp"
6    
7     using namespace std;
8    
9     class BaseLattice{
10     protected:
11     BaseLattice(){
12     Vector3d zeroVector3d(0.0, 0.0, 0.0);
13    
14     setOrigin(zeroVector3d);
15     }
16    
17     public:
18    
19     //virtual destructor of BaseLattice
20     virtual ~BaseLattice() {}
21    
22     //get lattice type
23     virtual const string getLatticeType() = 0;
24    
25     int getNumSitesPerCell() {return nCellSites;}
26    
27     void getLatticePointsPos(vector<Vector3d>& latticePos, int nx, int ny, int nz);
28    
29     vector<Vector3d> getLatticePointsOrt() {return cellSitesOrt;}
30    
31     //get lattice constant of unit cell
32     virtual vector<double> getLatticeConstant() =0;
33    
34     //set lattice constant of unit cell
35     virtual void setLatticeConstant(const vector<double>& lc)=0;
36    
37     //get origin of unit cell
38     Vector3d getOrigin( ) {return origin;}
39    
40     //set origin of unit cell
41     void setOrigin(const Vector3d& newOrigin){
42     this->origin = newOrigin;
43     }
44    
45     protected:
46     virtual void update() =0;
47    
48     int nCellSites;
49     Vector3d origin;
50     vector<Vector3d> cellSitesPos;
51     vector<Vector3d> cellSitesOrt;
52     Vector3d cellLen;
53     };
54    
55    
56     #endif