ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/brains/SimInfo.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/brains/SimInfo.cpp (file contents):
Revision 2279 by chrisfen, Tue Aug 30 18:23:50 2005 UTC vs.
Revision 2285 by gezelter, Wed Sep 7 20:46:46 2005 UTC

# Line 52 | Line 52
52   #include "brains/SimInfo.hpp"
53   #include "math/Vector3.hpp"
54   #include "primitives/Molecule.hpp"
55 + #include "UseTheForce/fCutoffPolicy.h"
56   #include "UseTheForce/doForces_interface.h"
57   #include "UseTheForce/notifyCutoffs_interface.h"
58   #include "utils/MemoryUtils.hpp"
# Line 841 | Line 842 | namespace oopse {
842      }
843    }
844  
845 <  void SimInfo::setupCutoff() {
845 >  void SimInfo::setupCutoff() {    
846      getCutoff(rcut_, rsw_);    
847      double rnblist = rcut_ + 1; // skin of neighbor list
848  
849      //Pass these cutoff radius etc. to fortran. This function should be called once and only once
850 <    notifyFortranCutoffs(&rcut_, &rsw_, &rnblist);
850 >    
851 >    int cp =  TRADITIONAL_CUTOFF_POLICY;
852 >    if (simParams_->haveCutoffPolicy()) {
853 >      std::string myPolicy = simParams_->getCutoffPolicy();
854 >      if (myPolicy == "MIX") {
855 >        cp = MIX_CUTOFF_POLICY;
856 >      } else {
857 >        if (myPolicy == "MAX") {
858 >          cp = MAX_CUTOFF_POLICY;
859 >        } else {
860 >          if (myPolicy == "TRADITIONAL") {            
861 >            cp = TRADITIONAL_CUTOFF_POLICY;
862 >          } else {
863 >            // throw error        
864 >            sprintf( painCave.errMsg,
865 >                     "SimInfo error: Unknown cutoffPolicy. (Input file specified %s .)\n\tcutoffPolicy must be one of: \"Mix\", \"Max\", or \"Traditional\".", myPolicy.c_str() );
866 >            painCave.isFatal = 1;
867 >            simError();
868 >          }    
869 >        }          
870 >      }
871 >    }
872 >    notifyFortranCutoffs(&rcut_, &rsw_, &rnblist, &cp);
873    }
874  
875    void SimInfo::addProperty(GenericData* genData) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines