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

Comparing branches/development/src/brains/ForceManager.cpp (file contents):
Revision 1576 by gezelter, Wed Jun 8 16:05:07 2011 UTC vs.
Revision 1577 by gezelter, Wed Jun 8 20:26:56 2011 UTC

# Line 65 | Line 65 | namespace OpenMD {
65    ForceManager::ForceManager(SimInfo * info) : info_(info) {
66      forceField_ = info_->getForceField();
67      fDecomp_ = new ForceMatrixDecomposition(info_);
68 +    interactionMan_ = new InteractionManager();
69    }
70  
71    /**
# Line 205 | Line 206 | namespace OpenMD {
206     */
207    void ForceManager::setupSwitching() {
208      Globals* simParams_ = info_->getSimParams();
209 +
210 +    // create the switching function object:
211 +    switcher_ = new SwitchingFunction();
212      
213      if (simParams_->haveSwitchingRadius()) {
214        rSwitch_ = simParams_->getSwitchingRadius();
215        if (rSwitch_ > rCut_) {        
216          sprintf(painCave.errMsg,
217 <                "ForceManager::setupSwitching: switchingRadius (%f) is larger than cutoffRadius(%f)\n",
218 <                rSwitch_, rCut_);
217 >                "ForceManager::setupSwitching: switchingRadius (%f) is larger "
218 >                "than the cutoffRadius(%f)\n", rSwitch_, rCut_);
219          painCave.isFatal = 1;
220          painCave.severity = OPENMD_ERROR;
221          simError();
# Line 227 | Line 231 | namespace OpenMD {
231        simError();
232      }          
233      
234 +    // Default to cubic switching function.
235 +    sft_ = cubic;
236      if (simParams_->haveSwitchingFunctionType()) {
237        string funcType = simParams_->getSwitchingFunctionType();
238        toUpper(funcType);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines