13 template<
typename P,
typename I>
22 template<
typename P,
typename InteractionType>
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);
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;
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;
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();
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>
virtual bool update()
Definition: pi_storage_eb.hpp:23
int getNumRemaining()
Definition: pi_storage.hpp:69
void setUnbreakable(bool)
Definition: pi_storage_eb.hpp:168
boost::python::object iter(const boost::python::object &pyOb)
Definition: Util.h:25
parrallel particle storage array with neighborsearch and variable exchange
Definition: SubLattice.h:61
virtual void calcHeatTrans()
Definition: pi_storage_eb.hpp:147
T * getParticlePtrByIndex(int)
Definition: pp_array.hpp:220
Definition: pi_storage.h:102
virtual void saveSnapShotData(std::ostream &)
Definition: pi_storage_eb.hpp:55
virtual void loadCheckPointData(std::istream &iStream)
Definition: pi_storage_eb.hpp:107
bool m_unbreakable
Definition: pi_storage_eb.h:35
bool hasNext()
Definition: pi_storage.hpp:50
#define NULL
Definition: t_list.h:17
BasicCon & XDebug(bool h=true)
set verbose level of next message to "xdg"
Definition: console.cpp:316
BasicCon & Debug(bool h=true)
set verbose level of next message to "dbg"
Definition: console.cpp:305
parallel interaction storage array with exchange
Definition: pi_storage_e.h:36
abstract base class for parallel particle storage array
Definition: pp_array.h:41
ParallelInteractionStorage_EB(AParallelParticleArray *, const typename I::ParameterType &)
Definition: pi_storage_eb.hpp:14
Interaction & next()
Definition: pi_storage.hpp:57
virtual void saveCheckPointData(std::ostream &oStream)
Definition: pi_storage_eb.hpp:79