Removed comments in fene_nm

This commit is contained in:
jddietz
2021-09-24 13:41:18 -04:00
parent a83797091b
commit 5229a4e765

View File

@ -29,12 +29,6 @@
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using MathConst::MY_CUBEROOT2; using MathConst::MY_CUBEROOT2;
/* ---------------------------------------------------------------------- */
BondFENEnm::BondFENEnm(LAMMPS *lmp) : BondFENE(lmp)
{
// MY_CUBEROOT2 = pow(2.0,(1.0/3.0));
}
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
@ -85,13 +79,13 @@ void BondFENEnm::compute(int eflag, int vflag)
r0sq = r0[type] * r0[type]; r0sq = r0[type] * r0[type];
rlogarg = 1.0 - rsq/r0sq; rlogarg = 1.0 - rsq/r0sq;
// if r -> r0, then rlogarg < 0.0 which is an error // if r -> r0, then rlogarg < 0.0 which is an error
// issue a warning and reset rlogarg = epsilon // issue a warning and reset rlogarg = epsilon
// if r > 2*r0 something serious is wrong, abort // if r > 2*r0 something serious is wrong, abort
// change cutuff from .1 to .02 so only bond lengths > 1.485 give the warning // change cutuff from .1 to .02 so only bond lengths > 1.485 give the warning
// and crash the run if rlogarg < -.21 rather than < 3 // and crash the run if rlogarg < -.21 rather than < 3
// Don't print out warnings, only errors // Don't print out warnings, only errors
if (rlogarg < .02) { if (rlogarg < .02) {
char str[128]; char str[128];
sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " sprintf(str,"FENE bond too long: " BIGINT_FORMAT " "
@ -103,8 +97,8 @@ void BondFENEnm::compute(int eflag, int vflag)
fbond = -k[type]/rlogarg; fbond = -k[type]/rlogarg;
// force from n-m term // force from n-m term
// MY_CUBEROOT2 cutoff assumes sigma = 2^{1/6} // MY_CUBEROOT2 cutoff assumes sigma = 2^{1/6}
if (rsq < MY_CUBEROOT2) { if (rsq < MY_CUBEROOT2) {
r = sqrt(rsq); r = sqrt(rsq);
fbond += epsilon[type]*(nn[type]*mm[type]/(nn[type]-mm[type]))*(pow(sigma[type]/r,nn[type])-pow(sigma[type]/r,mm[type]))/rsq; fbond += epsilon[type]*(nn[type]*mm[type]/(nn[type]-mm[type]))*(pow(sigma[type]/r,nn[type])-pow(sigma[type]/r,mm[type]))/rsq;
@ -269,7 +263,7 @@ double BondFENEnm::single(int type, double rsq, int /*i*/, int /*j*/,
{ {
double r0sq = r0[type] * r0[type]; double r0sq = r0[type] * r0[type];
double rlogarg = 1.0 - rsq/r0sq; double rlogarg = 1.0 - rsq/r0sq;
double r; double r;
// if r -> r0, then rlogarg < 0.0 which is an error // if r -> r0, then rlogarg < 0.0 which is an error
// issue a warning and reset rlogarg = epsilon // issue a warning and reset rlogarg = epsilon
// if r > 2*r0 something serious is wrong, abort // if r > 2*r0 something serious is wrong, abort