ESyS-Particle  4.0.1
LatticeParam.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 #ifndef ESYS_LSMLATTICEPARAM_H
00014 #define ESYS_LSMLATTICEPARAM_H
00015 
00016 class AMPIBuffer;
00017 
00018 #include <vector>
00019 #include <string>
00020 #include <iostream>
00021 
00022 namespace esys
00023 {
00024   namespace lsm
00025   {
00029     class CLatticeParam
00030     {
00031      public:
00032       typedef std::vector<unsigned int> ProcessDims;
00033       CLatticeParam(
00034         const std::string &particleType,
00035         double nrange,
00036         double alpha,
00037         const ProcessDims &dims = ProcessDims(3, 0)
00038       );
00039       void setSearchRange(double nr,double a){m_nrange=nr;m_alpha=a;};
00040       void setParticleType(const std::string& pt){m_particle_type=pt;}
00041       void packInto(AMPIBuffer*) const;
00042       double nrange()const {return m_nrange;};
00043       double alpha()const {return m_alpha;};
00044       const ProcessDims &processDims() const {return m_dims;}
00045       const std::string &particle_type() const {return m_particle_type;};
00046       friend std::ostream& operator<<(std::ostream &oStream,const CLatticeParam &prms);
00047 
00048       static CLatticeParam extractLatticeParam(AMPIBuffer *pBuff);
00049 
00050      protected:
00051       std::string m_particle_type;
00052       double      m_alpha;  
00053       double      m_nrange; 
00054       ProcessDims m_dims;
00055     };
00056   };
00057 };
00058 
00059 #endif