| 55 |
|
#include "UseTheForce/fCutoffPolicy.h" |
| 56 |
|
#include "UseTheForce/DarkSide/fElectrostaticSummationMethod.h" |
| 57 |
|
#include "UseTheForce/DarkSide/fElectrostaticScreeningMethod.h" |
| 58 |
+ |
#include "UseTheForce/DarkSide/fSwitchingFunctionType.h" |
| 59 |
|
#include "UseTheForce/doForces_interface.h" |
| 60 |
|
#include "UseTheForce/DarkSide/electrostatic_interface.h" |
| 61 |
|
#include "UseTheForce/notifyCutoffs_interface.h" |
| 62 |
+ |
#include "UseTheForce/DarkSide/switcheroo_interface.h" |
| 63 |
|
#include "utils/MemoryUtils.hpp" |
| 64 |
|
#include "utils/simError.h" |
| 65 |
|
#include "selection/SelectionManager.hpp" |
| 474 |
|
int isError = 0; |
| 475 |
|
|
| 476 |
|
setupElectrostaticSummationMethod( isError ); |
| 477 |
+ |
setupSwitchingFunction(); |
| 478 |
|
|
| 479 |
|
if(isError){ |
| 480 |
|
sprintf( painCave.errMsg, |
| 981 |
|
initFortranFF( &esm, &errorOut ); |
| 982 |
|
} |
| 983 |
|
|
| 984 |
+ |
void SimInfo::setupSwitchingFunction() { |
| 985 |
+ |
int ft = CUBIC; |
| 986 |
+ |
|
| 987 |
+ |
if (simParams_->haveSwitchingFunctionType()) { |
| 988 |
+ |
std::string funcType = simParams_->getSwitchingFunctionType(); |
| 989 |
+ |
toUpper(funcType); |
| 990 |
+ |
if (funcType == "CUBIC") { |
| 991 |
+ |
ft = CUBIC; |
| 992 |
+ |
} else { |
| 993 |
+ |
if (funcType == "FIFTH_ORDER_POLYNOMIAL") { |
| 994 |
+ |
ft = FIFTH_ORDER_POLY; |
| 995 |
+ |
} else { |
| 996 |
+ |
// throw error |
| 997 |
+ |
sprintf( painCave.errMsg, |
| 998 |
+ |
"SimInfo error: Unknown switchingFunctionType. (Input file specified %s .)\n\tswitchingFunctionType must be one of: \"cubic\" or \"fifth_order_polynomial\".", funcType.c_str() ); |
| 999 |
+ |
painCave.isFatal = 1; |
| 1000 |
+ |
simError(); |
| 1001 |
+ |
} |
| 1002 |
+ |
} |
| 1003 |
+ |
} |
| 1004 |
+ |
|
| 1005 |
+ |
// send switching function notification to switcheroo |
| 1006 |
+ |
setFunctionType(&ft); |
| 1007 |
+ |
|
| 1008 |
+ |
} |
| 1009 |
+ |
|
| 1010 |
|
void SimInfo::addProperty(GenericData* genData) { |
| 1011 |
|
properties_.addProperty(genData); |
| 1012 |
|
} |