ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/applications/simpleBuilder/BaseLattice.hpp
Revision: 1910
Committed: Fri Jan 7 21:50:13 2005 UTC (19 years, 6 months ago) by tim
File size: 1258 byte(s)
Log Message:
ZConstraintForceManager in progress

File Contents

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