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.

utreadfemubc.cpp 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // ===========================================================================
  2. //
  3. // Filename: utreadfemubc.cpp
  4. //
  5. // Description:
  6. //
  7. // Version: 0.0
  8. // Created: 01/03/2013 02:47:24 PM
  9. // Revision: none
  10. // Compiler: Tested with g++
  11. //
  12. // Author: M. Andy Kass (MAK)
  13. //
  14. // Organisation: Broken Spoke Development, LLC
  15. //
  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. #ifdef LEMMAUSEVTK
  36. #include "matplot.h"
  37. using namespace matplot;
  38. #endif
  39. int main() {
  40. std::string datfile;
  41. datfile = "126.obs";
  42. DataReaderFemUBC* Reader = DataReaderFemUBC::New();
  43. DataFEM* thedata = DataFEM::New();
  44. Reader->SetDataFEM(thedata);
  45. try {
  46. Reader->ReadData(datfile,1);
  47. } catch(std::exception& e) {
  48. exit(EXIT_FAILURE);
  49. }
  50. std::cout << *Reader << std::endl;
  51. std::cout << *thedata << std::endl;
  52. thedata->Delete();
  53. Reader->Delete();
  54. return EXIT_SUCCESS;
  55. }