Lemma is an Electromagnetics API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kernelem1dbase.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* This file is part of Lemma, a geophysical modelling and inversion API */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /**
  6. @file
  7. @author Trevor Irons
  8. @date 05/18/2012
  9. @version $Id: kernelem1dbase.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef KERNELEM1DBASE_INC
  12. #define KERNELEM1DBASE_INC
  13. #include "LemmaObject.h"
  14. namespace Lemma {
  15. // Transverse electric or magnetic mode
  16. enum EMMODE {TM, TE, NONE};
  17. // ===================================================================
  18. // Class: KernelEm1DBase
  19. /**
  20. @class
  21. \brief Pure virtual base class of KernelEm1D
  22. \details Defines interface for HankelTransform classes
  23. */
  24. // ===================================================================
  25. class KernelEm1DBase : public LemmaObject {
  26. friend class KernelEM1DManager;
  27. public:
  28. // ==================== LIFECYCLE =======================
  29. // ==================== OPERATORS =======================
  30. // ==================== OPERATIONS =======================
  31. /** Returns the Complex bessel argument to be evaluated for a given
  32. * lambda value
  33. */
  34. virtual Complex BesselArg(const Real& lambda)=0;
  35. /** Returns the complex bessel argument. Same as above, but does not
  36. * call reflection coefficient calculation in KernelEM1DReflBase.
  37. * @param[in] lambda is the hankel wave value.
  38. */
  39. virtual Complex RelBesselArg(const Real& lambda)=0;
  40. // ==================== ACCESS =======================
  41. virtual void SetIk(const int& ik)=0;
  42. virtual void SetMode(const EMMODE& mode)=0;
  43. int GetManagerIndex() {
  44. return this->managerIdx;
  45. }
  46. // ==================== INQUIRY =======================
  47. virtual int GetNumRel()=0;
  48. virtual int GetBesselOrder()=0;
  49. virtual Complex GetZm()=0;
  50. virtual Complex GetYm()=0;
  51. virtual Complex GetZs()=0;
  52. virtual Complex GetKs()=0;
  53. protected:
  54. // ==================== LIFECYCLE =======================
  55. /// Default protected constructor.
  56. KernelEm1DBase (const std::string& name) : LemmaObject(name)
  57. {
  58. }
  59. /// Default protected constructor.
  60. ~KernelEm1DBase () {
  61. if (this->NumberOfReferences > 0)
  62. throw DeleteObjectWithReferences( this );
  63. }
  64. void Release() {
  65. delete this;
  66. }
  67. // ==================== OPERATIONS =======================
  68. // ==================== DATA MEMBERS =========================
  69. /** Where does this kernel live on the vector managed by the manager */
  70. int managerIdx;
  71. private:
  72. }; // ----- end of class KernelEm1DBase -----
  73. } // namespace Lemma
  74. #endif // ----- #ifndef KERNELEM1DBASE_INC -----