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 131 by chuckv, Wed Oct 9 22:29:40 2002 UTC vs.
Revision 164 by mmeineke, Tue Nov 5 22:04:46 2002 UTC

# Line 6 | Line 6
6   #include "parse_me.h"
7   #include "LRI.hpp"
8   #include "Integrator.hpp"
9 +
10   #ifdef IS_MPI
11 < #include "mpiInterface.h"
11 > #include "mpiBASS.h"
12   #include "bassDiag.hpp"
13   #endif
14  
15   SimSetup::SimSetup(){
16    stamps = new MakeStamps();
17    globals = new Globals();
18 +  
19 + #ifdef IS_MPI
20 +  strcpy( checkPointMsg, "SimSetup creation successful" );
21 +  MPIcheckPoint();
22 + #endif IS_MPI
23   }
24  
25   SimSetup::~SimSetup(){
# Line 23 | Line 29 | void SimSetup::parseFile( char* fileName ){
29  
30   void SimSetup::parseFile( char* fileName ){
31  
26  inFileName = fileName;
27  set_interface_stamps( stamps, globals );
32   #ifdef IS_MPI
33 <  mpiEventInit();
34 < #endif
35 <  yacc_BASS( fileName );
33 >  if( worldRank == 0 ){
34 > #endif // is_mpi
35 >    
36 >    inFileName = fileName;
37 >    set_interface_stamps( stamps, globals );
38 >    
39   #ifdef IS_MPI
40 <  throwMPIEvent(NULL);
40 >    mpiEventInit();
41   #endif
42  
43 +    yacc_BASS( fileName );
44 +
45 + #ifdef IS_MPI
46 +    throwMPIEvent(NULL);
47 +  }
48 +  else recieveParse();
49 + #endif
50 +
51   }
52  
53   #ifdef IS_MPI
# Line 40 | Line 55 | void SimSetup::receiveParse(void){
55  
56      set_interface_stamps( stamps, globals );
57      mpiEventInit();
58 +    MPIcheckPoint();
59      mpiEventLoop();
60  
61   }
# Line 155 | Line 171 | void SimSetup::createSim( void ){
171    // create the atom and short range interaction arrays
172  
173    the_atoms = new Atom*[tot_atoms];
174 +  Atom::createArrays(tot_atoms);
175    the_molecules = new Molecule[tot_nmol];
176  
177  
# Line 391 | Line 408 | void SimSetup::makeAtoms( void ){
408          current_atom = comp_stamps[i]->getAtom( k );
409          if( current_atom->haveOrientation() ){
410  
411 <          dAtom = new DirectionalAtom;
411 >          dAtom = new DirectionalAtom(index);
412            simnfo->n_oriented++;
413            the_atoms[index] = dAtom;
414  
# Line 411 | Line 428 | void SimSetup::makeAtoms( void ){
428            dAtom->setSUz( uz );
429          }
430          else{
431 <          the_atoms[index] = new GeneralAtom;
431 >          the_atoms[index] = new GeneralAtom(index);
432          }
433          the_atoms[index]->setType( current_atom->getType() );
434          the_atoms[index]->setIndex( index );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines