00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef PARTICLE_UNIFORM_LAYOUT_H
00012 #define PARTICLE_UNIFORM_LAYOUT_H
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "Particle/ParticleLayout.h"
00025 #include "Particle/ParticleBase.h"
00026
00027 #ifdef IPPL_USE_STANDARD_HEADERS
00028 #include <iostream>
00029 using namespace std;
00030 #else
00031 #include <iostream.h>
00032 #endif
00033
00034
00035 class Inform;
00036 template<class T, unsigned Dim> class ParticleUniformLayout;
00037 template<class T, unsigned Dim>
00038 ostream& operator<<(ostream&, const ParticleUniformLayout<T,Dim>&);
00039
00040
00041
00042
00043 template<class T, unsigned Dim>
00044 class ParticleUniformLayout : public ParticleLayout<T, Dim> {
00045
00046 public:
00047
00048 typedef int pair_t;
00049 typedef pair_t* pair_iterator;
00050
00051 typedef typename ParticleLayout<T, Dim>::SingleParticlePos_t
00052 SingleParticlePos_t;
00053 typedef typename ParticleLayout<T, Dim>::Index_t Index_t;
00054
00055
00056 typedef ParticleAttrib<SingleParticlePos_t> ParticlePos_t;
00057 typedef ParticleAttrib<Index_t> ParticleIndex_t;
00058
00059 public:
00060
00061 ParticleUniformLayout();
00062 ~ParticleUniformLayout();
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 void update(ParticleBase< ParticleUniformLayout<T,Dim> >& p,
00073 const ParticleAttrib<char>* canSwap = 0);
00074
00075
00076
00077
00078
00079
00080 void printDebug(Inform&);
00081
00082 private:
00083
00084 int *LocalSize;
00085 int *Change;
00086 int *MsgCount;
00087 };
00088
00089 #include "Particle/ParticleUniformLayout.cpp"
00090
00091 #endif // PARTICLE_UNIFORM_LAYOUT_H
00092
00093
00094
00095
00096
00097