ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/utils/sysbuilder/BaseLattice.hpp
Revision: 1429
Committed: Wed Jul 28 20:29:49 2004 UTC (19 years, 11 months ago) by tim
File size: 1209 byte(s)
Log Message:
simpleBuilder in progress

File Contents

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