13 #ifndef __PARALLEL_PARTICLE_ARRAY_H
14 #define __PARALLEL_PARTICLE_ARRAY_H
20 #include "ntable/src/ntable.h"
21 #include "ntable/src/nt_block.h"
22 #include "tml/comm/comm.h"
23 #include "tml/comm/cart_comm.h"
24 #include "Foundation/vec3.h"
25 #include "Geometry/Triangle.h"
26 #include "Geometry/AEdge.h"
60 virtual set<int> getBoundarySlabIds(
int,
int)
const=0;
61 virtual set<int> get2ndSlabIds(
int,
int)
const=0;
64 virtual bool isInInner(
const Vec3&)=0;
77 typedef T_Handle<typename NeighborTable<T>::pairlist> PairListHandle;
78 typedef typename NeighborTable<T>::pairlist::iterator PairListIterator;
79 typedef T_Handle<typename NeighborTable<T>::particlelist> ParticleListHandle;
80 typedef typename NeighborTable<T>::particlelist::iterator ParticleListIterator;
83 NeighborTable<T>* m_nt;
84 Vec3 m_minpos,m_maxpos;
85 double m_xshift,m_yshift,m_zshift;
86 bool m_circ_edge_x_up,m_circ_edge_x_down;
87 static const int m_exchg_tag;
90 template<
typename P>
void exchange_single(P (T::*rdf)(),
void (T::*wrtf)(
const P&),NTSlab<T>,NTSlab<T>,
int,
int);
100 Vec3 getMinPos()
const {
return m_minpos;};
101 Vec3 getMaxPos()
const {
return m_maxpos;};
102 vector<int> getCommCoords()
const {
return m_comm.
get_coords();};
103 vector<int> getCommDims()
const {
return m_comm.
get_all_dims();};
104 int size(){
return m_nt->size();};
105 int getInnerSize(){
return (m_nt->inner()).size();};
109 void insert(
const vector<T>&);
123 template<
typename P>
void exchange(P (T::*rdf)(),
void (T::*wrtf)(
const P&));
127 template <
typename P>
void forParticle(
int,
void (T::*rdf)(P),
const P&);
131 template <
typename P>
void forParticleTag(
int,
void (T::*rdf)(P),
const P&);
138 template <
typename P>
void forAllParticles(
void (T::*rdf)(P),
const P&);
146 typedef NTBlock<T> NtBlock;
148 typedef typename NtBlock::iterator BlockIterator;
152 bool hasNext()
const;
156 int getNumRemaining()
const;
167 template <
typename P>
void forAllParticlesGet(P&,
typename P::value_type (T::*rdf)()
const);
179 template <
typename P>
void forPointsGetNearest(P&,
typename P::value_type (T::*rdf)()
const,
const Vec3&,
double,
double,
double,
int,
int,
int);
209 template <
typename TT>
210 friend ostream& operator<<(ostream &, const ParallelParticleArray<TT> &);
213 #include "ppa/src/pp_array.hpp"
215 #endif //__PARALLEL_PARTICLE_ARRAY_H