ESyS-Particle  4.0.1
ParticleGenerator.h
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 
00014 #ifndef ESYS_LSMPARTICLEGENERATOR_H
00015 #define ESYS_LSMPARTICLEGENERATOR_H
00016 
00017 #include "Geometry/SimpleParticle.h"
00018 #include "Geometry/CircularNeighbourTable.h"
00019 
00020 #include <boost/pool/object_pool.hpp>
00021 
00022 namespace esys
00023 {
00024   namespace lsm
00025   {
00029     class ParticleGenerator
00030     {
00031     public:
00032       typedef CircularNeighbourTable<SimpleParticle> NTable;
00033       typedef boost::object_pool<SimpleParticle>     ParticlePool;
00034       
00035       ParticleGenerator(NTable &nTable, ParticlePool &particlePool);
00036 
00037       virtual ~ParticleGenerator();
00038 
00039       virtual void generate() = 0;
00040       
00041     protected:
00042       ParticleGenerator();
00043       
00044       NTable &getNTable();
00045       const NTable &getNTable() const;
00046       
00047       ParticlePool &getParticlePool();
00048       const ParticlePool &getParticlePool() const;
00049     private:
00050       NTable       *m_pNTable;
00051       ParticlePool *m_pParticlePool;
00052     };
00053   };
00054 };
00055 
00056 #endif