Lemma is an Electromagnetics API
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // ===========================================================================
  2. //
  3. // Filename: uttemreader.cpp
  4. //
  5. // Description:
  6. //
  7. // Version: 0.0
  8. // Created: 02/19/2011 12:30:59 PM
  9. // Revision: none
  10. // Compiler: Tested with g++, icpc, and MSVC 2000
  11. //
  12. // Author: M. Andy Kass (MAK)
  13. //
  14. // Organisation: Colorado School of Mines (CSM)
  15. // Broken Spoke Brewery, LLC
  16. //
  17. // Email: mkass@numericalgeo.com
  18. //
  19. // This program is free software: you can redistribute it and/or modify
  20. // it under the terms of the GNU General Public License as published by
  21. // the Free Software Foundation, either version 3 of the License, or
  22. // (at your option) any later version.
  23. //
  24. // This program is distributed in the hope that it will be useful,
  25. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. // GNU General Public License for more details.
  28. //
  29. // You should have received a copy of the GNU General Public License
  30. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  31. //
  32. // ===========================================================================
  33. #include "Lemma"
  34. using namespace Lemma;
  35. int main() {
  36. /*
  37. ModelReaderTem1DUBC* Reader = ModelReaderTem1DUBC::New();
  38. PolygonalWireAntenna* Trans = PolygonalWireAntenna::New();
  39. ReceiverPoints *Receivers = ReceiverPoints::New();
  40. LayeredEarthEM *Earth = LayeredEarthEM::New();
  41. Reader->SetEMEarth1D(Earth);
  42. Reader->SetTransmitter(Trans);
  43. Reader->SetReceiver(Receivers);
  44. Reader->ReadParameters("em1dtmfwd.in");
  45. Reader->Delete();
  46. Earth->Delete();
  47. Receivers->Delete();
  48. Trans->Delete();
  49. */
  50. int rnObs;
  51. int rnGates;
  52. std::string inputfile;
  53. MatrixXr somedata;
  54. Vector3Xr somepositions;
  55. DataTEM* TheData = DataTEM::New();
  56. DataReaderTem* Reader = DataReaderTem::New();
  57. inputfile = "temreadertest.txt";
  58. Reader->SetDataTEM(TheData);
  59. Reader->ReadData(inputfile);
  60. rnObs = TheData->GetnObs();
  61. rnGates = TheData->GetnGates();
  62. somedata = TheData->GetData();
  63. somepositions = TheData->GetPositions();
  64. std::cout << rnObs << " " << rnGates << std::endl;
  65. std::cout << somedata << std::endl;
  66. std::cout << somepositions << std::endl;
  67. Reader->Delete();
  68. TheData->Delete();
  69. return EXIT_SUCCESS;
  70. }