1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
/////////////////////////////////////////////////////////////
// //
// Copyright (c) 2003-2014 by The University of Queensland //
// Centre for Geoscience Computing //
// http://earth.uq.edu.au/centre-geoscience-computing //
// //
// Primary Business: Brisbane, Queensland, Australia //
// Licensed under the Open Software License version 3.0 //
// http://www.apache.org/licenses/LICENSE-2.0 //
// //
/////////////////////////////////////////////////////////////
#ifndef ESYS_LSMLATTICEPARAM_H
#define ESYS_LSMLATTICEPARAM_H
class AMPIBuffer;
#include <vector>
#include <string>
#include <iostream>
namespace esys
{
namespace lsm
{
/**
* Parameters for the sublattice.
*/
class CLatticeParam
{
public:
typedef std::vector<unsigned int> ProcessDims;
CLatticeParam(
const std::string &particleType,
double nrange,
double alpha,
const ProcessDims &dims = ProcessDims(3, 0)
);
void setSearchRange(double nr,double a){m_nrange=nr;m_alpha=a;};
void setParticleType(const std::string& pt){m_particle_type=pt;}
void packInto(AMPIBuffer*) const;
double nrange()const {return m_nrange;};
double alpha()const {return m_alpha;};
const ProcessDims &processDims() const {return m_dims;}
const std::string &particle_type() const {return m_particle_type;};
friend std::ostream& operator<<(std::ostream &oStream,const CLatticeParam &prms);
static CLatticeParam extractLatticeParam(AMPIBuffer *pBuff);
protected:
std::string m_particle_type;
double m_alpha; //!< pair creation cutoff
double m_nrange; //!< searchrange
ProcessDims m_dims;
};
}
}
#endif
|