ParMooN
 All Classes Functions Variables Friends Pages
ParFECommunicator2D.h
1 // =======================================================================
2 // @(#)ParFECommunicator2D.h
3 //
4 // Class: TParFECommunicator2D
5 // Purpose: Class containing all info needed for communication between subdomains
6 //
7 // Author: Sashikumaar Ganesan (01.10.09)
8 //
9 // History: Start of implementation 01.10.09 (Sashikumaar Ganesan)
10 //
11 // =======================================================================
12 #ifdef _MPI
13 # include "mpi.h"
14 
15 #include <FESpace2D.h>
16 
17 #ifndef __PARFECOMMUNICATOR2D__
18 #define __PARFECOMMUNICATOR2D__
19 
21 {
22  protected:
23 
25  MPI_Comm Comm;
26 
29 
31  int N_OwnDof;
32 
35 
38 
41 
44 
47 
50 
53 
56 
59 
62 
65 
68 
71 
73  bool *NeedAtNeib;
74 
77 
79  int *DofNeibIDs;
80 
83 
86 
89 
92 
95 
97  MPI_Request request001, request002, request003, request004, request005, request006;
98 
99  MPI_Request requestGatherVectorAtRoot;
100 
101 
108 
111 
114 
115  private:
118  int MakeDofMappingFromRoot();
119  int MakeDofMappingFromNeib();
120  int ConstructDofRankIndex();
121 
122  public:
124  TParFECommunicator2D(MPI_Comm comm, TFESpace2D *FESpace);
125 
126  int WaitForMakeDofMapping();
127 
128  void SetOwnDof();
129 
132 
134  void MooNMD_FECommunicateNeib(int **sendbuf, int **recvbuf, int N_array);
135 
137  void MooNMD_FECommunicateNeib(int **sendbuf, int *senddisp, int **sendlen, int **recvbuf, int *recvdisp, int **recvlen, int N_array);
138 
139  MPI_Comm GetComm()
140  { return Comm;}
141 
142  int GetN_OwnDof();
143 
144  int *GetOwnDofIndex();
145 
146  int GetActiveN_OwnDof();
147 
148  int *GetActiveOwnDofIndex();
149 
150  int GetMaxSubDomainPerDof()
151  { return MaxSubDomainPerDof; }
152 
153  int *GetDofRankIndex()
154  { return DofRankIndex; }
155 
156  int *GetGlobalDofOFLocalDof()
157  { return GlobalDofOFLocalDof; }
158 
159  TFESpace2D *Getfespace()
160  {return fespace; }
161 
162  int GetMaxN_LocalDofAllRank()
163  {return MaxN_LocalDofAllRank; }
164 
165 
166  int *GetN_LocalDofAllRank()
167  {return N_LocalDofAllRank; }
168 
169 
170  int *GetGlobalDofOFLocalDofAllRank()
171  {return GlobalDofOFLocalDofAllRank; }
172 
175 
176 };
177 #endif
178 #endif
void SetFENeibCommunicationSteps()
Definition: ParFECommunicator2D.C:878
MPI_Request request001
Definition: ParFECommunicator2D.h:97
int * DependentCellNeibIDs
Definition: ParFECommunicator2D.h:46
int * N_CommunicationProcesses
Definition: ParFECommunicator2D.h:88
int * N_DependentCellNeibs
Definition: ParFECommunicator2D.h:43
TParFECommunicator2D(MPI_Comm comm, TFESpace2D *FESpace)
Definition: ParFECommunicator2D.C:27
int * OwnDofNeibPtrList
Definition: ParFECommunicator2D.h:70
void MooNMD_FECommunicateNeib(int **sendbuf, int **recvbuf, int N_array)
Definition: ParFECommunicator2D.C:1247
int * ActiveOwnDofIndex
Definition: ParFECommunicator2D.h:64
Definition: FESpace2D.h:28
int * N_LocalDofAllRank
Definition: ParFECommunicator2D.h:107
int N_OwnDof
Definition: ParFECommunicator2D.h:31
int * IndexOfNeibRank
Definition: ParFECommunicator2D.h:82
MPI_Comm Comm
Definition: ParFECommunicator2D.h:25
int * N_DofRankIndex
Definition: ParFECommunicator2D.h:52
int * GlobalDofOFLocalDof
Definition: ParFECommunicator2D.h:58
int * DofRankIndex
Definition: ParFECommunicator2D.h:55
bool * NeedAtNeib
Definition: ParFECommunicator2D.h:73
TFESpace2D * fespace
Definition: ParFECommunicator2D.h:28
int * OwnDofIndex
Definition: ParFECommunicator2D.h:61
int N_ActiveOwnDof
Definition: ParFECommunicator2D.h:34
int MaxSubDomainPerDof
Definition: ParFECommunicator2D.h:49
int N_DependentCells
Definition: ParFECommunicator2D.h:37
int MaxN_LocalDofAllRank
Definition: ParFECommunicator2D.h:110
int * DofNeibIDs
Definition: ParFECommunicator2D.h:79
int Max_CommunicationSteps
Definition: ParFECommunicator2D.h:85
int * ReceiveID_Index
Definition: ParFECommunicator2D.h:91
int * DependentCellIndex
Definition: ParFECommunicator2D.h:40
int * SendID_Index
Definition: ParFECommunicator2D.h:94
Definition: ParFECommunicator2D.h:20
int * OwnDofNeibPtr
Definition: ParFECommunicator2D.h:67
int N_DofNeibs
Definition: ParFECommunicator2D.h:76
~TParFECommunicator2D()
Definition: ParFECommunicator2D.C:1422
int * GlobalDofOFLocalDofAllRank
Definition: ParFECommunicator2D.h:113