1234567891011121314151617181920212223242526272829303132333435363738394041 |
- /* This file is part of Lemma, a geophysical modelling and inversion API.
- * More information is available at http://lemmasoftware.org
- */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
- /**
- * @file
- * @date 05/31/2016 12:27:49 PM
- * @version $Id$
- * @author Trevor Irons (ti)
- * @email tirons@egi.utah.edu
- * @copyright Copyright (c) 2016, University of Utah
- * @copyright Copyright (c) 2016, Lemma Software, LLC
- */
-
- #include "LemmaCore"
- #include "DEM4Core"
- using namespace Lemma;
- int main()
- {
- auto Grain = DEMParticle::NewSP();
- Grain->SetCentreMass( (Vector3r() << 2,3,4).finished() );
- std::cout << *Grain << std::endl;
- YAML::Node ng = Grain->Serialize();
-
- //Vector3r pos; pos << 2,3,4;
-
- //Grain->SetCentreMass( pos );
-
- auto Grain2 = DEMParticle::DeSerialize(ng);
- std::cout << *Grain2 << std::endl;
-
- if ( Grain2 != Grain) {
- std::cout << "Not Equal" << std::endl;
- }
- }
|