Main Lemma Repository
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 11/01/2016 02:24:11 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, Lemma Software, LLC
  16. */
  17. #include<random>
  18. #include<FDEM1D>
  19. using namespace Lemma;
  20. int main()
  21. {
  22. std::random_device rd;
  23. std::mt19937 gen(rd());
  24. // up to 11 layers
  25. std::discrete_distribution<> d({0,0,0,10,10,10,10,10,10,10,10,10,10});
  26. int np = d(gen);
  27. auto Obj = FieldPoints::NewSP();
  28. // fill with details
  29. Obj->SetNumberOfPoints(np);
  30. //void SetLocation(const int& nrec, const Real& xp, const Real& yp,
  31. // const Real& zp);
  32. YAML::Node node = Obj->Serialize();
  33. std::cout << node << std::endl;
  34. auto Obj2 = FieldPoints::DeSerialize(node);
  35. //std::cout << Obj2->GetNumberOfPoints() << std::endl;
  36. //std::cout << Obj->GetNumberOfPoints() << std::endl;
  37. }