65 |
|
ForceManager::ForceManager(SimInfo * info) : info_(info) { |
66 |
|
forceField_ = info_->getForceField(); |
67 |
|
fDecomp_ = new ForceMatrixDecomposition(info_); |
68 |
+ |
interactionMan_ = new InteractionManager(); |
69 |
|
} |
70 |
|
|
71 |
|
/** |
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(); |
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); |