# | Line 15 | Line 15 | SimSetup::SimSetup(){ | |
---|---|---|
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 24 | Line 29 | void SimSetup::parseFile( char* fileName ){ | |
29 | ||
30 | void SimSetup::parseFile( char* fileName ){ | |
31 | ||
27 | – | inFileName = fileName; |
28 | – | 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 | > | mpiEventInit(); |
41 | > | #endif |
42 | > | |
43 | > | yacc_BASS( fileName ); |
44 | > | |
45 | #ifdef IS_MPI | |
46 | < | throwMPIEvent(NULL); |
46 | > | throwMPIEvent(NULL); |
47 | > | } |
48 | > | else recieveParse(); |
49 | #endif | |
50 | ||
51 | } | |
# | Line 41 | Line 55 | void SimSetup::receiveParse(void){ | |
55 | ||
56 | set_interface_stamps( stamps, globals ); | |
57 | mpiEventInit(); | |
58 | + | MPIcheckPoint(); |
59 | mpiEventLoop(); | |
60 | ||
61 | } | |
# | Line 156 | 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 392 | 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 412 | 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 ); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |