From adc98e07df5dab4fc4a60d8359c56f0430b1a0cd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 11 Oct 2016 23:58:36 -0400 Subject: [PATCH] whitespace cleanup in USER-DPD --- src/USER-DPD/fix_eos_table_rx.cpp | 4 ++-- src/USER-DPD/fix_rx.cpp | 4 ++-- src/USER-DPD/pair_exp6_rx.cpp | 8 ++++---- src/USER-DPD/pair_multi_lucy_rx.cpp | 4 ++-- src/USER-DPD/pair_table_rx.cpp | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/USER-DPD/fix_eos_table_rx.cpp b/src/USER-DPD/fix_eos_table_rx.cpp index 4cd6ffc755..85c3a6dd2a 100644 --- a/src/USER-DPD/fix_eos_table_rx.cpp +++ b/src/USER-DPD/fix_eos_table_rx.cpp @@ -687,7 +687,7 @@ void FixEOStableRX::temperature_lookup(int id, double ui, double &thetai) double maxit = 100; double temp; double delta = 0.001; - + // Store the current thetai in t1 t1 = MAX(thetai,tb->lo); t1 = MIN(t1,tb->hi); @@ -731,7 +731,7 @@ void FixEOStableRX::temperature_lookup(int id, double ui, double &thetai) if(it==maxit){ 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); - 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,str); } diff --git a/src/USER-DPD/fix_rx.cpp b/src/USER-DPD/fix_rx.cpp index 96f7f44422..67b134e53e 100644 --- a/src/USER-DPD/fix_rx.cpp +++ b/src/USER-DPD/fix_rx.cpp @@ -231,7 +231,7 @@ FixRX::~FixRX() memory->destroy( sparseKinetics_inu ); memory->destroy( sparseKinetics_isIntegralReaction ); } -} +} /* ---------------------------------------------------------------------- */ @@ -1720,7 +1720,7 @@ void FixRX::computeLocalTemperature() // Lucy's Weight Function 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]; if (newton_pair || j < nlocal) dpdThetaLocal[j] += wij/dpdTheta[i]; diff --git a/src/USER-DPD/pair_exp6_rx.cpp b/src/USER-DPD/pair_exp6_rx.cpp index 060ef2d7c1..ad2dbf1465 100644 --- a/src/USER-DPD/pair_exp6_rx.cpp +++ b/src/USER-DPD/pair_exp6_rx.cpp @@ -451,7 +451,7 @@ void PairExp6rx::compute(int eflag, int vflag) // // 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; 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. - + if (strcmp(site1,"1fluid") == 0) isite1 = oneFluidApproxParameter; else @@ -602,7 +602,7 @@ void PairExp6rx::coeff(int narg, char **arg) else isite1 = isp; } - + if (strcmp(site2,"1fluid") == 0) isite2 = oneFluidApproxParameter; else @@ -616,7 +616,7 @@ void PairExp6rx::coeff(int narg, char **arg) else isite2 = isp; } - + // Set the interaction potential type to the enumerated type. for (int iparam = 0; iparam < nparams; ++iparam) { diff --git a/src/USER-DPD/pair_multi_lucy_rx.cpp b/src/USER-DPD/pair_multi_lucy_rx.cpp index de86733725..cf10a70756 100644 --- a/src/USER-DPD/pair_multi_lucy_rx.cpp +++ b/src/USER-DPD/pair_multi_lucy_rx.cpp @@ -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"); - 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; fx_i += delx*fpair; @@ -935,7 +935,7 @@ void PairMultiLucyRX::getParams(int id, double &fractionOld1, double &fractionOl nTotal = 0.0; nTotalOld = 0.0; for (int ispecies = 0; ispecies < nspecies; ispecies++){ - nTotal += atom->dvector[ispecies][id]; + nTotal += atom->dvector[ispecies][id]; nTotalOld += atom->dvector[ispecies+nspecies][id]; } diff --git a/src/USER-DPD/pair_table_rx.cpp b/src/USER-DPD/pair_table_rx.cpp index 44a9d76022..74b9222a0b 100644 --- a/src/USER-DPD/pair_table_rx.cpp +++ b/src/USER-DPD/pair_table_rx.cpp @@ -186,7 +186,7 @@ void PairTableRX::compute(int eflag, int vflag) value = tb->f[itable] + fraction*tb->df[itable]; 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; 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; } - 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; if (tabstyle == LOOKUP) @@ -1146,17 +1146,17 @@ void PairTableRX::getParams(int id, double &fractionOld1, double &fractionOld2, double nTotal = 0.0; double nTotalOld = 0.0; for (int ispecies = 0; ispecies < nspecies; ++ispecies){ - nTotal += atom->dvector[ispecies][id]; + nTotal += atom->dvector[ispecies][id]; nTotalOld += atom->dvector[ispecies+nspecies][id]; } if(nTotal < 1e-8 || nTotalOld < 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; fraction1 = atom->dvector[isite1][id]/nTotal; } - if (isOneFluid(isite2) == false){ + if (isOneFluid(isite2) == false){ fractionOld2 = atom->dvector[isite2+nspecies][id]/nTotalOld; fraction2 = atom->dvector[isite2][id]/nTotal; }