| 1 |
#ifndef _SHFUNC_HPP_ |
| 2 |
#define _SHFUNC_HPP_ |
| 3 |
|
| 4 |
#include <string.h> |
| 5 |
|
| 6 |
#define SH_SIN 0 |
| 7 |
#define SH_COS 1 |
| 8 |
|
| 9 |
class SHFunc { |
| 10 |
public: |
| 11 |
|
| 12 |
SHFunc(); |
| 13 |
virtual ~SHFunc() {} |
| 14 |
|
| 15 |
void setL(int theL) { L = theL; }; |
| 16 |
int getL() { return L; } |
| 17 |
|
| 18 |
void setM(int theM) { M = theM; }; |
| 19 |
int getM() { return M; } |
| 20 |
|
| 21 |
double getCoefficient() {return coefficient;} |
| 22 |
void setCoefficient(double co) {coefficient = co;} |
| 23 |
|
| 24 |
void setType(short int theType) {funcType = theType;} |
| 25 |
void makeSinFunc() {funcType = SH_SIN;} |
| 26 |
void makeCosFunc() {funcType = SH_COS;} |
| 27 |
short int getType() { return funcType; } |
| 28 |
bool isSinFunc() { return funcType == SH_SIN ? true : false;} |
| 29 |
bool isCosFunc() { return funcType == SH_COS ? true : false;} |
| 30 |
|
| 31 |
double getValueAt(double costheta, double phi); |
| 32 |
|
| 33 |
protected: |
| 34 |
|
| 35 |
double LegendreP (int l, int m, double x); |
| 36 |
double Fac (int n); |
| 37 |
|
| 38 |
int L; |
| 39 |
int M; |
| 40 |
short int funcType; |
| 41 |
double coefficient; |
| 42 |
|
| 43 |
}; |
| 44 |
|
| 45 |
#endif |