ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/lattice/Lattice.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/lattice/Lattice.hpp (file contents):
Revision 2181 by tim, Tue Apr 12 21:58:09 2005 UTC vs.
Revision 2182 by tim, Tue Apr 12 22:07:45 2005 UTC

# Line 39 | Line 39
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 +    //get lattice type
63 +    virtual const  std::string getLatticeType() = 0;
64 +    
65 +    int getNumSitesPerCell() {return nCellSites;}
66 +
67 +    void getLatticePointsPos(std::vector<Vector3d>& latticePos, int nx, int ny, int nz);
68 +
69 +     std::vector<Vector3d> getLatticePointsOrt() {return cellSitesOrt;}
70 +    
71      //get lattice constant of unit cell
72 <    virtual  std::vector<double> getLatticeConstant();
72 >    virtual  std::vector<double> getLatticeConstant() =0;
73  
74      //set lattice constant of unit cell
75 <    virtual void setLatticeConstant(const  std::vector<double>& lc);
59 <  protected:
60 <    double latticeParam;
61 < };
75 >    virtual void setLatticeConstant(const  std::vector<double>& lc)=0;
76  
77 +    //get origin of unit cell
78 +    Vector3d getOrigin( ) {return origin;}
79  
80 < class FCCLattice : public CubicLattice{
81 <  public:
82 <    FCCLattice();
83 <    virtual const  std::string getLatticeType() {return FCCLatticeType;}    
84 <    virtual void update();
80 >    //set origin of unit cell
81 >    void setOrigin(const Vector3d& newOrigin){
82 >      this->origin = newOrigin;
83 >    }
84 >
85 >  protected:
86 >    virtual void update() =0;
87      
88 +    int nCellSites;
89 +    Vector3d origin;    
90 +     std::vector<Vector3d> cellSitesPos;
91 +     std::vector<Vector3d> cellSitesOrt;
92 +    Vector3d cellLen;
93   };
94  
95 +
96   }
97 +
98   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines