ESyS-Particle
4.0.1
|
00001 00002 // // 00003 // Copyright (c) 2003-2011 by The University of Queensland // 00004 // Earth Systems Science Computational Centre (ESSCC) // 00005 // http://www.uq.edu.au/esscc // 00006 // // 00007 // Primary Business: Brisbane, Queensland, Australia // 00008 // Licensed under the Open Software License version 3.0 // 00009 // http://www.opensource.org/licenses/osl-3.0.php // 00010 // // 00012 00013 #ifndef ESYS_LSMGRAIN_H 00014 #define ESYS_LSMGRAIN_H 00015 00016 #include "Geometry/ParticleCollection.h" 00017 00018 namespace esys 00019 { 00020 namespace lsm 00021 { 00025 template <typename TmplParticleCollection> 00026 class Grain : public TmplParticleCollection 00027 { 00028 public: 00029 typedef TmplParticleCollection Inherited; 00030 typedef Inherited ParticleCollection; 00031 typedef typename Inherited::Particle Particle; 00032 typedef typename Inherited::ParticlePool ParticlePool; 00033 typedef typename Inherited::ParticlePoolPtr ParticlePoolPtr; 00034 typedef typename Inherited::ParticleIterator ParticleIterator; 00035 typedef typename Inherited::ParticleConstIterator ParticleConstIterator; 00036 typedef long Id; 00037 00038 Grain(); 00039 00040 Grain(Id id); 00041 00042 Grain(ParticlePoolPtr particlePoolPtr); 00043 00044 Grain(Id id, ParticlePoolPtr particlePoolPtr); 00045 00046 Grain(const Grain &g); 00047 00048 Grain &operator=(const Grain &g); 00049 00050 Id getId() const; 00051 00052 void setId(Id id); 00053 00054 void setParticleIds(typename Particle::Id minId); 00055 00056 private: 00057 Id m_id; 00058 }; 00059 } 00060 } 00061 00062 #include "Geometry/Grain.hpp" 00063 00064 #endif