| 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" |
| 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) { |