ESyS-Particle  2.3.2
VectorParticleFieldSlave.hpp
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
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 //-- STL includes --
14 #include <vector>
15 #include <utility>
16 
17 using std::vector;
18 using std::pair;
19 
20 // -- IO includes --
21 #include <iostream>
22 
23 using std::cout;
24 using std::endl;
25 
33 template <typename T>
35 {
36  m_ppa=ppa;
37  m_rdf=rdf;
38 }
39 
43 template <typename T>
45 {
46  vector<pair<int,Vec3> > data_vec;
47  vector<pair<int,Vec3> > pos_vec;
48 
49  data_vec=m_ppa->forAllInnerParticlesGetIndexed(m_rdf);
50  pos_vec=m_ppa->forAllInnerParticlesGetIndexed(typename T::VectorFieldFunction(&T::getPos));
51 
52  // send data to master
53  m_comm->send_gather(data_vec,0);
54  m_comm->send_gather(pos_vec,0);
55 }