1#include <math.h>
2#include "applu_share.h"
3
4void proc_grid() {
5
6//c   set up a two-d grid for processors: column-major ordering of unknowns
7//c   NOTE: assumes a power-of-two number of processors
8
9      xdim   = pow(2,(ndim/2));
10      if (ndim%2 == 1) xdim = xdim + xdim;
11      ydim   = num/xdim;
12
13      row    = id%xdim + 1;
14      col    = id/xdim + 1;
15
16      return;
17}
18
19
20
21