remove trailing whitespace
This commit is contained in:
@ -110,18 +110,18 @@ void FixNVESphereOMP::initial_integrate(int vflag)
|
||||
matrix Q, Q_temp, R;
|
||||
|
||||
if (mask[i] & groupbit && mu[i][3] > 0.0) {
|
||||
|
||||
|
||||
// Construct Q from dipole:
|
||||
// Q is the rotation matrix from space frame to body frame
|
||||
// i.e. v_b = Q.v_s
|
||||
|
||||
|
||||
// Define mu to lie along the z axis in the body frame
|
||||
// We take the unit dipole to avoid getting a scaling matrix
|
||||
const double inv_len_mu = 1.0/mu[i][3];
|
||||
a[0] = mu[i][0]*inv_len_mu;
|
||||
a[1] = mu[i][1]*inv_len_mu;
|
||||
a[2] = mu[i][2]*inv_len_mu;
|
||||
|
||||
|
||||
// v = a x [0 0 1] - cross product of mu in space and body frames
|
||||
// s = |v|
|
||||
// c = a.[0 0 1] = a[2]
|
||||
@ -130,11 +130,11 @@ void FixNVESphereOMP::initial_integrate(int vflag)
|
||||
// -v[1] v[0] 0 ]
|
||||
// then
|
||||
// Q = I + vx + vx^2 * (1-c)/s^2
|
||||
|
||||
|
||||
const double s2 = a[0]*a[0] + a[1]*a[1];
|
||||
if (s2 != 0.0){ // i.e. the vectors are not parallel
|
||||
const double scale = (1.0 - a[2])/s2;
|
||||
|
||||
|
||||
Q[0][0] = 1.0 - scale*a[0]*a[0]; Q[0][1] = -scale*a[0]*a[1]; Q[0][2] = -a[0];
|
||||
Q[1][0] = -scale*a[0]*a[1]; Q[1][1] = 1.0 - scale*a[1]*a[1]; Q[1][2] = -a[1];
|
||||
Q[2][0] = a[0]; Q[2][1] = a[1]; Q[2][2] = 1.0 - scale*(a[0]*a[0] + a[1]*a[1]);
|
||||
@ -143,62 +143,62 @@ void FixNVESphereOMP::initial_integrate(int vflag)
|
||||
Q[1][0] = 0.0; Q[1][1] = 1.0/a[2]; Q[1][2] = 0.0;
|
||||
Q[2][0] = 0.0; Q[2][1] = 0.0; Q[2][2] = 1.0/a[2];
|
||||
}
|
||||
|
||||
|
||||
// Local copy of this particle's angular velocity (in space frame)
|
||||
w[0] = omega[i][0]; w[1] = omega[i][1]; w[2] = omega[i][2];
|
||||
|
||||
|
||||
// Transform omega into body frame: w_temp= Q.w
|
||||
matvec(Q,w,w_temp);
|
||||
|
||||
|
||||
// Construct rotation R1
|
||||
BuildRxMatrix(R, dtf/force->ftm2v*w_temp[0]);
|
||||
|
||||
|
||||
// Apply R1 to w: w = R.w_temp
|
||||
matvec(R,w_temp,w);
|
||||
|
||||
|
||||
// Apply R1 to Q: Q_temp = R^T.Q
|
||||
transpose_times3(R,Q,Q_temp);
|
||||
|
||||
|
||||
// Construct rotation R2
|
||||
BuildRyMatrix(R, dtf/force->ftm2v*w[1]);
|
||||
|
||||
|
||||
// Apply R2 to w: w_temp = R.w
|
||||
matvec(R,w,w_temp);
|
||||
|
||||
|
||||
// Apply R2 to Q: Q = R^T.Q_temp
|
||||
transpose_times3(R,Q_temp,Q);
|
||||
|
||||
|
||||
// Construct rotation R3
|
||||
BuildRzMatrix(R, 2.0*dtf/force->ftm2v*w_temp[2]);
|
||||
|
||||
|
||||
// Apply R3 to w: w = R.w_temp
|
||||
matvec(R,w_temp,w);
|
||||
|
||||
|
||||
// Apply R3 to Q: Q_temp = R^T.Q
|
||||
transpose_times3(R,Q,Q_temp);
|
||||
|
||||
|
||||
// Construct rotation R4
|
||||
BuildRyMatrix(R, dtf/force->ftm2v*w[1]);
|
||||
|
||||
|
||||
// Apply R4 to w: w_temp = R.w
|
||||
matvec(R,w,w_temp);
|
||||
|
||||
|
||||
// Apply R4 to Q: Q = R^T.Q_temp
|
||||
transpose_times3(R,Q_temp,Q);
|
||||
|
||||
|
||||
// Construct rotation R5
|
||||
BuildRxMatrix(R, dtf/force->ftm2v*w_temp[0]);
|
||||
|
||||
|
||||
// Apply R5 to w: w = R.w_temp
|
||||
matvec(R,w_temp,w);
|
||||
|
||||
|
||||
// Apply R5 to Q: Q_temp = R^T.Q
|
||||
transpose_times3(R,Q,Q_temp);
|
||||
|
||||
|
||||
// Transform w back into space frame w_temp = Q^T.w
|
||||
transpose_matvec(Q_temp,w,w_temp);
|
||||
omega[i][0] = w_temp[0]; omega[i][1] = w_temp[1]; omega[i][2] = w_temp[2];
|
||||
|
||||
|
||||
// Set dipole according to updated Q: mu = Q^T.[0 0 1] * |mu|
|
||||
mu[i][0] = Q_temp[2][0] * mu[i][3];
|
||||
mu[i][1] = Q_temp[2][1] * mu[i][3];
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(full/bin/ghost/omp,
|
||||
NPairFullBinGhostOmp,
|
||||
NP_FULL | NP_BIN | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_FULL | NP_BIN | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(full/bin/omp,
|
||||
NPairFullBinOmp,
|
||||
NP_FULL | NP_BIN | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_FULL | NP_BIN | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(full/multi/omp,
|
||||
NPairFullMultiOmp,
|
||||
NP_FULL | NP_MULTI | NP_OMP |
|
||||
NP_FULL | NP_MULTI | NP_OMP |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(full/nsq/ghost/omp,
|
||||
NPairFullNsqGhostOmp,
|
||||
NP_FULL | NP_NSQ | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_FULL | NP_NSQ | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(full/nsq/omp,
|
||||
NPairFullNsqOmp,
|
||||
NP_FULL | NP_NSQ | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_FULL | NP_NSQ | NP_OMP | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -26,7 +26,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfBinNewtoffGhostOmp::NPairHalfBinNewtoffGhostOmp(LAMMPS *lmp) :
|
||||
NPairHalfBinNewtoffGhostOmp::NPairHalfBinNewtoffGhostOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/bin/newtoff/ghost/omp,
|
||||
NPairHalfBinNewtoffGhostOmp,
|
||||
NP_HALF | NP_BIN | NP_NEWTOFF | NP_GHOST | NP_OMP |
|
||||
NP_HALF | NP_BIN | NP_NEWTOFF | NP_GHOST | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -26,7 +26,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfMultiNewtonTriOmp::NPairHalfMultiNewtonTriOmp(LAMMPS *lmp) :
|
||||
NPairHalfMultiNewtonTriOmp::NPairHalfMultiNewtonTriOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -27,7 +27,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfNsqNewtoffGhostOmp::NPairHalfNsqNewtoffGhostOmp(LAMMPS *lmp) :
|
||||
NPairHalfNsqNewtoffGhostOmp::NPairHalfNsqNewtoffGhostOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/nsq/newtoff/ghost/omp,
|
||||
NPairHalfNsqNewtoffGhostOmp,
|
||||
NP_HALF | NP_NSQ | NP_NEWTOFF | NP_GHOST | NP_OMP |
|
||||
NP_HALF | NP_NSQ | NP_NEWTOFF | NP_GHOST | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -26,7 +26,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfRespaBinNewtoffOmp::NPairHalfRespaBinNewtoffOmp(LAMMPS *lmp) :
|
||||
NPairHalfRespaBinNewtoffOmp::NPairHalfRespaBinNewtoffOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/respa/bin/newtoff/omp,
|
||||
NPairHalfRespaBinNewtoffOmp,
|
||||
NP_HALF | NP_RESPA | NP_BIN | NP_NEWTOFF | NP_OMP |
|
||||
NP_HALF | NP_RESPA | NP_BIN | NP_NEWTOFF | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -26,7 +26,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfRespaBinNewtonOmp::NPairHalfRespaBinNewtonOmp(LAMMPS *lmp) :
|
||||
NPairHalfRespaBinNewtonOmp::NPairHalfRespaBinNewtonOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -26,7 +26,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfRespaBinNewtonTriOmp::NPairHalfRespaBinNewtonTriOmp(LAMMPS *lmp) :
|
||||
NPairHalfRespaBinNewtonTriOmp::NPairHalfRespaBinNewtonTriOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -27,7 +27,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfRespaNsqNewtoffOmp::NPairHalfRespaNsqNewtoffOmp(LAMMPS *lmp) :
|
||||
NPairHalfRespaNsqNewtoffOmp::NPairHalfRespaNsqNewtoffOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/respa/nsq/newtoff/omp,
|
||||
NPairHalfRespaNsqNewtoffOmp,
|
||||
NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTOFF | NP_OMP |
|
||||
NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTOFF | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -27,7 +27,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfRespaNsqNewtonOmp::NPairHalfRespaNsqNewtonOmp(LAMMPS *lmp) :
|
||||
NPairHalfRespaNsqNewtonOmp::NPairHalfRespaNsqNewtonOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/respa/nsq/newton/omp,
|
||||
NPairHalfRespaNsqNewtonOmp,
|
||||
NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTON | NP_OMP |
|
||||
NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTON | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -28,7 +28,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfSizeBinNewtoffOmp::NPairHalfSizeBinNewtoffOmp(LAMMPS *lmp) :
|
||||
NPairHalfSizeBinNewtoffOmp::NPairHalfSizeBinNewtoffOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/size/bin/newtoff/omp,
|
||||
NPairHalfSizeBinNewtoffOmp,
|
||||
NP_HALF | NP_SIZE | NP_BIN | NP_NEWTOFF | NP_OMP |
|
||||
NP_HALF | NP_SIZE | NP_BIN | NP_NEWTOFF | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -28,7 +28,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfSizeBinNewtonOmp::NPairHalfSizeBinNewtonOmp(LAMMPS *lmp) :
|
||||
NPairHalfSizeBinNewtonOmp::NPairHalfSizeBinNewtonOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -202,7 +202,7 @@ void NPairHalfSizeBinNewtonOmp::build(NeighList *list)
|
||||
nn += dnum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfSizeBinNewtonTriOmp::NPairHalfSizeBinNewtonTriOmp(LAMMPS *lmp) :
|
||||
NPairHalfSizeBinNewtonTriOmp::NPairHalfSizeBinNewtonTriOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -29,7 +29,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfSizeNsqNewtoffOmp::NPairHalfSizeNsqNewtoffOmp(LAMMPS *lmp) :
|
||||
NPairHalfSizeNsqNewtoffOmp::NPairHalfSizeNsqNewtoffOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/size/nsq/newtoff/omp,
|
||||
NPairHalfSizeNsqNewtoffOmp,
|
||||
NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTOFF | NP_OMP |
|
||||
NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTOFF | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -29,7 +29,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NPairHalfSizeNsqNewtonOmp::NPairHalfSizeNsqNewtonOmp(LAMMPS *lmp) :
|
||||
NPairHalfSizeNsqNewtonOmp::NPairHalfSizeNsqNewtonOmp(LAMMPS *lmp) :
|
||||
NPair(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(half/size/nsq/newton/omp,
|
||||
NPairHalfSizeNsqNewtonOmp,
|
||||
NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTON | NP_OMP |
|
||||
NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTON | NP_OMP |
|
||||
NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(halffull/newtoff/omp,
|
||||
NPairHalffullNewtoffOmp,
|
||||
NP_HALF_FULL | NP_NEWTOFF | NP_OMP | NP_HALF |
|
||||
NP_HALF_FULL | NP_NEWTOFF | NP_OMP | NP_HALF |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
NPairStyle(halffull/newton/omp,
|
||||
NPairHalffullNewtonOmp,
|
||||
NP_HALF_FULL | NP_NEWTON | NP_OMP | NP_HALF |
|
||||
NP_HALF_FULL | NP_NEWTON | NP_OMP | NP_HALF |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_ORTHO | NP_TRI)
|
||||
|
||||
#else
|
||||
|
||||
@ -1907,7 +1907,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag
|
||||
realrij[0] = x[atomi][0] - x[atomj][0];
|
||||
realrij[1] = x[atomi][1] - x[atomj][1];
|
||||
realrij[2] = x[atomi][2] - x[atomj][2];
|
||||
realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1]
|
||||
realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1]
|
||||
+ realrij[2] * realrij[2]);
|
||||
|
||||
REBO_neighs = REBO_firstneigh[i];
|
||||
|
||||
@ -44,7 +44,7 @@ using namespace MathConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairLJCutTholeLongOMP::PairLJCutTholeLongOMP(LAMMPS *lmp) :
|
||||
PairLJCutTholeLongOMP::PairLJCutTholeLongOMP(LAMMPS *lmp) :
|
||||
PairLJCutTholeLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||
{
|
||||
suffix_flag |= Suffix::OMP;
|
||||
@ -108,9 +108,9 @@ void PairLJCutTholeLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
const tagint * _noalias const drudeid = fix_drude->drudeid;
|
||||
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fxtmp,fytmp,fztmp;
|
||||
|
||||
|
||||
const int nlocal = atom->nlocal;
|
||||
|
||||
|
||||
int j,jj,jnum,jtype,itable;
|
||||
double ecoul,fpair,evdwl;
|
||||
double r,rsq,r2inv,forcecoul,factor_coul,forcelj,factor_lj,r6inv;
|
||||
@ -137,7 +137,7 @@ void PairLJCutTholeLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
const double * _noalias const lj2i = lj2[itype];
|
||||
const double * _noalias const lj3i = lj3[itype];
|
||||
const double * _noalias const lj4i = lj4[itype];
|
||||
|
||||
|
||||
xtmp = x[i].x;
|
||||
ytmp = x[i].y;
|
||||
ztmp = x[i].z;
|
||||
|
||||
Reference in New Issue
Block a user