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

Comparing branches/development/src/brains/SimInfo.cpp (file contents):
Revision 1532 by gezelter, Wed Dec 29 19:59:21 2010 UTC vs.
Revision 1534 by gezelter, Wed Dec 29 21:53:28 2010 UTC

# Line 63 | Line 63
63   #include "UseTheForce/ForceField.hpp"
64   #include "nonbonded/SwitchingFunction.hpp"
65  
66
66   #ifdef IS_MPI
67   #include "UseTheForce/mpiComponentPlan.h"
68   #include "UseTheForce/DarkSide/simParallel_interface.h"
# Line 745 | Line 744 | namespace OpenMD {
744        }            
745      }
746  
748    InteractionManager::Instance()->setCutoffRadius(cutoffRadius_);
749
747      map<string, CutoffMethod> stringToCutoffMethod;
748      stringToCutoffMethod["HARD"] = HARD;
749      stringToCutoffMethod["SWITCHING_FUNCTION"] = SWITCHING_FUNCTION;
# Line 778 | Line 775 | namespace OpenMD {
775          simError();
776          cutoffMethod_ = SHIFTED_FORCE;        
777      }
781
782    InteractionManager::Instance()->setCutoffMethod(cutoffMethod_);
778    }
779    
780    /**
# Line 811 | Line 806 | namespace OpenMD {
806        painCave.severity = OPENMD_WARNING;
807        simError();
808      }          
814  
815    InteractionManager::Instance()->setSwitchingRadius(switchingRadius_);
816
817    SwitchingFunctionType ft;
809      
810      if (simParams_->haveSwitchingFunctionType()) {
811        string funcType = simParams_->getSwitchingFunctionType();
812        toUpper(funcType);
813        if (funcType == "CUBIC") {
814 <        ft = cubic;
814 >        sft_ = cubic;
815        } else {
816          if (funcType == "FIFTH_ORDER_POLYNOMIAL") {
817 <          ft = fifth_order_poly;
817 >          sft_ = fifth_order_poly;
818          } else {
819            // throw error        
820            sprintf( painCave.errMsg,
# Line 837 | Line 828 | namespace OpenMD {
828          }          
829        }
830      }
840
841    InteractionManager::Instance()->setSwitchingFunctionType(ft);
831    }
832  
833    /**
834 <   * setupSkinThickness
834 >   * setupNeighborlists
835     *
836     *  If the skinThickness was explicitly set, use that value (but check it)
837     *  If the skinThickness was not explicitly set: use 1.0 angstroms
838     */
839 <  void SimInfo::setupSkinThickness() {    
839 >  void SimInfo::setupNeighborlists() {    
840      if (simParams_->haveSkinThickness()) {
841        skinThickness_ = simParams_->getSkinThickness();
842      } else {      
843        skinThickness_ = 1.0;
844        sprintf(painCave.errMsg,
845 <              "SimInfo Warning: No value was set for the skinThickness.\n"
845 >              "SimInfo: No value was set for the skinThickness.\n"
846                "\tOpenMD will use a default value of %f Angstroms\n"
847                "\tfor this simulation\n", skinThickness_);
848 +      painCave.severity = OPENMD_INFO;
849        painCave.isFatal = 0;
850        simError();
851      }            
852    }
853  
854 <  void SimInfo::setupSimType() {
865 <    set<AtomType*>::iterator i;
866 <    set<AtomType*> atomTypes;
867 <    atomTypes = getSimulatedAtomTypes();
868 <
854 >  void SimInfo::setupSimVariables() {
855      useAtomicVirial_ = simParams_->getUseAtomicVirial();
856 +    // we only call setAccumulateBoxDipole if the accumulateBoxDipole parameter is true
857 +    calcBoxDipole_ = false;
858 +    if ( simParams_->haveAccumulateBoxDipole() )
859 +      if ( simParams_->getAccumulateBoxDipole() ) {
860 +        calcBoxDipole_ = true;      
861 +      }
862  
863 +    set<AtomType*>::iterator i;
864 +    set<AtomType*> atomTypes;
865 +    atomTypes = getSimulatedAtomTypes();    
866      int usesElectrostatic = 0;
867      int usesMetallic = 0;
868      int usesDirectional = 0;
# Line 1062 | Line 1057 | namespace OpenMD {
1057   #endif
1058    }
1059  
1065
1066  void SimInfo::setupSwitchingFunction() {    
1067
1068  }
1060  
1061    void SimInfo::setupAccumulateBoxDipole() {    
1062  
1072    // we only call setAccumulateBoxDipole if the accumulateBoxDipole parameter is true
1073    if ( simParams_->haveAccumulateBoxDipole() )
1074      if ( simParams_->getAccumulateBoxDipole() ) {
1075        calcBoxDipole_ = true;
1076      }
1063  
1064    }
1065  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines