ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/SimInfo.cpp
(Generate patch)

Comparing trunk/src/brains/SimInfo.cpp (file contents):
Revision 1129 by chrisfen, Fri Apr 20 18:15:48 2007 UTC vs.
Revision 1241 by gezelter, Fri Apr 25 15:14:47 2008 UTC

# Line 156 | Line 156 | namespace oopse {
156                                                  + nGlobalRigidBodies_;
157    
158        nGlobalMols_ = molStampIds_.size();
159
160 #ifdef IS_MPI    
159        molToProcMap_.resize(nGlobalMols_);
162 #endif
163
160      }
161  
162    SimInfo::~SimInfo() {
# Line 860 | Line 856 | namespace oopse {
856      int nGlobalExcludes = 0;
857      int* globalExcludes = NULL;
858      int* excludeList = exclude_.getExcludeList();
859 <    setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray[0], &nExclude, excludeList ,
860 <                   &nGlobalExcludes, globalExcludes, &molMembershipArray[0],
861 <                   &mfact[0], &nCutoffGroups_, &fortranGlobalGroupMembership[0], &isError);
862 <
859 >    setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray[0],
860 >                   &nExclude, excludeList , &nGlobalExcludes, globalExcludes,
861 >                   &molMembershipArray[0], &mfact[0], &nCutoffGroups_,
862 >                   &fortranGlobalGroupMembership[0], &isError);
863 >    
864      if( isError ){
865 <
865 >      
866        sprintf( painCave.errMsg,
867                 "There was an error setting the simulation information in fortran.\n" );
868        painCave.isFatal = 1;
869        painCave.severity = OOPSE_ERROR;
870        simError();
871      }
872 <
873 < #ifdef IS_MPI
872 >    
873 >    
874      sprintf( checkPointMsg,
875               "succesfully sent the simulation information to fortran.\n");
876 <    MPIcheckPoint();
877 < #endif // is_mpi
878 <
876 >    
877 >    errorCheckPoint();
878 >    
879      // Setup number of neighbors in neighbor list if present
880      if (simParams_->haveNeighborListNeighbors()) {
881        int nlistNeighbors = simParams_->getNeighborListNeighbors();
# Line 889 | Line 886 | namespace oopse {
886    }
887  
888  
892 #ifdef IS_MPI
889    void SimInfo::setupFortranParallel() {
890 <    
890 > #ifdef IS_MPI    
891      //SimInfo is responsible for creating localToGlobalAtomIndex and localToGlobalGroupIndex
892      std::vector<int> localToGlobalAtomIndex(getNAtoms(), 0);
893      std::vector<int> localToGlobalCutoffGroupIndex;
# Line 941 | Line 937 | namespace oopse {
937      }
938  
939      sprintf(checkPointMsg, " mpiRefresh successful.\n");
940 <    MPIcheckPoint();
945 <
946 <
947 <  }
940 >    errorCheckPoint();
941  
942   #endif
943 +  }
944  
945    void SimInfo::setupCutoff() {          
946      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines