NAMD
ComputeMoa.h
Go to the documentation of this file.
1 /* *
2  * *** Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by
3  * *** The Board of Trustees of the University of Illinois.
4  * *** All rights reserved.
5  * **
6  * =====================================================================================
7  *
8  * Filename: ComputeMoa.h
9  *
10  * Description:
11  *
12  * Version: Stub File
13  * Created: 03/08/2012 03:55:27 PM
14  * Revision:
15  * Compiler: charm++
16  *
17  * Author: Christopher B Harrison, Ph.D.
18  * Email: charris5@gmail.com, char1@illinois.edu, char@ks.uiuc.edu
19  * Company:
20  *
21  * =====================================================================================
22  */
23 
24 #ifndef COMPUTEOA_H
25 #define COMPUTEOA_H
26 
27 #include <vector>
28 #include "ComputeHomePatches.h"
29 #include "NamdTypes.h"
30 
31 #ifdef CHARM_HAS_MSA
32 
33 #include "msa/msa.h"
34 
35 typedef MSA::MSA1D<double, DefaultEntry<double>,
36  MSA_DEFAULT_ENTRIES_PER_PAGE> Moa1Grid;
37 
38 typedef MSA::MSA3D<double, DefaultEntry<double>,
39  MSA_DEFAULT_ENTRIES_PER_PAGE> Moa3Grid;
40 
41 #else
42 
43 typedef int Moa1Grid;
44 typedef int Moa3Grid;
45 
46 #endif // CHARM_HAS_MSA
47 
48 struct Int2 {
49  int nx, ny;
50  Int2() : nx(0), ny(0) { }
51  Int2(int mx, int my) : nx(mx), ny(my) { }
52  void pup(PUP::er &p) { p|nx, p|ny; }
53 };
54 
55 // /* Experimental */
56 // struct Vec3 {
57 // std::vector<int> b1; // b1 array
58 // std::vector<int> b2; // b1 array
59 // std::vector<int> b3; // b1 array
60 // void pup(PUP::er &p) { p|b1, p|b2, p|b3; }
61 // }
62 
63 
64 struct Int3 {
65  int nx, ny, nz;
66  Int3() : nx(0), ny(0), nz(0) { }
67  Int3(int mx, int my, int mz) : nx(mx), ny(my), nz(mz) { }
68  void pup(PUP::er &p) { p|nx, p|ny, p|nz; }
69 };
70 
71 class SubmitReduction;
72 
74 public:
76  virtual ~ComputeMoa();
77  void doWork();
78 
79 private:
80  SubmitReduction *reduction;
81 };
82 
83 struct MoaData {
84 
85  int K1, K2, K3;
86  int order;
87  float orig_x, orig_y, orig_z;
88 
90  std::vector<int> num_clients_qh; // number client chares for each qh grid
91  std::vector<int> num_clients_bh; // number client chares for each bh grid
92  std::vector<int> num_clients_sh; // number client chares for each bh grid
93 
94 
95  std::vector<Moa3Grid> qh; // charge grid
96  std::vector<Moa3Grid> sh; // s-value grid
97 // std::vector<Moa1Grid> b1; // b-value grid
98 // std::vector<Moa1Grid> b2; // b-value grid
99 // std::vector<Moa1Grid> b3; // b-value grid
100  std::vector<Moa3Grid> bh; // b-value grid
101 
102  std::vector<Int2> k1r, k2r, k3r;
104  std::vector<int> hasLQ;
105  std::vector<int> hasLB;
106  std::vector<int> hasLS;
107 
108 
109 
110  void pup(PUP::er &p); // for parameter marshalling
111  void print(); // for debugging
112 };
113 
114 #endif
115 
std::vector< int > hasLS
Definition: ComputeMoa.h:106
Int3 gbqs
Definition: ComputeMoa.h:103
int ComputeID
Definition: NamdTypes.h:183
Int2()
Definition: ComputeMoa.h:50
std::vector< Moa3Grid > bh
Definition: ComputeMoa.h:100
std::vector< int > hasLQ
Definition: ComputeMoa.h:104
int Moa3Grid
Definition: ComputeMoa.h:44
int ny
Definition: ComputeMoa.h:49
std::vector< Int2 > k1r
Definition: ComputeMoa.h:102
std::vector< int > num_clients_qh
Definition: ComputeMoa.h:90
int order
Definition: ComputeMoa.h:86
int Moa1Grid
Definition: ComputeMoa.h:43
int nx
Definition: ComputeMoa.h:65
float orig_x
Definition: ComputeMoa.h:87
std::vector< int > num_clients_sh
Definition: ComputeMoa.h:92
int nx
Definition: ComputeMoa.h:49
int K3
Definition: ComputeMoa.h:85
virtual ~ComputeMoa()
int ny
Definition: ComputeMoa.h:65
void pup(PUP::er &p)
Definition: ComputeMoa.h:68
ComputeMoa(ComputeID c)
std::vector< int > num_clients_bh
Definition: ComputeMoa.h:91
Int3(int mx, int my, int mz)
Definition: ComputeMoa.h:67
float orig_y
Definition: ComputeMoa.h:87
void pup(PUP::er &p)
Definition: ComputeMoa.h:52
int num_clients
Definition: ComputeMoa.h:89
int K1
Definition: ComputeMoa.h:85
Int3()
Definition: ComputeMoa.h:66
std::vector< Moa3Grid > qh
Definition: ComputeMoa.h:95
void pup(PUP::er &p)
void print()
std::vector< Int2 > k3r
Definition: ComputeMoa.h:102
int K2
Definition: ComputeMoa.h:85
std::vector< Int2 > k2r
Definition: ComputeMoa.h:102
float orig_z
Definition: ComputeMoa.h:87
Int2(int mx, int my)
Definition: ComputeMoa.h:51
int nz
Definition: ComputeMoa.h:65
void doWork()
std::vector< Moa3Grid > sh
Definition: ComputeMoa.h:96
std::vector< int > hasLB
Definition: ComputeMoa.h:105