71 void setForceConstant(RealType k) { k_ = k; }
73 RealType getForceConstant() {
return k_; }
75 void calcForce(RealType theta, RealType& V, RealType& dVdtheta) {
76 RealType ct = cos(theta);
77 RealType st = sin(theta);
78 RealType delta = ct - c0_;
80 V = 0.5 * k_ * delta * delta;
82 dVdtheta = -k_ * delta * st;