--- trunk/mdtools/interface_implementation/SimSetup.cpp 2002/10/03 21:52:46 128 +++ trunk/mdtools/interface_implementation/SimSetup.cpp 2002/10/18 15:34:21 145 @@ -6,8 +6,12 @@ #include "parse_me.h" #include "LRI.hpp" #include "Integrator.hpp" -#include "mpiInterface.h" +#ifdef IS_MPI +#include "mpiBASS.h" +#include "bassDiag.hpp" +#endif + SimSetup::SimSetup(){ stamps = new MakeStamps(); globals = new Globals(); @@ -22,17 +26,17 @@ void SimSetup::parseFile( char* fileName ){ inFileName = fileName; set_interface_stamps( stamps, globals ); -#ifdef MPI +#ifdef IS_MPI mpiEventInit(); #endif yacc_BASS( fileName ); -#ifdef MPI +#ifdef IS_MPI throwMPIEvent(NULL); #endif } -#ifdef MPI +#ifdef IS_MPI void SimSetup::receiveParse(void){ set_interface_stamps( stamps, globals ); @@ -40,14 +44,14 @@ void SimSetup::receiveParse(void){ mpiEventLoop(); } -#endif + void SimSetup::testMe(void){ bassDiag* dumpMe = new bassDiag(globals,stamps); dumpMe->dumpStamps(); delete dumpMe; } - +#endif void SimSetup::createSim( void ){ MakeStamps *the_stamps; @@ -152,6 +156,7 @@ void SimSetup::createSim( void ){ // create the atom and short range interaction arrays the_atoms = new Atom*[tot_atoms]; + Atom::createArrays(tot_atoms); the_molecules = new Molecule[tot_nmol]; @@ -388,7 +393,7 @@ void SimSetup::makeAtoms( void ){ current_atom = comp_stamps[i]->getAtom( k ); if( current_atom->haveOrientation() ){ - dAtom = new DirectionalAtom; + dAtom = new DirectionalAtom(index); simnfo->n_oriented++; the_atoms[index] = dAtom; @@ -408,7 +413,7 @@ void SimSetup::makeAtoms( void ){ dAtom->setSUz( uz ); } else{ - the_atoms[index] = new GeneralAtom; + the_atoms[index] = new GeneralAtom(index); } the_atoms[index]->setType( current_atom->getType() ); the_atoms[index]->setIndex( index );