-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpartition.h
83 lines (59 loc) · 3.13 KB
/
partition.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//----------------------------------------------------------------------------------||
//------------------- partition.h -------------------||
//----------------------------------------------------------------------------------||
// ||
// __ ___ _ _ ____ ____ ___ ____ ||
// \ \ / / \ | \ | | _ \ | _ \_ _/ ___| ||
// \ \ /\ / / _ \ | \| | | | |_____| |_) | | | ||
// \ V V / ___ \| |\ | |_| |_____| __/| | |___ ||
// \_/\_/_/ \_\_| \_|____/ |_| |___\____| ||
// ||
//----------------------------------------------------------------------------------||
//-- (W)akefield (A)cceleration a(n)d (D)LA - (P)article (i)n (C)ell Simulation --||
//----------------------------------------------------------------------------------||
//---Author----------- : Tianhong Wang --------------------||
//---Starting--------- : Jan-11-2019 --------------------||
//---Email------------ : [email protected] --------------------||
//---Group------------ : Dr. Gennady Shvets' Group --------------------||
//---Copyright-------- : (C) 2019 by Tianhong Wang --------------------||
//----------------------------------------------------------------------------------||
//----------------------------------------------------------------------------------||
#ifndef H_PARTITION
#define H_PARTITION
//---------------------------- Partition class -----------------------
class Partition : public NList {
friend class Domain;
private:
Domain *p_domain() {return Domain::p_Domain;}; // pointer to domain class.
int N_Xpart, N_Ypart; // partition number;
int N_Processor; // Total Number of Processor;
int Rank;
int idx_X,idx_Y; // Index of processor in X and Y direction, start with 1;
//int *p_myPE; // pointer to my processor.
int idx_XmPE; // idx of processor left to me.
int idx_XpPE; // idx of processor right to me.
int idx_YmPE; // idx of processor below.
int idx_YpPE; // idx of processor above.
int idx_mmPE; // idx of processor left-blew
int idx_pmPE; // idx of processor right-blew
int idx_mpPE; // idx of processor left-above
int idx_ppPE; // idx of processor right-above
public:
int GetXpart() {return N_Xpart;};
int GetYpart() {return N_Ypart;};
int GetXmPE() {return idx_XmPE;};
int GetXpPE() {return idx_XpPE;};
int GetYmPE() {return idx_YmPE;};
int GetYpPE() {return idx_YpPE;};
int GetmmPE() {return idx_mmPE;};
int GetmpPE() {return idx_mpPE;};
int GetpmPE() {return idx_pmPE;};
int GetppPE() {return idx_ppPE;};
int RankIdx_X() {return idx_X;};
int RankIdx_Y() {return idx_Y;};
int Get_Rank() {return Rank;};
Partition(FILE *f);
~Partition() {
};
};
#endif