Discrete Element Methods (Alpha)
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.

DEMGrain.cpp 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 05/31/2016 12:27:49 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 "LemmaCore"
  18. #include "DEM4Core"
  19. using namespace Lemma;
  20. int main()
  21. {
  22. auto Grain = DEMGrain::NewSP();
  23. Grain->SetCentreMass( (Vector3r() << 2.254,3.14,4.).finished() );
  24. Grain->RandomPointCloud(5, 0.0023);
  25. std::cout << *Grain << std::endl;
  26. // YAML::Node ng = Grain->Serialize();
  27. // auto Grain3 = DEMGrain::NewSP();
  28. // std::cout << Grain3->GetName() << std::endl;
  29. // std::cout << ((DEMParticle*)(Grain3.get()))->GetName() << std::endl;
  30. //
  31. // auto Grain4 = DEMParticle::NewSP();
  32. // std::cout << Grain4->GetName() << std::endl;
  33. //Vector3r pos; pos << 2,3,4;
  34. //Grain->SetCentreMass( pos );
  35. //auto Grain2 = DEMParticle::DeSerialize(ng);
  36. //std::cout << *Grain2 << std::endl;
  37. /*
  38. if ( *Grain2 != *Grain) {
  39. std::cout << "Not Equal" << std::endl;
  40. }
  41. */
  42. }