Lemma is an Electromagnetics API
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

LayeredEarthEMReader.h 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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/27/2013 01:44:36 PM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@lemmasoftware.org
  14. * @copyright Copyright (c) 2013, 2018 Trevor Irons
  15. */
  16. #ifndef LAYEREDEARTHEMREADER_INC
  17. #define LAYEREDEARTHEMREADER_INC
  18. #include "LemmaObject.h"
  19. #include "ASCIIParser.h"
  20. #include "LayeredEarthEM.h"
  21. namespace Lemma {
  22. /**
  23. \brief
  24. \details
  25. */
  26. class LayeredEarthEMReader : public LemmaObject {
  27. friend std::ostream &operator<<(std::ostream &stream,
  28. const LayeredEarthEMReader &ob);
  29. friend std::ostream &operator<<(std::ostream &stream,
  30. const LayeredEarthEMReader &ob);
  31. struct ctor_key{};
  32. public:
  33. // ==================== LIFECYCLE =======================
  34. /**
  35. * @copybrief LemmaObject::New()
  36. * @copydetails LemmaObject::New()
  37. */
  38. static LayeredEarthEMReader* New();
  39. /**
  40. * @copybrief LemmaObject::Delete()
  41. * @copydetails LemmaObject::Delete()
  42. */
  43. void Delete();
  44. // ==================== OPERATORS =======================
  45. // ==================== OPERATIONS =======================
  46. /** Reads ASCII input file. The format is as follows
  47. @code
  48. 4 // Number of NON-AIR layers
  49. 200 10 // resistivity, thickness layer 1 [Ohm-m] [m]
  50. 20 10 // resistivity, thickness layer 2 [Ohm-m] [m]
  51. 1120 10 // resistivity, thickness layer 3 [Ohm-m] [m]
  52. 200 // resistivity of bottom layer [Ohm-m]
  53. @endcode
  54. * @param[in] name is the filename
  55. */
  56. void ReadASCIIInputFile( const std::string& name );
  57. // ==================== ACCESS =======================
  58. /** @return the pointer address of the LayeredEarthEM
  59. */
  60. LayeredEarthEM* GetLayeredEarth();
  61. // ==================== INQUIRY =======================
  62. protected:
  63. // ==================== LIFECYCLE =======================
  64. /** Default protected constructor, use New */
  65. LayeredEarthEMReader (const std::string& name);
  66. /** Default protected destructor, use Delete */
  67. ~LayeredEarthEMReader ();
  68. /**
  69. * @copybrief LemmaObject::Release()
  70. * @copydetails LemmaObject::Release()
  71. */
  72. void Release();
  73. private:
  74. // ==================== DATA MEMBERS =========================
  75. LayeredEarthEM* LayEarth;
  76. }; // ----- end of class LayeredEarthEMReader -----
  77. } // ----- end of Lemma name -----
  78. #endif // ----- #ifndef LAYEREDEARTHEMREADER_INC -----