--- trunk/mdtools/mpi_implementation/mpiSimulation.cpp 2002/09/30 19:36:20 122 +++ trunk/mdtools/mpi_implementation/mpiSimulation.cpp 2002/12/04 21:19:38 194 @@ -1,25 +1,28 @@ -#include -#include +#include +#include +#include -mpiSimulation::mpiSimulation() -{ - int mpi_error; +#include "mpiSimulation.hpp" +#include "simError.h" - MPI::Init(); - numberProcessors = MPI::Comm::Get_size(); - myNode = MPI::Comm::Get_rank(); - MPI::Get_processor_name(processorName,&processorNameLen); -} -mpiSimulation::mpiInitSimulation(SimInfo* entry_plug) +mpiSimulation::mpiSimulation(SimInfo* the_entryPlug) { + entryPlug = the_entryPlug - // need to get nmol here...... + numberProcessors = MPI::COMM_WORLD.Get_size(); + myNode = worldRank; + // let the simulkation know were there. + entryPlug->mpiSim = this; +} - myMolStart = nint(float(node)/numberProcessors*entry_plug->n_mol); - myMolEnd = nint(float(node + 1)/numberProcessors*entry_plug->n_mol;); - nMolLocal = myMolEnd - myMolStart + 1 +mpiSimulation::~mpiSimulation(){ + + // empty for now + } + +