Lemma is an Electromagnetics API
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.

KernelEM1DBase.h 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. **/
  10. #ifndef KERNELEM1DBASE_INC
  11. #define KERNELEM1DBASE_INC
  12. #include "LemmaObject.h"
  13. namespace Lemma {
  14. // Transverse electric or magnetic mode
  15. enum EMMODE {TM, TE, NONE};
  16. // ===================================================================
  17. // Class: KernelEM1DBase
  18. /**
  19. @class
  20. \ingroup FDEM1D
  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. /// Default protected constructor.
  30. KernelEM1DBase ( const ctor_key& key ) : LemmaObject( key ) {
  31. }
  32. /// Default protected constructor.
  33. ~KernelEM1DBase () {
  34. }
  35. // ==================== OPERATORS =======================
  36. // ==================== OPERATIONS =======================
  37. /** Returns the Complex bessel argument to be evaluated for a given
  38. * lambda value
  39. */
  40. virtual Complex BesselArg(const Real& lambda)=0;
  41. /** Returns the complex bessel argument. Same as above, but does not
  42. * call reflection coefficient calculation in KernelEM1DReflBase.
  43. * @param[in] lambda is the hankel wave value.
  44. */
  45. virtual Complex RelBesselArg(const Real& lambda)=0;
  46. // ==================== ACCESS =======================
  47. virtual void SetIk(const int& ik)=0;
  48. virtual void SetMode(const EMMODE& mode)=0;
  49. Index GetManagerIndex() const {
  50. return this->managerIdx;
  51. }
  52. // ==================== INQUIRY =======================
  53. virtual int GetNumRel()=0;
  54. virtual int GetBesselOrder()=0;
  55. virtual Complex GetZm()=0;
  56. virtual Complex GetYm()=0;
  57. virtual Complex GetZs()=0;
  58. virtual Complex GetKs()=0;
  59. virtual std::string GetName() const = 0;
  60. protected:
  61. // ==================== DATA MEMBERS =========================
  62. /** Where does this kernel live on the vector managed by the manager */
  63. Index managerIdx;
  64. private:
  65. /** ASCII string representation of the class name */
  66. static constexpr auto CName = "KernelEM1DBase";
  67. }; // ----- end of class KernelEM1DBase -----
  68. } // namespace Lemma
  69. #endif // ----- #ifndef KERNELEM1DBASE_INC -----