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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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:09:04 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. * @copyright Copyright (c) 2018, Trevor Irons
  17. */
  18. #include "AEMSurvey.h"
  19. namespace Lemma {
  20. // ==================== FRIEND METHODS =====================
  21. std::ostream &operator<<(std::ostream &stream, const AEMSurvey &ob) {
  22. stream << ob.Serialize() << "\n";
  23. return stream;
  24. }
  25. // ==================== LIFECYCLE =======================
  26. //--------------------------------------------------------------------------------------
  27. // Class: AEMSurvey
  28. // Method: AEMSurvey
  29. // Description: constructor (protected)
  30. //--------------------------------------------------------------------------------------
  31. AEMSurvey::AEMSurvey (const ctor_key& key) : LemmaObject(key) {
  32. } // ----- end of method AEMSurvey::AEMSurvey (constructor) -----
  33. //--------------------------------------------------------------------------------------
  34. // Class: AEMSurvey
  35. // Method: NewSP()
  36. // Description: public constructor
  37. //--------------------------------------------------------------------------------------
  38. std::shared_ptr<AEMSurvey> AEMSurvey::NewSP() {
  39. return std::make_shared<AEMSurvey>(ctor_key());
  40. }
  41. //--------------------------------------------------------------------------------------
  42. // Class: AEMSurvey
  43. // Method: ~AEMSurvey
  44. // Description: destructor (protected)
  45. //--------------------------------------------------------------------------------------
  46. AEMSurvey::~AEMSurvey () {
  47. } // ----- end of method AEMSurvey::~AEMSurvey (destructor) -----
  48. //--------------------------------------------------------------------------------------
  49. // Class: AEMSurvey
  50. // Method: GetSource
  51. //--------------------------------------------------------------------------------------
  52. std::shared_ptr<DipoleSource> AEMSurvey::GetSource ( const int& isource ) {
  53. return Sources[isource] ;
  54. } // ----- end of method AEMSurvey::GetSource -----
  55. //--------------------------------------------------------------------------------------
  56. // Class: AEMSurvey
  57. // Method: GetFrequencies
  58. //--------------------------------------------------------------------------------------
  59. VectorXr AEMSurvey::GetFrequencies ( ) {
  60. return Freqs;
  61. } // ----- end of method AEMSurvey::GetFrequencies -----
  62. //--------------------------------------------------------------------------------------
  63. // Class: AEMSurvey
  64. // Method: GetNumberOfSources
  65. //--------------------------------------------------------------------------------------
  66. int AEMSurvey::GetNumberOfSources ( ) {
  67. return static_cast<int>(Sources.size());
  68. } // ----- end of method AEMSurvey::GetNumberOfSources -----
  69. } // ----- end of Lemma name -----