HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
MPIRank1D.c
Go to the documentation of this file.
1 
6 #include <mpivars.h>
7 
27  int ndims,
28  int *iproc,
29  int *ip
30  )
31 {
32  int i,rank = 0, term = 1;
33  for (i=0; i<ndims; i++) {
34  rank += (ip[i]*term);
35  term *= iproc[i];
36  }
37 
38  return(rank);
39 }
MPI related function definitions.
int MPIRank1D(int ndims, int *iproc, int *ip)
Definition: MPIRank1D.c:26