ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/math/RealSphericalHarmonic.hpp
Revision: 1591
Committed: Mon Oct 18 16:30:04 2004 UTC (19 years, 8 months ago) by gezelter
File size: 1240 byte(s)
Log Message:
Your basic run of the mill real-valued versions of Y_l^m(\theta, \phi)

File Contents

# User Rev Content
1 gezelter 1591 /**
2     * @file RealSphericalHarmonic.hpp
3     * @author Dan Gezelter
4     * @date 10/18/2004
5     * @version 1.0
6     */
7    
8     #ifndef MATH_REALSPHERICALHARMONIC_HPP
9     #define MATH_REALSPHERICALHARMONIC_HPP
10    
11     #include <string.h>
12    
13     #define SH_SIN 0
14     #define SH_COS 1
15    
16     namespace oopse {
17     class RealSphericalHarmonic {
18     public:
19    
20     RealSphericalHarmonic();
21     virtual ~RealSphericalHarmonic() {}
22    
23     void setL(int theL) { L = theL; };
24     int getL() { return L; }
25    
26     void setM(int theM) { M = theM; };
27     int getM() { return M; }
28    
29     void setCoefficient(double co) {coefficient = co;}
30     double getCoefficient() {return coefficient;}
31    
32     void setFunctionType(short int theType) {functionType = theType;}
33     short int getFunctionType() { return functionType; }
34    
35     void makeSinFunction() {functionType = SH_SIN;}
36     void makeCosFunction() {functionType = SH_COS;}
37    
38     bool isSinFunction() { return functionType == SH_SIN ? true : false;}
39     bool isCosFunction() { return functionType == SH_COS ? true : false;}
40    
41     double getValueAt(double costheta, double phi);
42    
43     protected:
44    
45     double LegendreP (int l, int m, double x);
46    
47     int L;
48     int M;
49     short int functionType;
50     double coefficient;
51    
52     };
53     }
54    
55     #endif