--- trunk/OOPSE/libmdtools/ConstraintAlgorithm.hpp 2004/06/04 19:30:05 1248 +++ trunk/OOPSE/libmdtools/ConstraintAlgorithm.hpp 2004/06/11 17:16:21 1268 @@ -15,11 +15,12 @@ enum ConsAlgoStatus{ class SimInfo; enum ConsAlgoStatus{ - consPairHandlerFail = -3, - consElemHandlerFail = -2, - consFail = -1, - consSuccess = 0, - consAlready = 1}; + consExceedMaxIter = -4, //can not constrain the bond within maximum iteration + consPairHandlerFail = -3, //can not found call back functor for constraint pair + consElemHandlerFail = -2, //can not found callback functor for constraint element + consFail = -1, //Constraint Fail + consSuccess = 0, //constrain the pair by moving two elements + consAlready = 1}; //current pair is already constrained, do not need to move the elements //////////////////////////////////////////////////////////////////////////////// //Declaration of ConstraintAlgorithm @@ -31,8 +32,8 @@ class ConstraintAlgorithm{ class ConstraintAlgorithm{ public: - ~ConstraintAlgorithm(); - virtual void doConstrain(); + virtual ~ConstraintAlgorithm(); + virtual void doConstrain(); //using RTTI (Run Time Type Information) to dispatch int doConstrainPair(ConstraintPair* consPair); @@ -68,4 +69,13 @@ class ConsAlgoFramework{ }; +//Velocity Verlet constraint algorithm frame work +class VelVerletConsFramework : public ConsAlgoFramework{ + public: + virtual int doConstrainA() = 0; + virtual int doConstrainB() = 0; + protected: + VelVerletConsFramework(SimInfo* rhs) : ConsAlgoFramework(rhs){} +}; + #endif //endif _CONSTRAINTALGORITHM_H_