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 1530 by gezelter, Tue Dec 28 21:47:55 2010 UTC vs.
Revision 1534 by gezelter, Wed Dec 29 21:53:28 2010 UTC

# Line 54 | Line 54
54   #include "math/Vector3.hpp"
55   #include "primitives/Molecule.hpp"
56   #include "primitives/StuntDouble.hpp"
57 #include "UseTheForce/fCutoffPolicy.h"
57   #include "UseTheForce/doForces_interface.h"
58   #include "UseTheForce/DarkSide/neighborLists_interface.h"
59   #include "utils/MemoryUtils.hpp"
# Line 64 | Line 63
63   #include "UseTheForce/ForceField.hpp"
64   #include "nonbonded/SwitchingFunction.hpp"
65  
67
66   #ifdef IS_MPI
67   #include "UseTheForce/mpiComponentPlan.h"
68   #include "UseTheForce/DarkSide/simParallel_interface.h"
# Line 745 | Line 743 | namespace OpenMD {
743          simError();
744        }            
745      }
748
749    InteractionManager::Instance()->setCutoffRadius(cutoffRadius_);
746  
747      map<string, CutoffMethod> stringToCutoffMethod;
748      stringToCutoffMethod["HARD"] = HARD;
# Line 779 | Line 775 | namespace OpenMD {
775          simError();
776          cutoffMethod_ = SHIFTED_FORCE;        
777      }
782
783    InteractionManager::Instance()->setCutoffMethod(cutoffMethod_);
778    }
779    
780    /**
# Line 812 | Line 806 | namespace OpenMD {
806        painCave.severity = OPENMD_WARNING;
807        simError();
808      }          
815  
816    InteractionManager::Instance()->setSwitchingRadius(switchingRadius_);
817
818    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 838 | Line 828 | namespace OpenMD {
828          }          
829        }
830      }
841
842    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() {
866 <    set<AtomType*>::iterator i;
867 <    set<AtomType*> atomTypes;
868 <    atomTypes = getSimulatedAtomTypes();
869 <
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 1064 | Line 1058 | namespace OpenMD {
1058    }
1059  
1060  
1067  void SimInfo::setupSwitchingFunction() {    
1068
1069  }
1070
1061    void SimInfo::setupAccumulateBoxDipole() {    
1062  
1073    // we only call setAccumulateBoxDipole if the accumulateBoxDipole parameter is true
1074    if ( simParams_->haveAccumulateBoxDipole() )
1075      if ( simParams_->getAccumulateBoxDipole() ) {
1076        calcBoxDipole_ = true;
1077      }
1063  
1064    }
1065  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines