ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/SimCreator.cpp
(Generate patch)

Comparing branches/development/src/brains/SimCreator.cpp (file contents):
Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC vs.
Revision 1577 by gezelter, Wed Jun 8 20:26:56 2011 UTC

# Line 234 | Line 234 | namespace OpenMD {
234    
235    SimInfo*  SimCreator::createSim(const std::string & mdFileName,
236                                    bool loadInitCoords) {
237 <
237 >    
238      const int bufferSize = 65535;
239      char buffer[bufferSize];
240      int lineNo = 0;
# Line 369 | Line 369 | namespace OpenMD {
369      }
370      
371      ff->parse(forcefieldFileName);
372    ff->setFortranForceOptions();
372      //create SimInfo
373      SimInfo * info = new SimInfo(ff, simParams);
374  
# Line 387 | Line 386 | namespace OpenMD {
386      //create the molecules
387      createMolecules(info);
388      
390    
389      //allocate memory for DataStorage(circular reference, need to
390      //break it)
391      info->setSnapshotManager(new SimSnapshotManager(info));
# Line 413 | Line 411 | namespace OpenMD {
411      
412      if (loadInitCoords)
413        loadCoordinates(info, mdFileName);    
416    
414      return info;
415    }
416    
# Line 721 | Line 718 | namespace OpenMD {
718          
719        }      
720      }
721 <    
721 >  
722   #ifdef IS_MPI    
723      // Since the globalGroupMembership has been zero filled and we've only
724      // poked values into the atoms we know, we can do an Allreduce
# Line 798 | Line 795 | namespace OpenMD {
795    
796    void SimCreator::loadCoordinates(SimInfo* info, const std::string& mdFileName) {
797      Globals* simParams;
798 +
799      simParams = info->getSimParams();
800      
803    
801      DumpReader reader(info, mdFileName);
802      int nframes = reader.getNFrames();
803 <    
803 >
804      if (nframes > 0) {
805        reader.readFrame(nframes - 1);
806      } else {
# Line 814 | Line 811 | namespace OpenMD {
811        painCave.isFatal = 1;
812        simError();
813      }
817    
814      //copy the current snapshot to previous snapshot
815      info->getSnapshotManager()->advance();
816    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines