AcouSTO  version 2.0

◆ sc_g2l()

void sc_g2l ( int  i,
int  n,
int  np,
int  nb,
int *  p,
int *  il 
)

Evaluates local indices from global indices for the process grid.

Parameters
[in]iglobal array index, input
[in]nglobal array dimension, input
[in]npprocessor array dimension, input
[in]nbblock size, input
[out]pprocessor array index, output
[out]illocal array index, output
94  {
95 
96  int im1;
97 
98  im1 = i;
99  *p = (im1/nb) % np;
100  *il = (im1/(np*nb))*nb + (im1 % nb) ;
101 
102 }