Lemma is an Electromagnetics API
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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 09/24/2013 04:29:27 PM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@lemmasoftware.org
  14. * @copyright Copyright (c) 2013, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2013, Trevor Irons
  16. */
  17. #ifndef AEMSURVEYREADER_INC
  18. #define AEMSURVEYREADER_INC
  19. #include "LemmaObject.h"
  20. #include "AEMSurvey.h"
  21. #include "ASCIIParser.h"
  22. namespace Lemma {
  23. /**
  24. \ingroup FDEM1D
  25. \brief Reads an ASCII description of an AEM survey
  26. \details The file format is described as follows.
  27. */
  28. class AEMSurveyReader : public LemmaObject {
  29. friend std::ostream &operator<<(std::ostream &stream,
  30. const AEMSurveyReader &ob);
  31. public:
  32. // ==================== LIFECYCLE =======================
  33. /**
  34. * @copybrief LemmaObject::NewSP()
  35. * @copydetails LemmaObject::NewSP()
  36. */
  37. static std::shared_ptr<AEMSurveyReader> NewSP();
  38. /** Default protected constructor, use New */
  39. AEMSurveyReader (const ctor_key&);
  40. /** Default protected destructor, use Delete */
  41. ~AEMSurveyReader ();
  42. // ==================== OPERATORS =======================
  43. // ==================== OPERATIONS =======================
  44. /**
  45. *
  46. @code
  47. // AEM Survey Specification file
  48. 5 // N sources
  49. 400 // Source 1 frequency Hz
  50. MD // Source 1 type
  51. -7 0 -10 // Source 1 relative position front/back, left/right, up/down
  52. 1 // Source 1 moment
  53. 1800 // Source 2 frequency Hz
  54. VMD // Source 2 type
  55. -7 0 -10 // Source 2 relative position
  56. 1 // Source 2 moment
  57. 8200 // Source 3 freqeuncy Hz
  58. MD // Source 3 type
  59. -7 0 -10 // Source 3 relative position
  60. 1 // Source 3 moment
  61. 40000 // Source 4 frequency Hz
  62. MD // Source 4 type
  63. -7 0 -10 // Source 4 relative position
  64. 1 // Source 4 moment
  65. 140000 // Source 5 frequency Hz
  66. MD // Source 5 type
  67. -7 0 -10 // Source 5 relative position
  68. 1 // Source 5 moment
  69. // Flight Plan (in same coordinates as grid)
  70. 2 // Number of points
  71. // location in x, y, z, polarisation [x,y,z]
  72. -200 -200 -30 0 0 1
  73. -190 -200 -30 0 0 1
  74. @endcode
  75. */
  76. void ReadASCIIAEMFile( const std::string& name );
  77. // ==================== ACCESS =======================
  78. /**
  79. * @return the AEMSurvey based on the file read
  80. */
  81. std::shared_ptr<AEMSurvey> GetSurvey();
  82. // ==================== INQUIRY =======================
  83. /** Returns the name of the underlying class, similiar to Python's type */
  84. virtual std::string GetName() const {
  85. return this->CName;
  86. }
  87. protected:
  88. // ==================== LIFECYCLE =======================
  89. private:
  90. // ==================== DATA MEMBERS =========================
  91. std::shared_ptr<AEMSurvey> Survey;
  92. static constexpr auto CName = "AEMSurveyReader";
  93. }; // ----- end of class AEMSurveyReader -----
  94. } // ----- end of Lemma name -----
  95. #endif // ----- #ifndef AEMSURVEYREADER_INC -----