USER-DPD: whitespace and indentation fixes
This commit is contained in:
@ -182,7 +182,8 @@ void PairDPDfdt::compute(int eflag, int vflag)
|
|||||||
wr = 1.0 - r/cut[itype][jtype];
|
wr = 1.0 - r/cut[itype][jtype];
|
||||||
wd = wr*wr;
|
wd = wr*wr;
|
||||||
randnum = random->gaussian();
|
randnum = random->gaussian();
|
||||||
gamma_ij = sigma[itype][jtype]*sigma[itype][jtype]/(2.0*force->boltz*temperature);
|
gamma_ij = sigma[itype][jtype]*sigma[itype][jtype]
|
||||||
|
/ (2.0*force->boltz*temperature);
|
||||||
|
|
||||||
// conservative force = a0 * wd
|
// conservative force = a0 * wd
|
||||||
// drag force = -gamma * wd^2 * (delx dot delv) / r
|
// drag force = -gamma * wd^2 * (delx dot delv) / r
|
||||||
|
|||||||
@ -172,8 +172,8 @@ void PairDPDfdtEnergy::compute(int eflag, int vflag)
|
|||||||
memory->create(duCond,nlocal+nghost,"pair:duCond");
|
memory->create(duCond,nlocal+nghost,"pair:duCond");
|
||||||
memory->create(duMech,nlocal+nghost,"pair:duMech");
|
memory->create(duMech,nlocal+nghost,"pair:duMech");
|
||||||
for (int ii = 0; ii < nlocal+nghost; ii++) {
|
for (int ii = 0; ii < nlocal+nghost; ii++) {
|
||||||
duCond[ii] = double(0.0);
|
duCond[ii] = 0.0;
|
||||||
duMech[ii] = double(0.0);
|
duMech[ii] = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// loop over neighbors of my atoms
|
// loop over neighbors of my atoms
|
||||||
@ -214,10 +214,11 @@ void PairDPDfdtEnergy::compute(int eflag, int vflag)
|
|||||||
randnum = random->gaussian();
|
randnum = random->gaussian();
|
||||||
|
|
||||||
// Compute the current temperature
|
// Compute the current temperature
|
||||||
theta_ij = double(0.5)*(double(1.0)/dpdTheta[i] + double(1.0)/dpdTheta[j]);
|
theta_ij = 0.5*(1.0/dpdTheta[i] + 1.0/dpdTheta[j]);
|
||||||
theta_ij = double(1.0)/theta_ij;
|
theta_ij = 1.0/theta_ij;
|
||||||
|
|
||||||
gamma_ij = sigma[itype][jtype]*sigma[itype][jtype]/(2.0*force->boltz*theta_ij);
|
gamma_ij = sigma[itype][jtype]*sigma[itype][jtype]
|
||||||
|
/ (2.0*force->boltz*theta_ij);
|
||||||
|
|
||||||
// conservative force = a0 * wr
|
// conservative force = a0 * wr
|
||||||
// drag force = -gamma * wr^2 * (delx dot delv) / r
|
// drag force = -gamma * wr^2 * (delx dot delv) / r
|
||||||
@ -244,16 +245,17 @@ void PairDPDfdtEnergy::compute(int eflag, int vflag)
|
|||||||
mass_i = mass[itype];
|
mass_i = mass[itype];
|
||||||
mass_j = mass[jtype];
|
mass_j = mass[jtype];
|
||||||
}
|
}
|
||||||
massinv_i = double(1.0) / mass_i;
|
massinv_i = 1.0 / mass_i;
|
||||||
massinv_j = double(1.0) / mass_j;
|
massinv_j = 1.0 / mass_j;
|
||||||
|
|
||||||
// Compute the mechanical and conductive energy, uMech and uCond
|
// Compute the mechanical and conductive energy, uMech and uCond
|
||||||
mu_ij = massinv_i + massinv_j;
|
mu_ij = massinv_i + massinv_j;
|
||||||
mu_ij *= force->ftm2v;
|
mu_ij *= force->ftm2v;
|
||||||
|
|
||||||
uTmp = gamma_ij*wd*rinv*rinv*dot*dot - double(0.5)*sigma[itype][jtype]*sigma[itype][jtype]*mu_ij*wd;
|
uTmp = gamma_ij*wd*rinv*rinv*dot*dot
|
||||||
|
- 0.5*sigma[itype][jtype]*sigma[itype][jtype]*mu_ij*wd;
|
||||||
uTmp -= sigma[itype][jtype]*wr*rinv*dot*randnum*dtinvsqrt;
|
uTmp -= sigma[itype][jtype]*wr*rinv*dot*randnum*dtinvsqrt;
|
||||||
uTmp *= double(0.5);
|
uTmp *= 0.5;
|
||||||
|
|
||||||
duMech[i] += uTmp;
|
duMech[i] += uTmp;
|
||||||
if (newton_pair || j < nlocal) {
|
if (newton_pair || j < nlocal) {
|
||||||
@ -266,7 +268,7 @@ void PairDPDfdtEnergy::compute(int eflag, int vflag)
|
|||||||
alpha_ij = sqrt(2.0*force->boltz*kappa_ij);
|
alpha_ij = sqrt(2.0*force->boltz*kappa_ij);
|
||||||
randPair = alpha_ij*wr*randnum*dtinvsqrt;
|
randPair = alpha_ij*wr*randnum*dtinvsqrt;
|
||||||
|
|
||||||
uTmp = kappa_ij*(double(1.0)/dpdTheta[i] - double(1.0)/dpdTheta[j])*wd;
|
uTmp = kappa_ij*(1.0/dpdTheta[i] - 1.0/dpdTheta[j])*wd;
|
||||||
uTmp += randPair;
|
uTmp += randPair;
|
||||||
|
|
||||||
duCond[i] += uTmp;
|
duCond[i] += uTmp;
|
||||||
|
|||||||
Reference in New Issue
Block a user