ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/math/CubicSpline.hpp
(Generate patch)

Comparing branches/development/src/math/CubicSpline.hpp (file contents):
Revision 1479 by gezelter, Mon Jul 26 19:00:48 2010 UTC vs.
Revision 1877 by gezelter, Thu Jun 6 15:43:35 2013 UTC

# Line 35 | Line 35
35   *                                                                      
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   #ifndef MATH_CUBICSPLINE_HPP
# Line 53 | Line 54 | namespace OpenMD {
54    public:    
55      CubicSpline();
56      virtual ~CubicSpline() {}
57 <    void addPoint(RealType xp, RealType yp);
57 >    void addPoint(const RealType xp, const RealType yp);
58      void addPoints(const vector<RealType>& xps, const vector<RealType>& yps);
59 <    RealType getValueAt(RealType t);
60 <    pair<RealType, RealType> getValueAndDerivativeAt(RealType t);
59 >    RealType getValueAt(const RealType& t);
60 >    pair<RealType, RealType> getValueAndDerivativeAt(const RealType& t);
61 >    void getValueAt(const RealType& t, RealType& v);
62 >    void getValueAndDerivativeAt(const RealType& t, RealType& v, RealType& d);
63      
64    private:
65      void generate();
66      bool isUniform;
67      bool generated;
68 <    RealType dx;
69 <    int n;
70 <    vector<pair<RealType, RealType> > data;
68 >    RealType dx, dt, yval, dydx;
69 >    int n, j;
70 >    vector<pair<RealType, RealType> > data_;
71      vector<RealType> b;
72      vector<RealType> c;
73      vector<RealType> d;    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines