00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef INTEGRABLECHORD_H
00021 #define INTEGRABLECHORD_H
00022
00023 #include <chord.h>
00024 #include "areaintegrand.h"
00025 #include "siderealintegrand.h"
00026 #include "fsintegrand.h"
00027
00034 class integrablechord : public chord {
00035
00039 int nrule;
00040
00044 double* xp;
00045
00049 dcmplx *intdata;
00050
00054 static int nrulecached;
00055 static double *xcached;
00056 static double *wcached;
00057
00058 public:
00071 integrablechord(const conftrans& CT, const chord &ch, int nrule, double p = 1.0);
00072
00077 integrablechord(const integrablechord& other);
00078
00083 inline int getNrule() const {
00084 return nrule;
00085 };
00086
00091 inline dcmplx& dzi(int i) const {
00092 return intdata[i];
00093 };
00094
00099 inline dcmplx& ja(int i) const {
00100 return intdata[nrule+i];
00101 };
00102
00107 inline dcmplx& t(int i) const {
00108 return intdata[2*nrule+i];
00109 };
00110
00115 inline dcmplx& tp(int i) const {
00116 return intdata[3*nrule+i];
00117 };
00118
00129 double rintegrate(const areaintegrand &integrand) const;
00130
00141 double rintegrate(const siderealintegrand &integrand) const;
00142
00155 inline double rintegrate(const integrablechord& another, const fsintegrand &integrand, const conftrans& CT) const {
00156 dcmplx dz[nrule];
00157 for (int i=0;i<nrule;i++) dz[i]=abs(dzi(i));
00158 return rintegrate2loop(another, integrand, CT, &dz[0]);
00159 };
00160
00173 inline double rintegrate2(const integrablechord& another, const fsintegrand& integrand, const conftrans& CT) const {
00174 return rintegrate2loop(another, integrand, CT, &dzi(0));
00175 };
00176
00187 void freeCache();
00188
00189 integrablechord& shiftS(double amt, const conftrans &CT);
00190
00191 integrablechord& shiftF(double amt, const conftrans &CT);
00192
00197 virtual int getStorage();
00198
00199 ~integrablechord();
00200
00201 private:
00202
00207 void recalcInfo(conftrans CT);
00208
00213 double rintegrate2loop(const integrablechord& another, const fsintegrand &integrand, const conftrans& CT, dcmplx* dz) const;
00214 };
00215
00216 #endif