123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
-
-
-
-
-
-
- #ifndef __FHTANDERSON801_H
- #define __FHTANDERSON801_H
-
- #include "KernelEM1DBase.h"
- #include "KernelEM1DSpec.h"
- #include "CubicSplineInterpolator.h"
- #include "HankelTransform.h"
-
- namespace Lemma {
-
-
-
-
-
-
- class FHTAnderson801 : public HankelTransform {
-
- friend std::ostream &operator<<(std::ostream &stream, const FHTAnderson801 &ob);
-
- public:
-
-
-
-
- static std::shared_ptr<FHTAnderson801> NewSP();
-
-
-
- static std::unique_ptr<FHTAnderson801> NewUP();
-
-
- FHTAnderson801( const ctor_key& );
-
-
- FHTAnderson801 ( const YAML::Node& node, const ctor_key& );
-
-
- ~FHTAnderson801();
-
-
-
- YAML::Node Serialize() const;
-
-
-
- static std::shared_ptr< FHTAnderson801 > DeSerialize(const YAML::Node& node);
-
-
-
-
-
-
- void SetNumConv(const int &i);
-
-
-
-
-
- void Compute(const Real &rho, const int& ntol, const Real &tol);
-
-
- void ComputeRelated(const Real &rho, std::shared_ptr<KernelEM1DBase> Kernel);
-
-
- void ComputeRelated(const Real &rho, std::vector< std::shared_ptr<KernelEM1DBase> > KernelVec);
-
-
- void ComputeRelated(const Real &rho, std::shared_ptr<KernelEM1DManager> Manager);
-
-
- void ComputeLaggedRelated(const Real &rho, const int& nlag, std::shared_ptr<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);
-
-
- virtual inline std::string GetName() const;
-
- protected:
-
- private:
-
-
-
-
- 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;
- }
-
-
-
- void DeleteSplines();
-
-
-
-
- Real Lambda;
-
-
- int NumFun;
-
-
-
-
-
-
- int NumConv;
-
-
- int NumRel;
-
-
- int BesselOrder;
-
-
- int iLag;
-
-
-
-
-
-
- std::shared_ptr<KernelEM1DManager> Manager;
-
-
- static const Real ABSCISSA;
-
-
- static const Real ABSE;
-
-
- static const Real ABSER;
-
-
- int icount;
-
-
- std::vector < std::shared_ptr<KernelEM1DBase> > kernelVec;
-
-
- std::vector <std::shared_ptr<CubicSplineInterpolator> > splineVecReal;
-
-
- std::vector < std::shared_ptr<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;
-
-
- static constexpr auto CName = "FHTAnderson801";
-
- };
-
- }
-
- #endif
|