@@ -31,20 +31,20 @@ int main(int argc, char *argv[]) {
3131 // Domain decomposition can be done in a manual manner, just by giving the
3232 // size of the calculation domain, id number and total number of subdomains:
3333 int comm_rank = 0 , comm_size = 2 ;
34- World world1 = world::create ({32 , 4 , 4 });
35- Decomposition decomp1 = make_decomposition (world1, comm_rank, comm_size);
34+ auto world1 = world::create ({32 , 4 , 4 });
35+ auto decomp1 = make_decomposition (world1, comm_rank, comm_size);
3636 // cout << decomp1 << endl;
3737
3838 // In practice, we let MPI communicator to decide the number of subdomains.
3939 MPI_Init (&argc, &argv);
4040 MPI_Comm comm = MPI_COMM_WORLD;
4141 MPI_Comm_rank (comm, &comm_rank);
42- World world2 = world::create ({32 , 4 , 4 });
43- Decomposition decomp2 = make_decomposition (world2, comm);
44- // if (comm_rank == 0) cout << decomp2 << endl;
42+ auto world2 = world::create ({32 , 4 , 4 });
43+ auto decomp2 = make_decomposition (world2, comm);
44+ if (comm_rank == 0 ) cout << decomp2 << endl;
4545
4646 // By default, MPI_COMM_WORLD is used, so the above example can be simplified:
47- // cout << make_decomposition(world2) << endl;
47+ cout << make_decomposition (world2) << endl;
4848
4949 MPI_Finalize ();
5050 return 0 ;
0 commit comments