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 206 by chuckv, Thu Dec 12 21:21:59 2002 UTC vs.
Revision 215 by chuckv, Thu Dec 19 21:59:51 2002 UTC

# Line 10 | Line 10
10  
11   #ifdef IS_MPI
12   #include "mpiBASS.h"
13 + #include "mpiSimulation.hpp"
14   #include "bassDiag.hpp"
15   #endif
16  
# Line 92 | Line 93 | void SimSetup::createSim( void ){
93    if( !strcmp( force_field, "TraPPE" ) ) the_ff = new TraPPEFF();
94    else if( !strcmp( force_field, "DipoleTest" ) ) the_ff = new DipoleTestFF();
95    else if( !strcmp( force_field, "TraPPE_Ex" ) ) the_ff = new TraPPE_ExFF();
96 +  else if( !strcmp( force_field, "LJ" ) ) the_ff = new LJ_FF();
97    else{
98      sprintf( painCave.errMsg,
99               "SimSetup Error. Unrecognized force field -> %s\n",
# Line 234 | Line 236 | void SimSetup::createSim( void ){
236  
237    // divide the molecules among processors here.
238    
239 <  mpiSimulation* mpiSim = new mpiSimulation( simnfo );
239 >  mpiSim = new mpiSimulation( simnfo );
240    
241    mpiSim->divideLabor();
242  
# Line 583 | Line 585 | void SimSetup::makeAtoms( void ){
585      for( j=0; j<components_nmol[i]; j++ ){
586  
587   #ifdef IS_MPI
588 <      if( simnfo->mpiSim->getMyMolStart() <= molIndex &&
589 <          molIndex <= simnfo->mpiSim->getMyMolEnd() ){
588 >      if( mpiSim->getMyMolStart() <= molIndex &&
589 >          molIndex <= mpiSim->getMyMolEnd() ){
590   #endif // is_mpi        
591  
592          molStart = index;
# Line 650 | Line 652 | void SimSetup::makeBonds( void ){
652    the_bonds = new bond_pair[tot_bonds];
653    index = 0;
654    offset = 0;
655 <  molIndex = 0;
655 >  molIndex = 0;g1
656 >
657    for( i=0; i<n_components; i++ ){
658  
659      for( j=0; j<components_nmol[i]; j++ ){
660  
661   #ifdef IS_MPI
662 <      if( simnfo->mpiSim->getMyMolStart() <= molIndex &&
663 <          molIndex <= simnfo->mpiSim->getMyMolEnd() ){
662 >      if( mpiSim->getMyMolStart() <= molIndex &&
663 >          molIndex <= mpiSim->getMyMolEnd() ){
664   #endif // is_mpi        
665          
666          for( k=0; k<comp_stamps[i]->getNBonds(); k++ ){
# Line 700 | Line 703 | void SimSetup::makeBends( void ){
703      for( j=0; j<components_nmol[i]; j++ ){
704  
705   #ifdef IS_MPI
706 <      if( simnfo->mpiSim->getMyMolStart() <= molIndex &&
707 <          molIndex <= simnfo->mpiSim->getMyMolEnd() ){
706 >      if( mpiSim->getMyMolStart() <= molIndex &&
707 >          molIndex <= mpiSim->getMyMolEnd() ){
708   #endif // is_mpi        
709  
710          for( k=0; k<comp_stamps[i]->getNBends(); k++ ){
# Line 745 | Line 748 | void SimSetup::makeTorsions( void ){
748      for( j=0; j<components_nmol[i]; j++ ){
749  
750   #ifdef IS_MPI
751 <      if( simnfo->mpiSim->getMyMolStart() <= molIndex &&
752 <          molIndex <= simnfo->mpiSim->getMyMolEnd() ){
751 >      if( mpiSim->getMyMolStart() <= molIndex &&
752 >          molIndex <= mpiSim->getMyMolEnd() ){
753   #endif // is_mpi        
754  
755        for( k=0; k<comp_stamps[i]->getNTorsions(); k++ ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines