51 double bv[3][8][8] = { { {0,1/2.,0,0,0,0,0,0},
53 {0,0,1/2.,0,1/2.,0,0,0},
54 {0,0,0,1/4.,0,1/4.,0,0},
80 uint Ai[3][32] = { {0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3,
81 4,4,4,4, 5,5,5,5, 6,6,6,6, 7,7,7,7},
82 {0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3},
83 {0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3} };
85 uint Aj[3][32] = { {0,1,2,3, 0,1,2,3, 0,1,2,3, 0,1,2,3,
86 4,5,6,7, 4,5,6,7, 4,5,6,7, 4,5,6,7},
87 {0,1,2,3, 0,1,2,3, 0,1,2,3, 0,1,2,3},
88 {0,1,2,3, 0,1,2,3, 0,1,2,3, 0,1,2,3} };
90 double Ar[3][32] = { { 4,-1,-1,-2, -1,4,-2,-1, -1,-2,4,-1, -2,-1,-1,4,
91 4,-1,-1,-2, -1,4,-2,-1, -1,-2,4,-1, -2,-1,-1,4 },
92 { 4,-1,-1,-2, -1,4,-2,-1, -1,-2,4,-1, -2,-1,-1,4 },
93 { 4,-1,-1,-2, -1,4,-2,-1, -1,-2,4,-1, -2,-1,-1,4 } };
95 int main(
int narg,
char* arg[])
101 MPI_Init(&narg,&arg);
102 world = MPI_COMM_WORLD;
103 MPI_Comm_size(world,&np);
109 if(np!=3) { puts(
"run with 3 procs"); exit(1); }
113 nz[
id], &
Ai[
id][0], &
Aj[
id][0], &
Ar[
id][0],
119 uint i,j;
double xv[8];
122 printf(
"%d col %d:",
id,i);
123 for(j=0;j<
nx[
id];++j) printf(
"\t%.4g",xv[j]);
static void comm_free(struct comm *c)
int main(int narg, char *arg[])
establishes some macros to establish naming conventions
static void comm_init(struct comm *c, comm_ext ce)