boostorg/mpi — pull request #16 by aminiussi (2014-09-15 15:30:17+00:00)
Title: Cartesian communicator

This is a tentative implementation of cartesian communicator with associated documentation and test.
As far as the documentation is concerned, I just added the C mapping and the doxygen.

There are certainly a few issues. On point for which I am not sure about what to do is the topology description which in the C API id usually represented through 2 array (one for the dimensions, one for the periodicity). I choosed to represent it as a sequence of itermediate object (cartesian_dimension) representing a pair {dimension, periodic). The idea beeing that, using C++11ish syntax, it would give something like:
cartesian_communicator( { {2, true}, {3, false}} );
Note that the class does not use C++11 features (at least I don;t think so).

I choose not to templatize the class on the grid dimension. Altough I suspect most real world use cases could benefit from it, I wasn't comfortable wit hthhe lost of runtime flexibility. Also, such a templatized class would benefit from C++11 constructs. I guess it could be added later (maybe as a sub class), but if we plan to go there, with should think out the class names now. (one could be named cartesian_communicator vs grid_communicator ?).