An error occurred while loading the file. Please try again.
-
Paul Heinzlreiter authoredd918f25f
MpiSimulation.hpp 669 B
#ifndef MPI_SIMULATION_HPP
#define MPI_SIMULATION_HPP
#include <mpi.h>
#include "Simulation.hpp"
#include "MpiBodyComm.hpp"
#include <vector>
namespace nbody {
using namespace std;
class MpiSimulation : public Simulation {
friend class MpiBodyComm;
protected:
unsigned int mpiSize;
unsigned int mpiRank;
MPI::Datatype bodyType;
vector<MpiBodyComm> comms;
bool correctState;
vector<Body> bodies;
public:
MpiSimulation(int& argc, char**& argv);
virtual ~MpiSimulation();
virtual void cleanup();
virtual int getNumberOfProcesses();
virtual int getProcessId();
virtual bool stateCorrect();
virtual void distributeBodies();
};
}
#endif