ESyS-Particle  2.3.2
InteractionFieldMaster.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 __INTERACTIONFIELDMASTER_H
14 #define __INTERACTIONFIELDMASTER_H
15 
16 //--- project includes ---
17 #include "FieldMaster.h"
18 #include "vec3.h"
19 #include "Foundation/quintuple.h"
20 #include "Foundation/triplet.h"
21 
22 //--- STL includes ---
23 #include <vector>
24 
25 using std::vector;
26 
27 //class TML_Comm;
28 
38 {
39  public:
40  typedef std::pair<esys::lsm::quintuple<Vec3,double,Vec3,double,Vec3>, double> IVecData2;
41  typedef std::pair<esys::lsm::triplet<int,int,Vec3>, double> DataWithID;
42  typedef std::pair<esys::lsm::quintuple<int,int,Vec3,Vec3,Vec3>, double> DataWithPosID;
43 
44  protected:
45  vector<IVecData2> m_data2; // vector of <pos1,radius1,pos2,radius2,ipos,value> groups
46  vector<DataWithID> m_data_with_id;
47  vector<DataWithPosID> m_data_with_pos_id;
48  vector<pair<Vec3,double> > m_data; // vector of <position,value> pairs
49  vector<double> m_sum_vec;
50 
51  virtual void writeAsDX();
52  virtual void writeAsSUM();
53  virtual void writeAsMAX();
54  virtual void writeAsRAW_SERIES();
55  virtual void writeAsRAW2();
56  virtual void writeAsRAW();
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  ScalarInteractionFieldMaster(TML_Comm*,const string&,const string&,const string&,const string&,const string&,int,int,int,bool);
69  ScalarInteractionFieldMaster(TML_Comm*,const string&,const string&,const string&,const string&,const string&,int,int,int,int,int,bool);
71 
72  void collect();
73  };
74 
75 #endif //__INTERACTIONFIELDMASTER_H