Ejemplo n.º 1
0
   /*
   * Load internal state from an archive.
   */
   void McSimulation::loadParameters(Serializable::IArchive &ar)
   {
      if (isInitialized_) {
         UTIL_THROW("Error: Called readParam when already initialized");
      }
      #ifdef UTIL_MPI
      if (hasIoCommunicator()) {
         UTIL_THROW("Error: Has a param communicator in loadParameters");
      }
      #endif

      Simulation::loadParameters(ar);
      loadParamComposite(ar, system());
      loadParamComposite(ar, *mcMoveManagerPtr_);
      loadParamComposite(ar, analyzerManager());
      loadParameter<int>(ar, "saveInterval", saveInterval_);
      if (saveInterval_ > 0) {
         loadParameter<std::string>(ar, "saveFileName", saveFileName_);
      }

      system().loadConfig(ar);
      ar >> iStep_;
      isValid();
      isInitialized_ = true;
   }
Ejemplo n.º 2
0
 void System::loadTetherMaster(Serializable::IArchive &ar)
 {
    if (simulation().hasTether()) {
       tetherMasterPtr_ = new TetherMaster();
       loadParamComposite(ar, *tetherMasterPtr_);
    }
 }
Ejemplo n.º 3
0
 void System::loadLinkMaster(Serializable::IArchive& ar)
 {
    if (simulation().nLinkType() > 0) {
       linkMasterPtr_ = new LinkMaster();
       loadParamComposite(ar, *linkMasterPtr_);
    }
 }
Ejemplo n.º 4
0
 /*
 * Load EnergyEnsemble and BoundaryEnsemble.
 */
 void System::loadEnsembles(Serializable::IArchive& ar)
 {
    loadParamComposite(ar, *energyEnsemblePtr_);
    loadParamComposite(ar, *boundaryEnsemblePtr_);
 }