ESyS-Particle  4.0.1
InteractionFieldSlave.hpp
1 
2 // //
3 // Copyright (c) 2003-2011 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #include "field_const.h"
14 
15 
16 template <typename T>
18 {
19  m_pis=pis;
20 }
21 
22 
27 template <typename T>
29 {
30  // debug output
31  console.XDebug() << "InteractionFieldSlave<T>::sendData()\n";
32 
33  int coll_type;
34  m_comm->recv_broadcast(coll_type,0);
35 
36  // debug output
37  console.XDebug() << "received coll_type=" << coll_type << "\n";
38 
39  switch(coll_type){
40  case COLL_TYPE_FULL : SendDataFull();break;
41  case COLL_TYPE_SUM : SendDataSum();break;
42  case COLL_TYPE_MAX : SendDataMax();break;
43  case COLL_TYPE_FULL2 : SendDataFull2();break;
44  case COLL_TYPE_FULL_WITH_ID : SendDataWithID();break;
45  case COLL_TYPE_FULL_WITH_POS_ID : SendDataWithPosID();break;
46 
47  default: std::cerr << "unknown collection type" << std::endl;
48  }
49 }