13 template<
typename P,
typename I>
22 template<
typename P,
typename InteractionType>
28 console.
XDebug() <<
"PIS_E::updating\n";
29 typename list<InteractionType>::iterator iter = this->m_interactions.begin();
30 while (iter != this->m_interactions.end()){
33 typename list<InteractionType>::iterator er_iter=iter;
35 vector<int> pids=iter->getAllID();
36 this->m_set.erase(make_pair(pids[0],pids[1]));
39 this->m_interactions.erase(er_iter);
45 console.
XDebug() <<
"PIS_E::not updating\n";
54 template<
typename P,
typename InteractionType>
57 const std::string delim =
"\n";
58 typedef typename InteractionType::CheckPointable CheckPointable;
61 this->getInnerInteractionIterator();
62 oStream << InteractionType::getType() << delim;
63 oStream << it.getNumRemaining();
66 CheckPointable(it.next()).saveCheckPointData(oStream);
70 CheckPointable(it.next()).saveCheckPointData(oStream);
78 template<
typename P,
typename InteractionType>
81 const std::string delim =
"\n";
85 this->getInnerInteractionIterator();
86 oStream << InteractionType::getType() << delim;
87 oStream << it.getNumRemaining();
90 it.next().saveRestartData(oStream);
94 it.next().saveRestartData(oStream);
106 template<
typename P,
typename InteractionType>
110 std::string cp_interaction_type;
111 iStream >> cp_interaction_type;
114 if(cp_interaction_type!=InteractionType::getType()){
115 std::cerr <<
"interaction types differ between checkpoint "
116 << cp_interaction_type <<
" and scipt "
117 << InteractionType::getType() << std::endl;
122 std::cerr <<
"reading " << nconn <<
" " << InteractionType::getType() <<
" interactions " << std::endl;
127 for(
int i=0;i<nconn;i++){
128 InteractionType new_bond;
130 new_bond.loadRestartData(iStream);
132 vector<int> pids=new_bond.getAllID();
135 if((ptr1!=NULL) && (ptr2!=NULL)){
136 new_bond.setPP(ptr1,ptr2);
138 std::cerr <<
"trying to insert bond: particles with Id " << pids[0] <<
" , " << pids[1] <<
"not present!" << std::endl;
141 this->tryInsert(new_bond);
146 template<
typename P,
typename InteractionType>
150 <<
"calculating " << this->m_interactions.size()
151 <<
" heat interaction transfers\n" ;
154 typename list<InteractionType>::iterator it = this->m_interactions.begin();
155 it != this->m_interactions.end();
167 template<
typename P,
typename InteractionType>