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

Comparing trunk/OOPSE-4/src/types/PolynomialBendType.hpp (file contents):
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC

# Line 62 | Line 62 | namespace oopse {
62    class PolynomialBendType : public BendType{
63  
64    public:
65 <    PolynomialBendType(double theta) : BendType(theta) {}
65 >    PolynomialBendType(RealType theta) : BendType(theta) {}
66  
67 <    void setCoefficient(int power, double coefficient) {
67 >    void setCoefficient(int power, RealType coefficient) {
68        polynomial_.setCoefficient(power, coefficient);
69      }
70  
71 <    double getCoefficient(int power) {
71 >    RealType getCoefficient(int power) {
72        return polynomial_.getCoefficient(power);
73      }
74          
75 <    void calcForce(double theta, double & V, double & dVdr) {
76 <      double delta = theta - theta0_;
75 >    void calcForce(RealType theta, RealType & V, RealType & dVdr) {
76 >      RealType delta = theta - theta0_;
77        V = polynomial_.evaluate(delta);
78        dVdr = polynomial_.evaluateDerivative(delta);
79  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines