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

Comparing trunk/OOPSE-3.0/src/types/HarmonicBendType.hpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 1 | Line 1
1 < /*
1 > /*
2   * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved.
3   *
4   * The University of Notre Dame grants you ("Licensee") a
# Line 52 | Line 52 | namespace oopse {
52   #include "types/BendType.hpp"
53  
54   namespace oopse {
55 < /**
56 < * @class HarmonicBendType
57 < *
58 < * @todo documentation
59 < */
60 < class HarmonicBendType : public BendType {
55 >  /**
56 >   * @class HarmonicBendType
57 >   *
58 >   * @todo documentation
59 >   */
60 >  class HarmonicBendType : public BendType {
61  
62 <    public:
62 >  public:
63  
64 <        HarmonicBendType(double theta, double k) : BendType(theta) , k_(k){
65 <        }
64 >    HarmonicBendType(double theta, double k) : BendType(theta) , k_(k){
65 >    }
66  
67 <        void setForceConstant(double k) {k_ = k; }
67 >    void setForceConstant(double k) {k_ = k; }
68  
69 <        double getForceConstant() {return k_;}
69 >    double getForceConstant() {return k_;}
70  
71 <        void calcForce(double theta, double& V, double& dVdr) {
72 <            double delta = theta - theta0_;
71 >    void calcForce(double theta, double& V, double& dVdr) {
72 >      double delta = theta - theta0_;
73  
74 <            V = 0.5 * k_ * delta * delta;
75 <            dVdr = k_ * delta;
76 <        }
74 >      V = 0.5 * k_ * delta * delta;
75 >      dVdr = k_ * delta;
76 >    }
77                  
78 <    private:
79 <        double k_;
78 >  private:
79 >    double k_;
80  
81 < };
81 >  };
82  
83   }//end namespace oopse
84   #endif //TYPES_HARMONICBENDTYPE_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines