123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- /* 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 01:31:28 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
- */
-
- #ifndef DEMPARTICLE_INC
- #define DEMPARTICLE_INC
-
- #include "LemmaObject.h"
-
- namespace Lemma {
-
- /**
- \brief
- \details
- */
- class DEMParticle : public LemmaObject {
-
- friend std::ostream &operator<<(std::ostream &stream,
- const DEMParticle &ob);
-
- public:
-
- // ==================== LIFECYCLE =======================
-
- /**
- * Factory method for generating concrete class.
- * @return a std::shared_ptr of type DEMParticle
- */
- static std::shared_ptr< DEMParticle > NewSP();
-
- /**
- * Uses YAML to serialize this object.
- * @return a YAML::Node
- */
- YAML::Node Serialize() const;
-
- /**
- * Constructs an object from a YAML::Node.
- */
- static std::shared_ptr< DEMParticle > DeSerialize(const YAML::Node& node);
-
- // ==================== OPERATORS =======================
-
- // ==================== OPERATIONS =======================
-
- // ==================== ACCESS =======================
-
- void SetCentreMass( const Vector3r& pos );
-
- /** Accessor to centre of Mass */
- Vector3r GetCentreMass( );
-
- /** Convience accessor to a single corrdinate of the centre of mass
- */
- Real GetCentreMass( const int& icord );
-
- // ==================== INQUIRY =======================
- /** Returns the name of the underlying class, similiar to Python's type */
- virtual inline std::string GetName() const {
- return this->CName;
- }
-
- protected:
-
- // ==================== LIFECYCLE =======================
-
- /** Default protected constructor, use New */
- DEMParticle ( );
-
- /** Protected DeDerializing constructor, use factory DeSerialize method*/
- DEMParticle (const YAML::Node& node);
-
- /** Default protected destructor, use Delete */
- ~DEMParticle ();
-
- private:
-
-
- /** ASCII string representation of the class name */
- static constexpr auto CName = "DEMParticle";
-
- // ==================== DATA MEMBERS =========================
-
- Vector3r centreMass;
-
- }; // ----- end of class DEMParticle -----
-
- } // ----- end of Lemma name -----
-
- #endif // ----- #ifndef DEMPARTICLE_INC -----
-
- /* vim: set tabstop=4 expandtab: */
- /* vim: set filetype=cpp: */
|