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

Comparing trunk/OOPSE-4/src/types/QuarticBendType.hpp (file contents):
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 3175 by gezelter, Mon Jul 16 13:33:10 2007 UTC

# Line 60 | Line 60 | namespace oopse {
60  
61    public:
62          
63 <    QuarticBendType(RealType r0, RealType k4, RealType k3, RealType k2, RealType k1, RealType k0)
64 <      : BendType(r0), k4_(k4), k3_(k3), k2_(k2),  k1_(k1), k0_(k0){
65 <      }
66 <
67 <    void setForceConstant(RealType k4, RealType k3, RealType k2, RealType k1, RealType k0) {
63 >    QuarticBendType(RealType r0, RealType k4, RealType k3, RealType k2,
64 >                    RealType k1, RealType k0) : BendType(r0), k4_(k4), k3_(k3),
65 >                                                k2_(k2),  k1_(k1), k0_(k0){
66 >    }
67 >    
68 >    void setForceConstant(RealType k4, RealType k3, RealType k2, RealType k1,
69 >                          RealType k0) {
70        k4_ = k4;
71        k3_ = k3;
72        k2_ = k2;
73        k1_ = k1;
74        k0_ = k0;
73
75      }
76  
77 <    void getForceConstant(RealType& k4, RealType& k3, RealType& k2, RealType& k1, RealType& k0) {
77 >    void getForceConstant(RealType& k4, RealType& k3, RealType& k2,
78 >                          RealType& k1, RealType& k0) {
79        k4 = k4_;
80        k3 = k3_;
81 <      k2  = k2_;
81 >      k2 = k2_;
82        k1 = k1_;
83        k0 = k0_;
84      }
# Line 88 | Line 90 | namespace oopse {
90        RealType delta4 = delta3 * delta;
91              
92        V =k0_ + k1_ * delta + k2_*delta2 + k3_*delta3 + k4_*delta4;
93 <      dVdTheta = k1_ + 2.0*k2_ * delta + 3.0 * k3_*delta2 + 4.0*k4_*delta3;            
93 >      dVdTheta = k1_ + 2.0*k2_ * delta + 3.0 * k3_*delta2 + 4.0*k4_*delta3;
94      }    
95          
96    private:
95
97      RealType k4_;
98      RealType k3_;
99      RealType k2_;
100      RealType k1_;
101      RealType k0_;
101
102    };
103
103   }//end namespace oopse
104   #endif //TYPES_QUARTICBENDTYPE_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines