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.

MagneticDipole.cpp 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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/25/2013 08:20:14 AM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@xri-geo.com
  14. * @copyright Copyright (c) 2013, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2013, Trevor Irons
  16. */
  17. #include "MagneticDipole.h"
  18. namespace Lemma {
  19. // ==================== FRIEND METHODS =====================
  20. std::ostream &operator<<(std::ostream &stream, const MagneticDipole &ob) {
  21. stream << *(DipoleSource*)(&ob);
  22. return stream;
  23. }
  24. // ==================== LIFECYCLE =======================
  25. //--------------------------------------------------------------------------------------
  26. // Class: MagneticDipole
  27. // Method: MagneticDipole
  28. // Description: constructor (protected)
  29. //--------------------------------------------------------------------------------------
  30. MagneticDipole::MagneticDipole (const std::string& name) : DipoleSource(name) {
  31. } // ----- end of method MagneticDipole::MagneticDipole (constructor) -----
  32. //--------------------------------------------------------------------------------------
  33. // Class: MagneticDipole
  34. // Method: New()
  35. // Description: public constructor
  36. //--------------------------------------------------------------------------------------
  37. MagneticDipole* MagneticDipole::New() {
  38. MagneticDipole* Obj = new MagneticDipole("MagneticDipole");
  39. Obj->AttachTo(Obj);
  40. return Obj;
  41. }
  42. //--------------------------------------------------------------------------------------
  43. // Class: MagneticDipole
  44. // Method: ~MagneticDipole
  45. // Description: destructor (protected)
  46. //--------------------------------------------------------------------------------------
  47. MagneticDipole::~MagneticDipole () {
  48. } // ----- end of method MagneticDipole::~MagneticDipole (destructor) -----
  49. //--------------------------------------------------------------------------------------
  50. // Class: MagneticDipole
  51. // Method: Delete
  52. // Description: public destructor
  53. //--------------------------------------------------------------------------------------
  54. void MagneticDipole::Delete() {
  55. this->DetachFrom(this);
  56. }
  57. //--------------------------------------------------------------------------------------
  58. // Class: MagneticDipole
  59. // Method: Release
  60. // Description: destructor (protected)
  61. //--------------------------------------------------------------------------------------
  62. void MagneticDipole::Release() {
  63. delete this;
  64. }
  65. } // namespace Lemma