26 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
36 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
47 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
58 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
67 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
76 RLayout.checkin(*
this);
81 for (i = 0; i <
Dim; ++i)
82 SwapNodeList[i] =
new bool[N];
83 PutList =
new std::vector<size_t>[N];
87 NodeCount =
new size_t[N];
88 EmptyNode =
new bool[N];
89 for (i = 0; i < N; ++i)
99 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
105 delete [] SwapMsgList;
106 for (
unsigned int i=0; i <
Dim; i++)
107 delete [] (SwapNodeList[i]);
111 RLayout.checkout(*
this);
120 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy>
128 size_t LocalNum = PData.getLocalNum();
129 size_t DestroyNum = PData.getDestroyNum();
138 PData.performDestroy();
139 LocalNum -= DestroyNum;
143 if ( ! RLayout.initialized())
144 rebuild_layout(LocalNum,PData);
148 this->apply_bconds(LocalNum, PData.R,
this->getBConds(), RLayout.getDomain());
151 this->updateCacheInformation(*
this);
165 LocalNum = new_swap_particles(LocalNum, PData);
167 LocalNum = new_swap_particles(LocalNum, PData, *canSwap);
173 TotalNum = NodeCount[myN] = LocalNum;
195 recmsg->
get(NodeCount);
196 recmsg->
get(TotalNum);
202 int notrecvd = N - 1;
209 size_t remNodeCount = 0;
210 recmsg->
get(remNodeCount);
215 TotalNum += remNodeCount;
216 NodeCount[node] = remNodeCount;
221 msg->
put(NodeCount, NodeCount + N);
228 PData.setTotalNum(TotalNum);
229 PData.setLocalNum(LocalNum);
232 this->updateGhostParticles(PData, *
this);
244 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
245 std::ostream& operator<<(std::ostream& out, const ParticleSpatialLayout<T,Dim,Mesh,CachingPolicy>&
L)
248 out <<
"ParticleSpatialLayout, with particle distribution:\n ";
250 out <<
"Number of particles " <<
L.getNodeCount(i) <<
" ";
251 out <<
"\nSpatialLayout decomposition = " <<
L.getLayout();
258 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
262 o <<
"PSpatial: distrib = ";
264 o << NodeCount[i] <<
" ";
272 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
281 template <
class T,
unsigned Dim,
class Mesh,
class CachingPolicy >
Message & put(const T &val)
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent this
Message * receive_block(int &node, int &tag)
virtual void notifyUserOfDelete(UserList *)
virtual void Repartition(UserList *)
int next_tag(int t, int s=1000)
void printDebug(Inform &)
Message & get(const T &cval)
virtual int broadcast_others(Message *, int, bool delmsg=true)
#define P_SPATIAL_RETURN_TAG
clearpage the user may choose between constant or variable radius This model includes fringe fields L
void update(IpplParticleBase< ParticleSpatialLayout< T, Dim, Mesh, CachingPolicy > > &p, const ParticleAttrib< char > *canSwap=0)
static Communicate * Comm
#define P_SPATIAL_LAYOUT_TAG
bool send(Message *, int node, int tag, bool delmsg=true)