whitespace cleanup in USER-DPD

This commit is contained in:
Axel Kohlmeyer 2016-10-11 23:58:36 -04:00
parent 39a22039e9
commit adc98e07df
5 changed files with 15 additions and 15 deletions

View File

@ -687,7 +687,7 @@ void FixEOStableRX::temperature_lookup(int id, double ui, double &thetai)
double maxit = 100; double maxit = 100;
double temp; double temp;
double delta = 0.001; double delta = 0.001;
// Store the current thetai in t1 // Store the current thetai in t1
t1 = MAX(thetai,tb->lo); t1 = MAX(thetai,tb->lo);
t1 = MIN(t1,tb->hi); t1 = MIN(t1,tb->hi);
@ -731,7 +731,7 @@ void FixEOStableRX::temperature_lookup(int id, double ui, double &thetai)
if(it==maxit){ if(it==maxit){
char str[256]; char str[256];
sprintf(str,"Maxit exceeded in secant solver: id=%d ui=%lf thetai=%lf t1=%lf t2=%lf f1=%lf f2=%lf\n",id,ui,thetai,t1,t2,f1,f2); sprintf(str,"Maxit exceeded in secant solver: id=%d ui=%lf thetai=%lf t1=%lf t2=%lf f1=%lf f2=%lf\n",id,ui,thetai,t1,t2,f1,f2);
if(isnan(f1) || isnan(f2) || isnan(ui) || isnan(thetai) || isnan(t1) || isnan(t2)) if(isnan(f1) || isnan(f2) || isnan(ui) || isnan(thetai) || isnan(t1) || isnan(t2))
error->one(FLERR,"NaN detected in secant solver."); error->one(FLERR,"NaN detected in secant solver.");
error->one(FLERR,str); error->one(FLERR,str);
} }

View File

