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

Comparing trunk/src/math/SphericalHarmonic.cpp (file contents):
Revision 1043 by gezelter, Thu Sep 21 14:45:08 2006 UTC vs.
Revision 1051 by gezelter, Mon Sep 25 22:08:33 2006 UTC

# Line 40 | Line 40
40   */
41  
42   #include <stdio.h>
43 + #include <cmath>
44   #include <limits>
45   #include "math/SphericalHarmonic.hpp"
46   #include "utils/simError.h"
# Line 140 | Line 141 | RealType SphericalHarmonic::Ptilde(int l,int m, RealTy
141      result = 0.;
142    } else {
143      RealType y=(RealType)(2.*l+1.)*Fact(l-m)/Fact(l+m);
144 <    result = sqrt(y) * Legendre(l,m,x);
144 >    result = mpow(m) * sqrt(y) * Legendre(l,m,x) / sqrt(4.0*M_PI);
145    }
146    return result;
147   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines