--- trunk/OOPSE/libmdtools/SimInfo.cpp 2003/04/05 03:39:25 463 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2003/04/11 15:16:59 490 @@ -9,6 +9,10 @@ #include "fortranWrappers.hpp" +#ifdef IS_MPI +#include "mpiSimulation.hpp" +#endif + SimInfo* currentInfo; SimInfo::SimInfo(){ @@ -128,7 +132,12 @@ void SimInfo::refreshSim(){ simtype fInfo; int isError; + int n_global; int* excl; + + fInfo.rrf = 0.0; + fInfo.rt = 0.0; + fInfo.dielect = 0.0; fInfo.box[0] = box_x; fInfo.box[1] = box_y; @@ -136,10 +145,13 @@ void SimInfo::refreshSim(){ fInfo.rlist = rList; fInfo.rcut = rCut; - fInfo.rrf = ecr; - fInfo.rt = ecr - est; - fInfo.dielect = dielectric; + if( useDipole ){ + fInfo.rrf = ecr; + fInfo.rt = ecr - est; + if( useReactionField )fInfo.dielect = dielectric; + } + fInfo.SIM_uses_PBC = usePBC; //fInfo.SIM_uses_LJ = 0; fInfo.SIM_uses_LJ = useLJ; @@ -154,20 +166,18 @@ void SimInfo::refreshSim(){ excl = Exclude::getArray(); +#ifdef IS_MPI + n_global = mpiSim->getTotAtoms(); +#else + n_global = n_atoms; +#endif + isError = 0; -// fInfo; -// n_atoms; -// identArray; -// n_exclude; -// excludes; -// nGlobalExcludes; -// globalExcludes; -// isError; + setFsimulation( &fInfo, &n_global, &n_atoms, identArray, &n_exclude, excl, + &nGlobalExcludes, globalExcludes, molMembershipArray, + &isError ); - setFsimulation( &fInfo, &n_atoms, identArray, &n_exclude, excl, - &nGlobalExcludes, globalExcludes, &isError ); - if( isError ){ sprintf( painCave.errMsg, @@ -182,8 +192,8 @@ void SimInfo::refreshSim(){ MPIcheckPoint(); #endif // is_mpi - ndf = this->getNDF(); - ndfRaw = this->getNDFraw(); + this->ndf = this->getNDF(); + this->ndfRaw = this->getNDFraw(); }