Main Lemma Repository
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* This file is part of Lemma, a geophysical modelling and inversion API.
  2. * More information is available at http://lemmasoftware.org
  3. */
  4. /* This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. */
  8. /**
  9. * @file
  10. * @date 02/11/2014 03:33:08 PM
  11. * @author Trevor Irons (ti)
  12. * @email Trevor.Irons@lemmasoftware.org
  13. * @copyright Copyright (c) 2014, Trevor Irons
  14. */
  15. #ifndef FHTKEY51_INC
  16. #define FHTKEY51_INC
  17. #include "HankelTransform.h"
  18. namespace Lemma {
  19. /**
  20. \brief Impliments the fast Hankel transform as outlines by Key 2011
  21. \details This filter uses 51, 101, or 201 filter points and supports both lagged and related
  22. kernel arguments. This algorithm is a port of code carrying the following copyright and
  23. restriction:
  24. %------------------------------------------------------------------%
  25. % Copyright (c) 2012 by the Society of Exploration Geophysicists. %
  26. % For more information, go to http://software.seg.org/2012/0003 . %
  27. % You must read and accept usage terms at: %
  28. % http://software.seg.org/disclaimer.txt before use. %
  29. %------------------------------------------------------------------%
  30. */
  31. class FHTKey51 : public HankelTransform {
  32. friend std::ostream &operator<<(std::ostream &stream, const FHTKey51 &ob);
  33. public:
  34. // ==================== LIFECYCLE =======================
  35. /** Default locked constructor, use NewSP */
  36. FHTKey51 ( const ctor_key& );
  37. /** DeSerializing locked constructor, use DeSerialize */
  38. FHTKey51 ( const YAML::Node& node, const ctor_key& );
  39. /** Default destructor */
  40. ~FHTKey51 ();
  41. /**
  42. * Factory method for generating objects.
  43. * @return std::shared_ptr<FHTKey51>
  44. */
  45. static std::shared_ptr<FHTKey51> NewSP();
  46. /** YAML Serializing method
  47. */
  48. YAML::Node Serialize() const;
  49. /**
  50. * Constructs an object from a YAML::Node.
  51. */
  52. static std::shared_ptr< FHTKey51 > DeSerialize(const YAML::Node& node);
  53. // ==================== OPERATORS =======================
  54. // ==================== OPERATIONS =======================
  55. Complex Zgauss(const int &ikk, const EMMODE &imode,
  56. const int &itype, const Real &rho,
  57. const Real &wavef, KernelEM1DBase* Kernel);
  58. /// Computes related kernels, if applicable, otherwise this is
  59. /// just a dummy function.
  60. void ComputeRelated(const Real& rho, std::shared_ptr<KernelEM1DBase> Kernel);
  61. void ComputeRelated(const Real& rho, std::vector< std::shared_ptr<KernelEM1DBase> > KernelVec);
  62. void ComputeRelated(const Real& rho, std::shared_ptr<KernelEM1DManager> KernelManager);
  63. // ==================== ACCESS =======================
  64. // ==================== INQUIRY =======================
  65. /** Returns the name of the underlying class, similiar to Python's type */
  66. virtual inline std::string GetName() const ;
  67. protected:
  68. private:
  69. // ==================== DATA MEMBERS =========================
  70. // Shared Filter Weights
  71. static const Eigen::Matrix<Real, 51, 3> WT51;
  72. /// Holds answer, dimensions are NumConv, and NumberRelated.
  73. Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic> Zans;
  74. /** ASCII string representation of the class name */
  75. static constexpr auto CName = "FHTKey51";
  76. }; // ----- end of class FHTKey51 -----
  77. } // ----- end of Lemma name -----
  78. #endif // ----- #ifndef FHTKEY51_INC -----