ESyS-Particle  2.3.2
VectorInteractionFieldMaster.h
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 #ifndef __VECTORINTERACTIONFIELDMASTER_H
14 #define __VECTORINTERACTIONFIELDMASTER_H
15 
16 //--- project includes ---
17 #include "FieldMaster.h"
18 #include "Foundation/vec3.h"
19 #include "Foundation/quintuple.h"
20 
21 //--- STL includes ---
22 #include <map>
23 #include <vector>
24 #include <iostream>
25 
26 using std::map;
27 using std::vector;
28 
38 {
39  public:
40  typedef std::pair<esys::lsm::quintuple<Vec3,double,Vec3,double,Vec3>, Vec3> IVecData2;
41  typedef std::pair<esys::lsm::triplet<int,int,Vec3>, Vec3> DataWithID;
42  typedef std::pair<esys::lsm::quintuple<int,int,Vec3,Vec3,Vec3>, Vec3> DataWithPosID;
43 
44 
45  protected:
46  vector<IVecData2> m_data2; // vector of <pos1,radius1,pos2,radius2,ipos,value> groups
47  vector<DataWithID> m_data_with_id;
48  vector<DataWithPosID> m_data_with_pos_id;
49  vector<pair<Vec3,Vec3> > m_data; // vector of <position,value> pairs
50  vector<Vec3> m_sum_vec;
51 
52  virtual void writeAsDX();
53  virtual void writeAsSUM();
54  virtual void writeAsMAX(){};
55  virtual void writeAsRAW_SERIES(){};
56  virtual void writeAsRAW2();
57  virtual void writeAsRawWithID();
58  virtual void writeAsRawWithPosID();
59 
60  void collectFull();
61  void collectSum();
62  void collectMax();
63  void collectFull2();
64  void collectFullWithID();
65  void collectFullWithPosID();
66 
67  public:
68  VectorInteractionFieldMaster(TML_Comm*,const string&,const string&,const string&,const string&,const string&,int,int,int,bool);
70 
71  virtual void collect();
72 };
73 
74 #endif // __VECTORINTERACTIONFIELDMASTER_H