26 |
/* Translate from distributed/local array indices to global indices */ |
/* Translate from distributed/local array indices to global indices */ |
27 |
|
|
28 |
#ifdef PASO_MPI |
#ifdef PASO_MPI |
29 |
int Finley_IndexList_localToGlobal(Finley_NodeDistribution *dofDistribution, int my_CPU, int localIndex) { |
int Finley_IndexList_localToGlobal(Finley_NodeDistribution *dofDistribution, int localIndex) { |
30 |
/* |
/* |
31 |
get global id of icol |
get global id of icol |
32 |
if icol is internal node (on this CPU): use icol+vtxdist[my_CPU] |
if icol is internal node (on this CPU): use icol+vtxdist[my_CPU] |
33 |
else use indexExternal[icol-numLocal] to get global index of node |
else use indexExternal[icol-numLocal] to get global index of node |
34 |
(actually DOF...the NodeDistribution structure should have been called DofDistribution) |
(actually DOF...the NodeDistribution structure should have been called DofDistribution) |
35 |
*/ |
*/ |
36 |
|
index_t my_CPU=dofDistribution->MPIInfo->rank; |
37 |
if (localIndex < dofDistribution->numLocal) { |
if (localIndex < dofDistribution->numLocal) { |
38 |
localIndex = localIndex + dofDistribution->vtxdist[my_CPU]; |
localIndex = localIndex + dofDistribution->vtxdist[my_CPU]; |
39 |
} |
} |
121 |
/* Get the local col ID */ |
/* Get the local col ID */ |
122 |
icol=col_Label[elements->Nodes[INDEX2(col_node[kc],e,NN)]]; |
icol=col_Label[elements->Nodes[INDEX2(col_node[kc],e,NN)]]; |
123 |
/* Convert to global col ID (row ID is saved as local value) */ |
/* Convert to global col ID (row ID is saved as local value) */ |
124 |
icol = Finley_IndexList_localToGlobal(col_degreeOfFreedomDistribution, my_CPU, icol); |
icol = Finley_IndexList_localToGlobal(col_degreeOfFreedomDistribution, icol); |
125 |
Finley_IndexList_insertIndex(&(index_list[irow]),icol); |
Finley_IndexList_insertIndex(&(index_list[irow]),icol); |
|
printf("ksteube Finley_IndexList_insertIndex cpu= %d irow= %d icol= %d\n", my_CPU, irow, icol); |
|
126 |
} |
} |
127 |
} |
} |
128 |
} |
} |