123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
-
-
-
-
-
-
- #ifndef __HANKEL2_H
- #define __HANKEL2_H
-
- #include "hankeltransform.h"
- #include "kernelem1dbase.h"
- #include "kernelem1dspec.h"
- #include "CubicSplineInterpolator.h"
-
- namespace Lemma {
-
-
-
-
-
-
- class Hankel2 : public HankelTransform {
-
- friend std::ostream &operator<<(std::ostream &stream, const Hankel2 &ob);
-
- public:
-
-
-
-
- static Hankel2 *New();
-
-
-
- void Delete();
-
-
-
-
-
-
- void SetNumConv(const int &i);
-
-
-
-
-
- void Compute(const Real &rho, const int& ntol, const Real &tol);
-
-
- void ComputeRelated(const Real &rho, KernelEm1DBase* Kernel);
-
-
- void ComputeRelated(const Real &rho, std::vector< KernelEm1DBase* > KernelVec);
-
-
- void ComputeRelated(const Real &rho, KernelEM1DManager* Manager);
-
-
- void ComputeLaggedRelated(const Real &rho, const int& nlag, KernelEM1DManager* Manager);
-
-
-
-
- Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic> GetAnswer();
-
-
- VectorXr GetArg() {return Arg;};
-
-
- Real GetABSER( ) { return ABSER; };
-
-
- void SetLaggedArg(const Real& rho);
-
-
-
-
-
-
-
-
-
-
-
- Complex Zgauss(const int &ikk, const EMMODE &imode,
- const int &itype, const Real &rho,
- const Real &wavef, KernelEm1DBase *Kernel);
-
- protected:
-
-
-
-
- inline void StoreRetreive(const int &idx, const int &lag,
- Complex &Zsum, const int &irel, Complex &C, const Real& rho0) {
-
- int look = idx+lag;
- int iq = look/801;
- int ir = look%801;
- int iroll = iq*800;
-
- if(this->Key[ir] <= iroll) {
- this->Key[ir] = iroll + ir;
- ++this->NumFun;
- Manager->ComputeReflectionCoeffs(this->Lambda, idx, rho0);
- for (unsigned int ir2=0; ir2<this->kernelVec.size(); ++ir2) {
- this->Zwork(ir, ir2) = this->kernelVec[ir2]->RelBesselArg(this->Lambda);
- }
- }
-
- C = this->Zwork(ir, irel) * this->FilterWeights(this->BesselOrder, idx);
- Zsum += C;
- return;
- }
-
-
- Hankel2(const std::string& name);
-
-
- ~Hankel2();
-
-
-
- void Release();
-
-
-
- void DeleteSplines();
-
-
-
-
- Real Lambda;
-
-
- int NumFun;
-
-
-
-
-
-
- int NumConv;
-
-
- int NumRel;
-
-
- int BesselOrder;
-
-
- int iLag;
-
-
-
-
-
-
- KernelEM1DManager* Manager;
-
-
- static const Real ABSCISSA;
-
-
- static const Real ABSE;
-
-
- static const Real ABSER;
-
-
- int icount;
-
-
- std::vector <KernelEm1DBase*> kernelVec;
-
-
- std::vector <CubicSplineInterpolator*> splineVecReal;
-
-
- std::vector <CubicSplineInterpolator*> splineVecImag;
-
-
- Eigen::Matrix<int, 801, 1> Key;
-
-
-
-
-
-
-
- static const Eigen::Matrix<Real, 2, 801> FilterWeights;
-
-
-
- Eigen::Matrix<Complex, 801, Eigen::Dynamic> Zwork;
-
-
-
- Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic> Zans;
-
-
- VectorXr Arg;
-
- };
-
- }
-
- #endif
|