ParMooN
 All Classes Functions Variables Friends Pages
ParFEMapper3D.h
1 // =======================================================================
2 // @(#)ParFEMapper3D.h
3 //
4 // Class: TParFEMapper3D
5 // Purpose: Class containing all info needed for communication between subdomains
6 //
7 // Author: Sashikumaar Ganesan (24.04.15)
8 //
9 // History: Start of implementation 24.04.15 (Sashikumaar Ganesan)
10 //
11 // =======================================================================
12 
13 #ifdef _MPI
14 
15 #ifndef __TParFEMapper3D__
16 #define __TParFEMapper3D__
17 
18 #include "mpi.h"
19 
20 #include <FESpace3D.h>
21 #include <SquareStructure.h>
22 #include <SquareStructure3D.h>
23 
25 {
26  protected:
28  MPI_Comm Comm;
29 
31  int N_Dim;
32 
33  int N_Dof;
34 
36  int *RowPtr, *KCol;
37 
40 
43 
45  int *Master, *OwnDofs;
46 
48  char *DofMarker;
49 
51  double *Send_Info,*Recv_Info;
52 
55 
57  int *sdispl, *rdispl;
58 
59  int N_InterfaceM, N_InterfaceS, N_Halo1, N_Halo2, N_Dept1, N_Dept2;
60 
61  int N_Slave, N_Halo, N_Master, N_Dept, N_Int, N_OwnDof;
62 
63  int *N_DofSend, *N_DofRecv, *N_DofSendMS, *N_DofSendH1, *N_DofSendH2, *N_DofRecvMS, *N_DofRecvH1, *N_DofRecvH2;
64 
65  int *sdisplMS, *sdisplH1, *sdisplH2, *rdisplMS, *rdisplH1, *rdisplH2;
66 
67  int N_SendDof, N_SendDofMS, N_SendDofH1, N_SendDofH2;
68 
69  int *DofSend, *DofSendMS, *DofSendH1, *DofSendH2, *DofRecv, *DofRecvMS, *DofRecvH1, *DofRecvH2;
70 
71  double *Send_InfoMS, *Send_InfoH1, *Send_InfoH2, *Recv_InfoMS, *Recv_InfoH1, *Recv_InfoH2;
72 
73  int *NewGN, *Reorder, *Reorder_M, *Reorder_I, *Reorder_D1, *Reorder_D2, *Reorder_D3;
74 
75  int N_CMaster, N_CDept1, N_CDept2, N_CInt, *ptrCMaster, *ptrCDept1, *ptrCDept2, *ptrCInt;
76 
77  public:
78  TParFEMapper3D(int N_dim, TFESpace3D *fespace, int *rowptr, int *kcol);
79 
80  ~TParFEMapper3D();
81 
82  void ConstructDofMap_Master_Halo(); //MapperType 1
83 
84  void ConstructDofMap(); //MapperType 2
85 
86  int find_min(int *arr, int N, char *temp_arr);
87 
88  void GetCommInfo(int &n_Dim, int &n_Dof,
89  int &n_SendDof, int &n_SendDofMS, int &n_SendDofH1, int &n_SendDofH2,
90  double *&send_Info, double *&send_InfoMS, double *&send_InfoH1, double *&send_InfoH2,
91  double *&recv_Info, double *&recv_InfoMS, double *&recv_InfoH1, double *&recv_InfoH2,
92  int *&n_DofSend, int *&n_DofSendMS, int *&n_DofSendH1, int *&n_DofSendH2,
93  int *&n_DofRecv, int *&n_DofRecvMS, int *&n_DofRecvH1, int *&n_DofRecvH2,
94  int *&Sdispl, int *&SdisplMS, int *&SdisplH1, int *&SdisplH2,
95  int *&Rdispl, int *&RdisplMS, int *&RdisplH1, int *&RdisplH2,
96  int *&dofSend, int *&dofSendMS, int *&dofSendH1, int *&dofSendH2,
97  int *&dofRecv, int *&dofRecvMS, int *&dofRecvH1, int *&dofRecvH2,
98  int &n_Slave, int &n_InterfaceS, int &n_Halo1, int &n_Halo2)
99  {
100  n_Dim = N_Dim;
101  n_Dof = N_Dof;
102 
103  n_SendDof = N_SendDof;
104  n_SendDofMS = N_SendDofMS;
105  n_SendDofH1 = N_SendDofH1;
106  n_SendDofH2 = N_SendDofH2;
107 
108  send_Info = Send_Info;
109  send_InfoMS = Send_InfoMS;
110  send_InfoH1 = Send_InfoH1;
111  send_InfoH2 = Send_InfoH2;
112 
113  recv_Info = Recv_Info;
114  recv_InfoMS = Recv_InfoMS;
115  recv_InfoH1 = Recv_InfoH1;
116  recv_InfoH2 = Recv_InfoH2;
117 
118  n_DofSend = N_DofSend;
119  n_DofSendMS = N_DofSendMS;
120  n_DofSendH1 = N_DofSendH1;
121  n_DofSendH2 = N_DofSendH2;
122 
123  n_DofRecv = N_DofRecv;
124  n_DofRecvMS = N_DofRecvMS;
125  n_DofRecvH1 = N_DofRecvH1;
126  n_DofRecvH2 = N_DofRecvH2;
127 
128  Sdispl = sdispl;
129  SdisplMS = sdisplMS;
130  SdisplH1 = sdisplH1;
131  SdisplH2 = sdisplH2;
132 
133  Rdispl = rdispl;
134  RdisplMS = rdisplMS;
135  RdisplH1 = rdisplH1;
136  RdisplH2 = rdisplH2;
137 
138  dofSend = DofSend;
139  dofSendMS = DofSendMS;
140  dofSendH1 = DofSendH1;
141  dofSendH2 = DofSendH2;
142 
143  dofRecv = DofRecv;
144  dofRecvMS = DofRecvMS;
145  dofRecvH1 = DofRecvH1;
146  dofRecvH2 = DofRecvH2;
147 
148  n_Slave = N_Slave;
149  n_InterfaceS = N_InterfaceS;
150  n_Halo1 = N_Halo1;
151  n_Halo2 = N_Halo2;
152  }
153 
154  int GetN_Master()
155  {return N_Master;}
156 
157  int *GetMaster()
158  {return Master;}
159 
160  char *Get_DofMarker()
161  { return DofMarker; }
162 
163  int* GetReorder_M()
164  {return Reorder_M;}
165 
166  int* GetReorder_I()
167  {return Reorder_I;}
168 
169  int* GetReorder_D1()
170  {return Reorder_D1;}
171 
172  int* GetReorder_D2()
173  {return Reorder_D2;}
174 
175  int* GetReorder_D3()
176  {return Reorder_D3;}
177 
178  int GetN_InterfaceM()
179  {return N_InterfaceM;}
180 
181  int GetN_Int_light()
182  {return N_Int;}
183 
184  int GetN_Dept1()
185  {return N_Dept1;}
186 
187  int GetN_Dept2()
188  {return N_Dept2;}
189 
190  int* Get_Local2Global()
191  { return Local2Global;}
192 
193 #ifdef _HYBRID
194  void Color(int &numColors, int *&ptrColors, char type);
195 
196  int GetN_CMaster()
197  {return N_CMaster;}
198  int* GetptrCMaster()
199  {return ptrCMaster;}
200 
201  int GetN_CDept1()
202  {return N_CDept1;}
203  int* GetptrCDept1()
204  {return ptrCDept1;}
205 
206  int GetN_CDept2()
207  {return N_CDept2;}
208  int* GetptrCDept2()
209  {return ptrCDept2;}
210 
211  int GetN_CInt()
212  {return N_CInt;}
213  int* GetptrCInt()
214  {return ptrCInt;}
215 
216 #endif
217 
218  void Assign_GlobalDofNo();
219 };
220 
221 #endif
222 #endif
223 
224 
225 
226 
227 
228 
229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
240 
241 
242 
243 
244 
int N_Dim
Definition: ParFEMapper3D.h:31
Definition: FESpace3D.h:22
int * RowPtr
Definition: ParFEMapper3D.h:36
TFESpace3D * FESpace
Definition: ParFEMapper3D.h:39
int MaxSubDomainPerDof
Definition: ParFEMapper3D.h:42
int * Master
Definition: ParFEMapper3D.h:45
void ConstructDofMap()
Definition: ParFEMapper3D.C:1427
double * Send_Info
Definition: ParFEMapper3D.h:51
Definition: ParFEMapper3D.h:24
char * DofMarker
Definition: ParFEMapper3D.h:48
void ConstructDofMap_Master_Halo()
Definition: ParFEMapper3D.C:99
MPI_Comm Comm
Definition: ParFEMapper3D.h:28
int * sdispl
Definition: ParFEMapper3D.h:57
int * Local2Global
Definition: ParFEMapper3D.h:54