Lemma is an Electromagnetics API
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

DCIPElectrode.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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 11/10/2014 10:53:34 AM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@xri-geo.com
  14. * @copyright Copyright (c) 2014, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2014, Trevor Irons
  16. */
  17. #ifndef DCIPELECTRODE_INC
  18. #define DCIPELECTRODE_INC
  19. #include "LemmaObject.h"
  20. namespace Lemma {
  21. /**
  22. \brief
  23. \details
  24. */
  25. class DCIPElectrode : public LemmaObject {
  26. friend std::ostream &operator<<(std::ostream &stream,
  27. const DCIPElectrode &ob);
  28. public:
  29. // ==================== LIFECYCLE =======================
  30. /**
  31. * @copybrief LemmaObject::New()
  32. * @copydetails LemmaObject::New()
  33. */
  34. static DCIPElectrode* New();
  35. /**
  36. * @copybrief LemmaObject::Delete()
  37. * @copydetails LemmaObject::Delete()
  38. */
  39. void Delete();
  40. // ==================== OPERATORS =======================
  41. // ==================== OPERATIONS =======================
  42. // ==================== ACCESS =======================
  43. /** Sets the physical location of the electrode
  44. * @param[in] loc is the location
  45. */
  46. void SetLocation(const Vector3r& loc);
  47. /** Sets the tag (label) for the electrode
  48. */
  49. void SetLabel(const std::string& tag);
  50. /** Sets the tag (label) for the electrode
  51. */
  52. std::string GetLabel( );
  53. int GetNodeID() {return Node_ID;}
  54. // ==================== INQUIRY =======================
  55. #ifdef HAVE_YAMLCPP
  56. /**
  57. * Uses YAML to serialize this object.
  58. * @return a YAML::Node
  59. */
  60. YAML::Node Serialize() const;
  61. /**
  62. * Constructs an object from a YAML::Node.
  63. */
  64. static DCIPElectrode* DeSerialize(const YAML::Node& node);
  65. #endif
  66. protected:
  67. // ==================== LIFECYCLE =======================
  68. /** Default protected constructor, use New */
  69. DCIPElectrode (const std::string& name);
  70. #ifdef HAVE_YAMLCPP
  71. /** Protected DeDerializing constructor, use factory DeSerialize method*/
  72. DCIPElectrode (const YAML::Node& node);
  73. #endif
  74. /** Default protected destructor, use Delete */
  75. ~DCIPElectrode ();
  76. /**
  77. * @copybrief LemmaObject::Release()
  78. * @copydetails LemmaObject::Release()
  79. */
  80. void Release();
  81. private:
  82. // ==================== DATA MEMBERS =========================
  83. /** The location of the electrode */
  84. Vector3r Location;
  85. /** Local Node_ID on a mesh */
  86. int Node_ID;
  87. /** String label for the electrode */
  88. std::string Label;
  89. }; // ----- end of class DCIPElectrode -----
  90. } // ----- end of Lemma name -----
  91. #endif // ----- #ifndef DCIPELECTRODE_INC -----