ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/interface_implementation/SimSetup.cpp
(Generate patch)

Comparing trunk/mdtools/interface_implementation/SimSetup.cpp (file contents):
Revision 248 by chuckv, Mon Jan 27 19:28:21 2003 UTC vs.
Revision 254 by chuckv, Thu Jan 30 20:03:37 2003 UTC

# Line 189 | Line 189 | void SimSetup::createSim( void ){
189        if( currentStamp == NULL ){
190          sprintf( painCave.errMsg,
191                   "SimSetup error: Component \"%s\" was not found in the "
192 <                 "list of declared molecules\n"
192 >                 "list of declared molecules\n",
193                   id );
194          painCave.isFatal = 1;
195          simError();
# Line 238 | Line 238 | void SimSetup::createSim( void ){
238    
239    mpiSim = new mpiSimulation( simnfo );
240    
241 <  mpiSim->divideLabor();
241 >  fprintf( stderr, "about to call divideLabour.\n" );
242  
243 +  globalIndex = mpiSim->divideLabor();
244 +
245 +  fprintf(stderr, "we're back from divideLabour\n" );
246 +
247    // set up the local variables
248    
249    int localMol, allMol;
# Line 567 | Line 571 | void SimSetup::createSim( void ){
571  
572   //   new AllLong( simnfo );
573  
574 <  if( !strcmp( force_field, "TraPPE" ) ) new Verlet( *simnfo );
574 >  if( !strcmp( force_field, "TraPPE" ) ) new Verlet( *simnfo, the_ff );
575    if( !strcmp( force_field, "DipoleTest" ) ) new Symplectic( simnfo );
576    if( !strcmp( force_field, "TraPPE_Ex" ) ) new Symplectic( simnfo );
577    if( !strcmp( force_field, "LJ" ) ) new Verlet( *simnfo, the_ff );
# Line 644 | Line 648 | void SimSetup::makeAtoms( void ){
648        molIndex++;
649      }
650    }
651 +
652 + #ifdef IS_MPI
653 +    for( i=0; i<mpiSim->getMyNlocal(); i++ ) the_atoms[i]->setGlobalIndex( globalIndex[i] );
654 +    
655 +    delete[] globalIndex;
656  
657 +    mpiSim->mpiRefresh();
658 + #endif //IS_MPI
659 +          
660    the_ff->initializeAtoms();
661   }
662  
# Line 657 | Line 669 | void SimSetup::makeBonds( void ){
669    the_bonds = new bond_pair[tot_bonds];
670    index = 0;
671    offset = 0;
672 <  molIndex = 0;g1
672 >  molIndex = 0;
673  
674    for( i=0; i<n_components; i++ ){
675  
# Line 684 | Line 696 | void SimSetup::makeBonds( void ){
696          
697   #ifdef IS_MPI
698        }
699 < #endif is_mpi
699 > #endif //is_mpi
700        
701        molIndex++;
702      }      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines