ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Rattle.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/Rattle.hpp (file contents):
Revision 1254 by tim, Wed Jun 9 16:16:33 2004 UTC vs.
Revision 1268 by tim, Fri Jun 11 17:16:21 2004 UTC

# Line 80 | Line 80 | class RattleFramework : public ConsAlgoFramework{
80   ////////////////////////////////////////////////////////////////////////////////
81   //class RattleAlgorithm will encapsulate preConstraint, RattleA and RattleB
82   //actually, we could use factory pattern to seperate the creation process
83 < class RattleFramework : public ConsAlgoFramework{
83 > class RattleFramework : public VelVerletConsFramework{
84    public:
85 <    RattleFramework(SimInfo* rhs) : ConsAlgoFramework(rhs){
85 >    RattleFramework(SimInfo* rhs) : VelVerletConsFramework(rhs){
86        raAlgo = new RattleA(rhs);
87        rbAlgo = new RattleB(rhs);      
88      }
# Line 92 | Line 92 | class RattleFramework : public ConsAlgoFramework{
92        delete rbAlgo;
93      }
94      
95 <    int doRattleA(){
95 >    virtual int doConstrainA(){
96        raAlgo->doConstrain();
97        return raAlgo->haveError()? -1 : 1;
98  
99      }
100      
101 <   int doRattleB(){
101 >   virtual int doConstrainB(){
102        rbAlgo->doConstrain();
103        return rbAlgo->haveError()? -1 : 1;
104  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines