41 #ifndef CARTESIANTOPOLOGY_H_
42 #define CARTESIANTOPOLOGY_H_
46 #include <boost/mpi.hpp>
48 #include "GridDimensions.h"
49 #include "RelativeLocation.h"
59 std::vector<int> procsPerDim;
62 MPI_Comm topologyComm;
64 CartesianTopology(std::vector<int> processesPerDim,
bool spaceIsPeriodic, boost::mpi::communicator* world);
71 int getRank(std::vector<int>& loc, std::vector<int>& relLoc);
77 void getCoordinates(
int rank, std::vector<int>& coords);
108 bool matches(std::vector<int> processesPerDim,
bool spaceIsPeriodic);