ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/math/RealSphericalHarmonic.hpp
Revision: 1651
Committed: Tue Oct 26 22:25:02 2004 UTC (19 years, 8 months ago) by gezelter
File size: 1246 byte(s)
Log Message:
define name collision

File Contents

# Content
1 /**
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 RSH_SIN 0
14 #define RSH_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 = RSH_SIN;}
36 void makeCosFunction() {functionType = RSH_COS;}
37
38 bool isSinFunction() { return functionType == RSH_SIN ? true : false;}
39 bool isCosFunction() { return functionType == RSH_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