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.

test.cpp 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 01/15/2016 09:54:13 PM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email tirons@egi.utah.edu
  14. * @copyright Copyright (c) 2016, University of Utah
  15. * @copyright Copyright (c) 2016, Trevor Irons & Lemma Software, LLC
  16. */
  17. #include <iostream>
  18. #include "LemmaConfig.h"
  19. #include "lemma.h"
  20. #include "dipolesource.h"
  21. using namespace Lemma;
  22. int main() {
  23. std::cout << "Hello Lemma " << LEMMA_VERSION_MAJOR << "\t" << LEMMA_VERSION_MINOR << std::endl;
  24. // std::cout << "thingy()\t" << thingy() << std::endl;
  25. // Test with a single dipole
  26. DipoleSource *dipole = DipoleSource::New();
  27. dipole->SetType(GROUNDEDELECTRICDIPOLE);
  28. //dipole->SetPolarisation(1., 0.0, 1.0);
  29. // dipole->SetPolarisation(XPOLARISATION);
  30. dipole->SetPolarisation(YPOLARISATION);
  31. //dipole->SetPolarisation(ZPOLARISATION);
  32. /////////////
  33. //dipole->SetType(MAGNETICDIPOLE);
  34. //dipole->SetPolarisation(0., 0.0, 1.0);
  35. //dipole->SetPolarisation(XPOLARISATION);
  36. //dipole->SetPolarisation(YPOLARISATION);
  37. //dipole->SetPolarisation(ZPOLARISATION);
  38. //dipole->SetMoment(1);
  39. //dipole->SetLocation(1,1,-.0100328);
  40. dipole->SetLocation(0., 0., -0.001);
  41. //dipole->SetLocation(-2.5,1.25,0);
  42. dipole->SetNumberOfFrequencies(1);
  43. dipole->SetFrequency(0, 2e7);
  44. std::cout << *dipole << std::endl;
  45. }