13 template<
typename P,
typename I>
33 template<
typename T,
typename InteractionType>
36 console.
XDebug() <<
"ParallelInteractionStorage_ED_T::update at node " << this->m_comm.rank() <<
"\n";
41 if (this->m_update_timestamp != this->m_ppa->getTimeStamp()){
42 console.
XDebug() <<
"node " << this->m_comm.rank() <<
" ppa has been rebuilt\n";
44 typename list<InteractionType>::iterator iter = this->m_interactions.begin();
45 while(iter != this->m_interactions.end()){
46 if(iter->isPersistent()){
50 typename list<InteractionType>::iterator er_iter=iter;
52 vector<int> rm_pids=iter->getAllID();
53 this->m_set.erase(make_pair(rm_pids[0],rm_pids[1]));
55 this->m_interactions.erase(er_iter);
59 typename ParallelParticleArray<T>::PairListHandle plh =
62 for(
typename ParallelParticleArray<T>::PairListIterator iter=plh->begin();
67 int t1=iter->first->getTag();
68 int t2=iter->second->getTag();
76 if(((t1 & m_mask1)==(m_tag1 & m_mask1)) && ((t2 & m_mask2)==(m_tag2 & m_mask2))){
80 int id1=iter->first->getID();
81 int id2=iter->second->getID();
84 if(this->m_exIG!=NULL){
85 if((!(this->m_exIG)->isIn(tv))&&(!this->isIn(tv))){
86 this->m_interactions.push_back(InteractionType(iter->first,iter->second,this->m_param));
87 this->m_set.insert(make_pair(id1,id2));
90 }
else if (!(this->isIn(tv))) {
91 this->m_interactions.push_back(InteractionType(iter->first,iter->second,this->m_param));
92 this->m_set.insert(make_pair(id1,id2));
97 console.
XDebug() <<
"node " << this->m_comm.rank() <<
" ppa not rebuilt\n";
99 typename ParallelParticleArray<T>::PairListHandle plh =
102 typename ParallelParticleArray<T>::PairListIterator iter=plh->begin();
108 int t1=iter->first->getTag();
109 int t2=iter->second->getTag();
117 if(((t1 & m_mask1)==(m_tag1 & m_mask1)) && ((t2 & m_mask2)==(m_tag2 & m_mask2))){
121 int id1=iter->first->getID();
122 int id2=iter->second->getID();
125 if(this->m_exIG!=NULL){
126 if((!(this->m_exIG)->isIn(tv))&&(!(this->isIn(tv)))) {
127 this->m_interactions.push_back(InteractionType(iter->first,iter->second, this->m_param));
128 this->m_set.insert(make_pair(id1,id2));
131 }
else if (!(this->isIn(tv))) {
132 this->m_interactions.push_back(InteractionType(iter->first,iter->second,this->m_param));
133 this->m_set.insert(make_pair(id1,id2));
138 this->m_update_timestamp = this->m_ppa->getTimeStamp();
140 console.
Debug() <<
"added " << count_l <<
" pairs to ParallelInteractionStorage_ED_T\n";