@ -231,7 +231,7 @@ FixRX::~FixRX()
memory->destroy( sparseKinetics_inu ); memory->destroy( sparseKinetics_inu );
memory->destroy( sparseKinetics_isIntegralReaction ); memory->destroy( sparseKinetics_isIntegralReaction );
} }
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
@ -1720,7 +1720,7 @@ void FixRX::computeLocalTemperature()
// Lucy's Weight Function // Lucy's Weight Function
if(wtFlag==LUCY){ if(wtFlag==LUCY){
wij = (1.0+3.0*ratio) * (1.0-ratio)*(1.0-ratio)*(1.0-ratio); wij = (1.0+3.0*ratio) * (1.0-ratio)*(1.0-ratio)*(1.0-ratio);
dpdThetaLocal[i] += wij/dpdTheta[j]; dpdThetaLocal[i] += wij/dpdTheta[j];
if (newton_pair || j < nlocal) if (newton_pair || j < nlocal)
dpdThetaLocal[j] += wij/dpdTheta[i]; dpdThetaLocal[j] += wij/dpdTheta[i];

View File

@ -451,7 +451,7 @@ void PairExp6rx::compute(int eflag, int vflag)
// //
// Apply Mixing Rule to get the overall force for the CG pair // Apply Mixing Rule to get the overall force for the CG pair
// //
if (isite1 == isite2) fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpairOldEXP6_12; if (isite1 == isite2) fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpairOldEXP6_12;
else fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpairOldEXP6_12 + sqrt(fractionOld2_i*fractionOld1_j)*fpairOldEXP6_21; else fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpairOldEXP6_12 + sqrt(fractionOld2_i*fractionOld1_j)*fpairOldEXP6_21;
f[i][0] += delx*fpair; f[i][0] += delx*fpair;
@ -588,7 +588,7 @@ void PairExp6rx::coeff(int narg, char **arg)
{ {
// Set isite1 and isite2 parameters based on site1 and site2 strings. // Set isite1 and isite2 parameters based on site1 and site2 strings.
if (strcmp(site1,"1fluid") == 0) if (strcmp(site1,"1fluid") == 0)
isite1 = oneFluidApproxParameter; isite1 = oneFluidApproxParameter;
else else
@ -602,7 +602,7 @@ void PairExp6rx::coeff(int narg, char **arg)
else else
isite1 = isp; isite1 = isp;
} }
if (strcmp(site2,"1fluid") == 0) if (strcmp(site2,"1fluid") == 0)
isite2 = oneFluidApproxParameter; isite2 = oneFluidApproxParameter;
else else
@ -616,7 +616,7 @@ void PairExp6rx::coeff(int narg, char **arg)
else else
isite2 = isp; isite2 = isp;
} }
// Set the interaction potential type to the enumerated type. // Set the interaction potential type to the enumerated type.
for (int iparam = 0; iparam < nparams; ++iparam) for (int iparam = 0; iparam < nparams; ++iparam)
{ {

View File

@ -234,7 +234,7 @@ void PairMultiLucyRX::compute(int eflag, int vflag)
} else error->one(FLERR,"Only LOOKUP and LINEAR table styles have been implemented for pair multi/lucy/rx"); } else error->one(FLERR,"Only LOOKUP and LINEAR table styles have been implemented for pair multi/lucy/rx");
if (isite1 == isite2) fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpair; if (isite1 == isite2) fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpair;
else fpair = (sqrt(fractionOld1_i*fractionOld2_j) + sqrt(fractionOld2_i*fractionOld1_j))*fpair; else fpair = (sqrt(fractionOld1_i*fractionOld2_j) + sqrt(fractionOld2_i*fractionOld1_j))*fpair;
fx_i += delx*fpair; fx_i += delx*fpair;
@ -935,7 +935,7 @@ void PairMultiLucyRX::getParams(int id, double &fractionOld1, double &fractionOl
nTotal = 0.0; nTotal = 0.0;
nTotalOld = 0.0; nTotalOld = 0.0;
for (int ispecies = 0; ispecies < nspecies; ispecies++){ for (int ispecies = 0; ispecies < nspecies; ispecies++){
nTotal += atom->dvector[ispecies][id]; nTotal += atom->dvector[ispecies][id];
nTotalOld += atom->dvector[ispecies+nspecies][id]; nTotalOld += atom->dvector[ispecies+nspecies][id];
} }

View File

@ -186,7 +186,7 @@ void PairTableRX::compute(int eflag, int vflag)
value = tb->f[itable] + fraction*tb->df[itable]; value = tb->f[itable] + fraction*tb->df[itable];
fpair = factor_lj * value; fpair = factor_lj * value;
} }
if (isite1 == isite2) fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpair; if (isite1 == isite2) fpair = sqrt(fractionOld1_i*fractionOld2_j)*fpair;
else fpair = (sqrt(fractionOld1_i*fractionOld2_j) + sqrt(fractionOld2_i*fractionOld1_j))*fpair; else fpair = (sqrt(fractionOld1_i*fractionOld2_j) + sqrt(fractionOld2_i*fractionOld1_j))*fpair;
fx_i += delx*fpair; fx_i += delx*fpair;
@ -1102,7 +1102,7 @@ double PairTableRX::single(int i, int j, int itype, int jtype, double rsq,
fforce = factor_lj * value; fforce = factor_lj * value;
} }
if (isite1 == isite2) fforce = sqrt(fraction1_i*fraction2_j)*fforce; if (isite1 == isite2) fforce = sqrt(fraction1_i*fraction2_j)*fforce;
else fforce = (sqrt(fraction1_i*fraction2_j) + sqrt(fraction2_i*fraction1_j))*fforce; else fforce = (sqrt(fraction1_i*fraction2_j) + sqrt(fraction2_i*fraction1_j))*fforce;
if (tabstyle == LOOKUP) if (tabstyle == LOOKUP)
@ -1146,17 +1146,17 @@ void PairTableRX::getParams(int id, double &fractionOld1, double &fractionOld2,
double nTotal = 0.0; double nTotal = 0.0;
double nTotalOld = 0.0; double nTotalOld = 0.0;
for (int ispecies = 0; ispecies < nspecies; ++ispecies){ for (int ispecies = 0; ispecies < nspecies; ++ispecies){
nTotal += atom->dvector[ispecies][id]; nTotal += atom->dvector[ispecies][id];
nTotalOld += atom->dvector[ispecies+nspecies][id]; nTotalOld += atom->dvector[ispecies+nspecies][id];
} }
if(nTotal < 1e-8 || nTotalOld < 1e-8) if(nTotal < 1e-8 || nTotalOld < 1e-8)
error->all(FLERR,"The number of molecules in CG particle is less than 1e-8."); error->all(FLERR,"The number of molecules in CG particle is less than 1e-8.");
if (isOneFluid(isite1) == false){ if (isOneFluid(isite1) == false){
fractionOld1 = atom->dvector[isite1+nspecies][id]/nTotalOld; fractionOld1 = atom->dvector[isite1+nspecies][id]/nTotalOld;
fraction1 = atom->dvector[isite1][id]/nTotal; fraction1 = atom->dvector[isite1][id]/nTotal;
} }
if (isOneFluid(isite2) == false){ if (isOneFluid(isite2) == false){
fractionOld2 = atom->dvector[isite2+nspecies][id]/nTotalOld; fractionOld2 = atom->dvector[isite2+nspecies][id]/nTotalOld;
fraction2 = atom->dvector[isite2][id]/nTotal; fraction2 = atom->dvector[isite2][id]/nTotal;
} }