forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7804 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
fa7b92e430
commit
f55b74a85f
src
USER-CG-CMM
USER-CUDA
fix_npt_cuda.cppfix_nvt_cuda.cppfix_shake_cuda.cpppair_born_coul_long_cuda.cpppair_buck_coul_cut_cuda.cpppair_buck_coul_long_cuda.cpppair_buck_cuda.cpppair_lj_charmm_coul_long_cuda.cpppair_lj_class2_coul_long_cuda.cpppair_lj_cut_coul_long_cuda.cpp
USER-MISC
USER-OMP
Install.shfix_omp.cppfix_omp.hneigh_derive_omp.cpppair_adp_omp.cpppair_airebo_omp.cpppair_born_coul_long_omp.cpppair_born_coul_wolf_omp.cpppair_born_omp.cpppair_brownian_omp.cpppair_brownian_poly_omp.cpppair_buck_coul_cut_omp.cpppair_buck_coul_long_omp.cpppair_buck_coul_omp.cpppair_buck_omp.cpppair_cdeam_omp.cpppair_colloid_omp.cpppair_comb_omp.cpppair_coul_cut_omp.cpppair_coul_debye_omp.cpppair_coul_diel_omp.cpppair_coul_long_omp.cpppair_coul_wolf_omp.cpppair_dipole_cut_omp.cpppair_dipole_sf_omp.cpppair_dpd_omp.cpppair_dpd_tstat_omp.cpppair_eam_omp.cpppair_edip_omp.cpppair_eim_omp.cpppair_gauss_cut_omp.cpppair_gauss_omp.cpppair_gayberne_omp.cpppair_gran_hertz_history_omp.cpppair_gran_hooke_history_omp.cpppair_gran_hooke_omp.cpppair_hbond_dreiding_lj_omp.cpppair_hbond_dreiding_morse_omp.cpppair_line_lj_omp.cpppair_lj96_cut_omp.cpppair_lj_charmm_coul_charmm_implicit_omp.cpppair_lj_charmm_coul_charmm_omp.cpppair_lj_charmm_coul_long_omp.cpppair_lj_charmm_coul_pppm_omp.cpppair_lj_class2_coul_cut_omp.cpppair_lj_class2_coul_long_omp.cpppair_lj_class2_coul_pppm_omp.cpppair_lj_class2_omp.cpppair_lj_coul_omp.cpppair_lj_cubic_omp.cpppair_lj_cut_coul_cut_omp.cpppair_lj_cut_coul_debye_omp.cpppair_lj_cut_coul_long_omp.cpppair_lj_cut_coul_long_tip4p_omp.cpppair_lj_cut_coul_pppm_omp.cpppair_lj_cut_coul_pppm_tip4p_omp.cpppair_lj_cut_omp.cpppair_lj_expand_omp.cpppair_lj_gromacs_coul_gromacs_omp.cpppair_lj_gromacs_omp.cpppair_lj_sdk_coul_long_omp.cpppair_lj_sdk_omp.cpppair_lj_sf_omp.cpppair_lj_smooth_linear_omp.cpppair_lj_smooth_omp.cpppair_lubricate_omp.cpppair_lubricate_poly_omp.cpppair_morse_omp.cpppair_peri_lps_omp.cpppair_peri_pmb_omp.cpppair_resquared_omp.cpppair_soft_omp.cpppair_sw_omp.cpppair_table_omp.cpppair_tersoff_omp.cpppair_tersoff_table_omp.cpppair_tri_lj_omp.cpppair_yukawa_colloid_omp.cpppair_yukawa_omp.cppthr_omp.cpp
pair.cpppair.hpair_beck.hsuffix.h
|
@ -118,8 +118,6 @@ void PairLJSDKCoulLong::eval()
|
||||||
double r,rsq,r2inv,forcecoul,forcelj,factor_coul,factor_lj;
|
double r,rsq,r2inv,forcecoul,forcelj,factor_coul,factor_lj;
|
||||||
double grij,expm2,prefactor,t,erfc;
|
double grij,expm2,prefactor,t,erfc;
|
||||||
|
|
||||||
evdwl = ecoul = 0.0;
|
|
||||||
|
|
||||||
const double * const * const x = atom->x;
|
const double * const * const x = atom->x;
|
||||||
double * const * const f = atom->f;
|
double * const * const f = atom->f;
|
||||||
const double * const q = atom->q;
|
const double * const q = atom->q;
|
||||||
|
@ -151,6 +149,8 @@ void PairLJSDKCoulLong::eval()
|
||||||
const int jnum = numneigh[i];
|
const int jnum = numneigh[i];
|
||||||
|
|
||||||
for (jj = 0; jj < jnum; jj++) {
|
for (jj = 0; jj < jnum; jj++) {
|
||||||
|
forcecoul = forcelj = evdwl = ecoul = 0.0;
|
||||||
|
|
||||||
j = jlist[jj];
|
j = jlist[jj];
|
||||||
factor_lj = special_lj[sbmask(j)];
|
factor_lj = special_lj[sbmask(j)];
|
||||||
factor_coul = special_coul[sbmask(j)];
|
factor_coul = special_coul[sbmask(j)];
|
||||||
|
@ -175,7 +175,13 @@ void PairLJSDKCoulLong::eval()
|
||||||
erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
||||||
prefactor = qqrd2e * qtmp*q[j]/r;
|
prefactor = qqrd2e * qtmp*q[j]/r;
|
||||||
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2);
|
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2);
|
||||||
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor;
|
if (EFLAG)
|
||||||
|
ecoul = prefactor*erfc;
|
||||||
|
if (factor_coul < 1.0) {
|
||||||
|
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
if (EFLAG)
|
||||||
|
ecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
union_int_float_t rsq_lookup;
|
union_int_float_t rsq_lookup;
|
||||||
rsq_lookup.f = rsq;
|
rsq_lookup.f = rsq;
|
||||||
|
@ -184,15 +190,16 @@ void PairLJSDKCoulLong::eval()
|
||||||
fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
|
fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
|
||||||
table = ftable[itable] + fraction*dftable[itable];
|
table = ftable[itable] + fraction*dftable[itable];
|
||||||
forcecoul = qtmp*q[j] * table;
|
forcecoul = qtmp*q[j] * table;
|
||||||
|
if (EFLAG)
|
||||||
|
ecoul = qtmp*q[j] * table;
|
||||||
if (factor_coul < 1.0) {
|
if (factor_coul < 1.0) {
|
||||||
table = ctable[itable] + fraction*dctable[itable];
|
table = ctable[itable] + fraction*dctable[itable];
|
||||||
prefactor = qtmp*q[j] * table;
|
prefactor = qtmp*q[j] * table;
|
||||||
forcecoul -= (1.0-factor_coul)*prefactor;
|
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
if (EFLAG)
|
||||||
|
ecoul -= (1.0-factor_coul)*prefactor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
forcecoul = 0.0;
|
|
||||||
ecoul = 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsq < cut_ljsq[itype][jtype]) {
|
if (rsq < cut_ljsq[itype][jtype]) {
|
||||||
|
@ -205,7 +212,7 @@ void PairLJSDKCoulLong::eval()
|
||||||
if (EFLAG)
|
if (EFLAG)
|
||||||
evdwl = r4inv*(lj3[itype][jtype]*r4inv*r4inv
|
evdwl = r4inv*(lj3[itype][jtype]*r4inv*r4inv
|
||||||
- lj4[itype][jtype]) - offset[itype][jtype];
|
- lj4[itype][jtype]) - offset[itype][jtype];
|
||||||
|
|
||||||
} else if (ljt == LJ9_6) {
|
} else if (ljt == LJ9_6) {
|
||||||
const double r3inv = r2inv*sqrt(r2inv);
|
const double r3inv = r2inv*sqrt(r2inv);
|
||||||
const double r6inv = r3inv*r3inv;
|
const double r6inv = r3inv*r3inv;
|
||||||
|
@ -223,12 +230,12 @@ void PairLJSDKCoulLong::eval()
|
||||||
evdwl = r6inv*(lj3[itype][jtype]*r6inv
|
evdwl = r6inv*(lj3[itype][jtype]*r6inv
|
||||||
- lj4[itype][jtype]) - offset[itype][jtype];
|
- lj4[itype][jtype]) - offset[itype][jtype];
|
||||||
}
|
}
|
||||||
} else {
|
forcelj *= factor_lj;
|
||||||
forcelj=0.0;
|
if (EFLAG)
|
||||||
evdwl = 0.0;
|
evdwl *= factor_lj;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpair = (forcecoul + factor_lj*forcelj) * r2inv;
|
fpair = (forcecoul + forcelj) * r2inv;
|
||||||
|
|
||||||
fxtmp += delx*fpair;
|
fxtmp += delx*fpair;
|
||||||
fytmp += dely*fpair;
|
fytmp += dely*fpair;
|
||||||
|
@ -239,24 +246,9 @@ void PairLJSDKCoulLong::eval()
|
||||||
f[j][2] -= delz*fpair;
|
f[j][2] -= delz*fpair;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFLAG) {
|
|
||||||
if (rsq < cut_coulsq) {
|
|
||||||
if (!ncoultablebits || rsq <= tabinnersq)
|
|
||||||
ecoul = prefactor*erfc;
|
|
||||||
else {
|
|
||||||
table = etable[itable] + fraction*detable[itable];
|
|
||||||
ecoul = qtmp*q[j] * table;
|
|
||||||
}
|
|
||||||
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor;
|
|
||||||
} else ecoul = 0.0;
|
|
||||||
|
|
||||||
if (rsq < cut_ljsq[itype][jtype]) {
|
|
||||||
evdwl *= factor_lj;
|
|
||||||
} else evdwl = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (EVFLAG) ev_tally(i,j,nlocal,NEWTON_PAIR,
|
if (EVFLAG) ev_tally(i,j,nlocal,NEWTON_PAIR,
|
||||||
evdwl,ecoul,fpair,delx,dely,delz);
|
evdwl,ecoul,fpair,delx,dely,delz);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f[i][0] += fxtmp;
|
f[i][0] += fxtmp;
|
||||||
|
@ -662,6 +654,8 @@ double PairLJSDKCoulLong::single(int i, int j, int itype, int jtype,
|
||||||
double fraction,table,forcecoul,forcelj,phicoul,philj;
|
double fraction,table,forcecoul,forcelj,phicoul,philj;
|
||||||
int itable;
|
int itable;
|
||||||
|
|
||||||
|
forcecoul = forcelj = phicoul = philj = 0.0;
|
||||||
|
|
||||||
r2inv = 1.0/rsq;
|
r2inv = 1.0/rsq;
|
||||||
if (rsq < cut_coulsq) {
|
if (rsq < cut_coulsq) {
|
||||||
if (!ncoultablebits || rsq <= tabinnersq) {
|
if (!ncoultablebits || rsq <= tabinnersq) {
|
||||||
|
@ -672,7 +666,11 @@ double PairLJSDKCoulLong::single(int i, int j, int itype, int jtype,
|
||||||
erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
||||||
prefactor = force->qqrd2e * atom->q[i]*atom->q[j]/r;
|
prefactor = force->qqrd2e * atom->q[i]*atom->q[j]/r;
|
||||||
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2);
|
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2);
|
||||||
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor;
|
phicoul = prefactor*erfc;
|
||||||
|
if (factor_coul < 1.0) {
|
||||||
|
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
phicoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
union_int_float_t rsq_lookup_single;
|
union_int_float_t rsq_lookup_single;
|
||||||
rsq_lookup_single.f = rsq;
|
rsq_lookup_single.f = rsq;
|
||||||
|
@ -681,13 +679,16 @@ double PairLJSDKCoulLong::single(int i, int j, int itype, int jtype,
|
||||||
fraction = (rsq_lookup_single.f - rtable[itable]) * drtable[itable];
|
fraction = (rsq_lookup_single.f - rtable[itable]) * drtable[itable];
|
||||||
table = ftable[itable] + fraction*dftable[itable];
|
table = ftable[itable] + fraction*dftable[itable];
|
||||||
forcecoul = atom->q[i]*atom->q[j] * table;
|
forcecoul = atom->q[i]*atom->q[j] * table;
|
||||||
|
table = etable[itable] + fraction*detable[itable];
|
||||||
|
phicoul = atom->q[i]*atom->q[j] * table;
|
||||||
if (factor_coul < 1.0) {
|
if (factor_coul < 1.0) {
|
||||||
table = ctable[itable] + fraction*dctable[itable];
|
table = ctable[itable] + fraction*dctable[itable];
|
||||||
prefactor = atom->q[i]*atom->q[j] * table;
|
prefactor = atom->q[i]*atom->q[j] * table;
|
||||||
forcecoul -= (1.0-factor_coul)*prefactor;
|
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
phicoul -= (1.0-factor_coul)*prefactor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else forcecoul = 0.0;
|
}
|
||||||
|
|
||||||
if (rsq < cut_ljsq[itype][jtype]) {
|
if (rsq < cut_ljsq[itype][jtype]) {
|
||||||
const int ljt = lj_type[itype][jtype];
|
const int ljt = lj_type[itype][jtype];
|
||||||
|
@ -698,30 +699,15 @@ double PairLJSDKCoulLong::single(int i, int j, int itype, int jtype,
|
||||||
const double ratio = sigma[itype][jtype]/sqrt(rsq);
|
const double ratio = sigma[itype][jtype]/sqrt(rsq);
|
||||||
const double eps = epsilon[itype][jtype];
|
const double eps = epsilon[itype][jtype];
|
||||||
|
|
||||||
fforce = factor_lj * ljpref*eps * (ljpow1*pow(ratio,ljpow1)
|
forcelj = factor_lj * ljpref*eps * (ljpow1*pow(ratio,ljpow1)
|
||||||
- ljpow2*pow(ratio,ljpow2))/rsq;
|
- ljpow2*pow(ratio,ljpow2))/rsq;
|
||||||
philj = factor_lj * (ljpref*eps * (pow(ratio,ljpow1) - pow(ratio,ljpow2))
|
philj = factor_lj * (ljpref*eps * (pow(ratio,ljpow1) - pow(ratio,ljpow2))
|
||||||
- offset[itype][jtype]);
|
- offset[itype][jtype]);
|
||||||
} else fforce=0.0;
|
|
||||||
|
|
||||||
fforce = (forcecoul + factor_lj*forcelj) * r2inv;
|
|
||||||
|
|
||||||
double eng = 0.0;
|
|
||||||
if (rsq < cut_coulsq) {
|
|
||||||
if (!ncoultablebits || rsq <= tabinnersq)
|
|
||||||
phicoul = prefactor*erfc;
|
|
||||||
else {
|
|
||||||
table = etable[itable] + fraction*detable[itable];
|
|
||||||
phicoul = atom->q[i]*atom->q[j] * table;
|
|
||||||
}
|
|
||||||
if (factor_coul < 1.0) phicoul -= (1.0-factor_coul)*prefactor;
|
|
||||||
eng += phicoul;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsq < cut_ljsq[itype][jtype])
|
fforce = (forcecoul + forcelj) * r2inv;
|
||||||
eng += philj;
|
|
||||||
|
|
||||||
return eng;
|
return phicoul + philj;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
using namespace FixConstCuda;
|
using namespace FixConstCuda;
|
||||||
using namespace FixConst;
|
|
||||||
using namespace FixConstCuda;
|
|
||||||
using namespace FixConstCuda;
|
|
||||||
using namespace FixConstCuda;
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,6 @@
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
using namespace FixConstCuda;
|
using namespace FixConstCuda;
|
||||||
using namespace FixConst;
|
|
||||||
using namespace FixConstCuda;
|
|
||||||
using namespace FixConstCuda;
|
|
||||||
using namespace FixConstCuda;
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -2450,7 +2450,7 @@ int FixShakeCuda::unpack_exchange(int nlocal, double *buf)
|
||||||
prediction portion is different than Verlet
|
prediction portion is different than Verlet
|
||||||
rRESPA updating of atom coords is done with full v, but only portions of f
|
rRESPA updating of atom coords is done with full v, but only portions of f
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
/*
|
#if 0
|
||||||
void FixShakeCuda::post_force_respa(int vflag, int ilevel, int iloop)
|
void FixShakeCuda::post_force_respa(int vflag, int ilevel, int iloop)
|
||||||
{
|
{
|
||||||
// call stats only on outermost level
|
// call stats only on outermost level
|
||||||
|
@ -2529,6 +2529,7 @@ void FixShakeCuda::post_force_respa(int vflag, int ilevel, int iloop)
|
||||||
else shake3angle(m);
|
else shake3angle(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ void PairBornCoulLongCuda::init_style()
|
||||||
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
||||||
|
|
||||||
|
|
||||||
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the useage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the usage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PairBornCoulLongCuda::init_list(int id, NeighList *ptr)
|
void PairBornCoulLongCuda::init_list(int id, NeighList *ptr)
|
||||||
|
|
|
@ -141,7 +141,7 @@ void PairBuckCoulCutCuda::init_style()
|
||||||
|
|
||||||
cuda->shared_data.pair.cut_coulsq_global=cut_coul_global * cut_coul_global;
|
cuda->shared_data.pair.cut_coulsq_global=cut_coul_global * cut_coul_global;
|
||||||
|
|
||||||
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the useage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the usage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PairBuckCoulCutCuda::init_list(int id, NeighList *ptr)
|
void PairBuckCoulCutCuda::init_list(int id, NeighList *ptr)
|
||||||
|
|
|
@ -152,7 +152,7 @@ void PairBuckCoulLongCuda::init_style()
|
||||||
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
||||||
|
|
||||||
|
|
||||||
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the useage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the usage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PairBuckCoulLongCuda::init_list(int id, NeighList *ptr)
|
void PairBuckCoulLongCuda::init_list(int id, NeighList *ptr)
|
||||||
|
|
|
@ -137,7 +137,7 @@ void PairBuckCuda::init_style()
|
||||||
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
||||||
|
|
||||||
|
|
||||||
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the useage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the usage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PairBuckCuda::init_list(int id, NeighList *ptr)
|
void PairBuckCuda::init_list(int id, NeighList *ptr)
|
||||||
|
|
|
@ -168,7 +168,7 @@ void PairLJCharmmCoulLongCuda::init_style()
|
||||||
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
||||||
|
|
||||||
|
|
||||||
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the useage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the usage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PairLJCharmmCoulLongCuda::init_list(int id, NeighList *ptr)
|
void PairLJCharmmCoulLongCuda::init_list(int id, NeighList *ptr)
|
||||||
|
|
|
@ -149,7 +149,7 @@ void PairLJClass2CoulLongCuda::init_style()
|
||||||
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
||||||
|
|
||||||
|
|
||||||
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the useage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the usage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PairLJClass2CoulLongCuda::init_list(int id, NeighList *ptr)
|
void PairLJClass2CoulLongCuda::init_list(int id, NeighList *ptr)
|
||||||
|
|
|
@ -187,7 +187,7 @@ void PairLJCutCoulLongCuda::init_style()
|
||||||
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
cuda->shared_data.pppm.qqrd2e=force->qqrd2e;
|
||||||
|
|
||||||
|
|
||||||
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the useage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
if(ncoultablebits) error->warning(FLERR,"# CUDA: You asked for the usage of Coulomb Tables. This is not supported in CUDA Pair forces. Setting is ignored.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PairLJCutCoulLongCuda::init_list(int id, NeighList *ptr)
|
void PairLJCutCoulLongCuda::init_list(int id, NeighList *ptr)
|
||||||
|
|
|
@ -77,8 +77,8 @@ class PairMEAMSpline : public Pair
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PairMEAMSpline(class LAMMPS *);
|
PairMEAMSpline(class LAMMPS *);
|
||||||
~PairMEAMSpline();
|
virtual ~PairMEAMSpline();
|
||||||
void compute(int, int);
|
virtual void compute(int, int);
|
||||||
void settings(int, char **);
|
void settings(int, char **);
|
||||||
void coeff(int, char **);
|
void coeff(int, char **);
|
||||||
void init_style();
|
void init_style();
|
||||||
|
@ -91,7 +91,7 @@ public:
|
||||||
void unpack_reverse_comm(int, int *, double *);
|
void unpack_reverse_comm(int, int *, double *);
|
||||||
double memory_usage();
|
double memory_usage();
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
char **elements; // names of unique elements
|
char **elements; // names of unique elements
|
||||||
int *map; // mapping from atom types to elements
|
int *map; // mapping from atom types to elements
|
||||||
int nelements; // # of unique elements
|
int nelements; // # of unique elements
|
||||||
|
@ -100,7 +100,7 @@ private:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
SplineFunction() : N(0), X(NULL), Xs(NULL), Y(NULL), Y2(NULL), Ydelta(NULL) {}
|
SplineFunction() : X(NULL), Xs(NULL), Y(NULL), Y2(NULL), Ydelta(NULL), N(0) {}
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
~SplineFunction() {
|
~SplineFunction() {
|
||||||
|
|
|
@ -24,7 +24,8 @@ done
|
||||||
if (test $1 = 1) then
|
if (test $1 = 1) then
|
||||||
|
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_USER_OMP |' ../Makefile.package
|
sed -i -e 's/[ \t]*[^ \t=]*OMP[^ \t]*[ \t]*//g' \
|
||||||
|
-e 's|^PKG_INC =[ \t]*|&-DLMP_USER_OMP |' ../Makefile.package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# force rebuild of files with LMP_USER_OMP switch
|
# force rebuild of files with LMP_USER_OMP switch
|
||||||
|
@ -37,7 +38,7 @@ if (test $1 = 1) then
|
||||||
elif (test $1 = 0) then
|
elif (test $1 = 0) then
|
||||||
|
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's/[^ \t]*OMP[^ \t]* //g' ../Makefile.package
|
sed -i -e 's/[ \t=]*[^ \t]*OMP[^ \t]*[ \t]*//g' ../Makefile.package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# force rebuild of files with LMP_USER_OMP switch
|
# force rebuild of files with LMP_USER_OMP switch
|
||||||
|
|
|
@ -40,13 +40,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
|
|
||||||
#if defined(LMP_USER_CUDA)
|
#if defined(LMP_USER_CUDA)
|
||||||
#include "cuda_modify_flags.h"
|
#include "cuda_modify_flags.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
using namespace FixConst;
|
|
||||||
#if defined(LMP_USER_CUDA)
|
#if defined(LMP_USER_CUDA)
|
||||||
using namespace FixConstCuda;
|
using namespace FixConstCuda;
|
||||||
#endif
|
#endif
|
||||||
|
@ -63,7 +64,8 @@ static int get_tid()
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
|
FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
|
||||||
thr(NULL), last_omp_style(NULL), _nthr(-1), _neighbor(true), _newton(false)
|
thr(NULL), last_omp_style(NULL), last_pair_hybrid(NULL),
|
||||||
|
_nthr(-1), _neighbor(true), _newton(false)
|
||||||
{
|
{
|
||||||
if ((narg < 4) || (narg > 6)) error->all(FLERR,"Illegal fix OMP command");
|
if ((narg < 4) || (narg > 6)) error->all(FLERR,"Illegal fix OMP command");
|
||||||
if (strcmp(arg[1],"all") != 0) error->all(FLERR,"Illegal fix OMP command");
|
if (strcmp(arg[1],"all") != 0) error->all(FLERR,"Illegal fix OMP command");
|
||||||
|
@ -192,8 +194,10 @@ void FixOMP::init()
|
||||||
error->all(FLERR,"Cannot use r-RESPA with /omp styles");
|
error->all(FLERR,"Cannot use r-RESPA with /omp styles");
|
||||||
|
|
||||||
int check_hybrid;
|
int check_hybrid;
|
||||||
|
last_pair_hybrid = NULL;
|
||||||
last_omp_style = NULL;
|
last_omp_style = NULL;
|
||||||
char *last_omp_name = NULL;
|
char *last_omp_name = NULL;
|
||||||
|
char *last_hybrid_name = NULL;
|
||||||
|
|
||||||
// determine which is the last force style with OpenMP
|
// determine which is the last force style with OpenMP
|
||||||
// support as this is the one that has to reduce the forces
|
// support as this is the one that has to reduce the forces
|
||||||
|
@ -220,13 +224,21 @@ void FixOMP::init()
|
||||||
char *suffix = style->keywords[i] + len - 4; \
|
char *suffix = style->keywords[i] + len - 4; \
|
||||||
if (strcmp(suffix,"/omp") == 0) { \
|
if (strcmp(suffix,"/omp") == 0) { \
|
||||||
last_omp_name = force->name ## _style; \
|
last_omp_name = force->name ## _style; \
|
||||||
last_omp_style = (void *) force->name; \
|
last_omp_style = style->styles[i]; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckStyleForOMP(pair);
|
CheckStyleForOMP(pair);
|
||||||
CheckHybridForOMP(pair,Pair);
|
if (check_hybrid) {
|
||||||
|
PairHybrid *style = (PairHybrid *) force->pair;
|
||||||
|
for (int i=0; i < style->nstyles; i++) {
|
||||||
|
if (style->styles[i]->suffix_flag & Suffix::OMP) {
|
||||||
|
last_pair_hybrid = style->styles[i];
|
||||||
|
last_omp_name = style->keywords[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CheckStyleForOMP(bond);
|
CheckStyleForOMP(bond);
|
||||||
CheckHybridForOMP(bond,Bond);
|
CheckHybridForOMP(bond,Bond);
|
||||||
|
|
|
@ -50,8 +50,10 @@ class FixOMP : public Fix {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ThrData **thr;
|
ThrData **thr;
|
||||||
void *last_omp_style; // pointer to the style that needs
|
void *last_omp_style; // pointer to the style that needs
|
||||||
// to do the force reduction
|
// to do the general force reduction
|
||||||
|
void *last_pair_hybrid; // pointer to the pair style that needs
|
||||||
|
// to call virial_fdot_compute()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool get_neighbor() const {return _neighbor;};
|
bool get_neighbor() const {return _neighbor;};
|
||||||
|
|
|
@ -56,14 +56,14 @@ void Neighbor::half_from_full_no_newton_omp(NeighList *list)
|
||||||
|
|
||||||
for (ii = ifrom; ii < ito; ii++) {
|
for (ii = ifrom; ii < ito; ii++) {
|
||||||
|
|
||||||
|
#if defined(_OPENMP)
|
||||||
|
#pragma omp critical
|
||||||
|
#endif
|
||||||
if (pgsize - npnt < oneatom) {
|
if (pgsize - npnt < oneatom) {
|
||||||
npnt = 0;
|
npnt = 0;
|
||||||
npage += nthreads;
|
npage += nthreads;
|
||||||
// only one thread at a time may check whether we
|
// only one thread at a time may check whether we
|
||||||
// need new neighbor list pages and then add to them.
|
// need new neighbor list pages and then add to them.
|
||||||
#if defined(_OPENMP)
|
|
||||||
#pragma omp critical
|
|
||||||
#endif
|
|
||||||
if (npage >= list->maxpage) list->add_pages(nthreads);
|
if (npage >= list->maxpage) list->add_pages(nthreads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,14 +132,14 @@ void Neighbor::half_from_full_newton_omp(NeighList *list)
|
||||||
|
|
||||||
for (ii = ifrom; ii < ito; ii++) {
|
for (ii = ifrom; ii < ito; ii++) {
|
||||||
|
|
||||||
|
#if defined(_OPENMP)
|
||||||
|
#pragma omp critical
|
||||||
|
#endif
|
||||||
if (pgsize - npnt < oneatom) {
|
if (pgsize - npnt < oneatom) {
|
||||||
npnt = 0;
|
npnt = 0;
|
||||||
npage += nthreads;
|
npage += nthreads;
|
||||||
// only one thread at a time may check whether we
|
// only one thread at a time may check whether we
|
||||||
// need new neighbor list pages and then add to them.
|
// need new neighbor list pages and then add to them.
|
||||||
#if defined(_OPENMP)
|
|
||||||
#pragma omp critical
|
|
||||||
#endif
|
|
||||||
if (npage >= list->maxpage) list->add_pages(nthreads);
|
if (npage >= list->maxpage) list->add_pages(nthreads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -30,6 +31,7 @@ using namespace LAMMPS_NS;
|
||||||
PairADPOMP::PairADPOMP(LAMMPS *lmp) :
|
PairADPOMP::PairADPOMP(LAMMPS *lmp) :
|
||||||
PairADP(lmp), ThrOMP(lmp, THR_PAIR)
|
PairADP(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define TOL 1.0e-9
|
#define TOL 1.0e-9
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairAIREBOOMP::PairAIREBOOMP(LAMMPS *lmp) :
|
PairAIREBOOMP::PairAIREBOOMP(LAMMPS *lmp) :
|
||||||
PairAIREBO(lmp), ThrOMP(lmp, THR_PAIR)
|
PairAIREBO(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairBornCoulLongOMP::PairBornCoulLongOMP(LAMMPS *lmp) :
|
PairBornCoulLongOMP::PairBornCoulLongOMP(LAMMPS *lmp) :
|
||||||
PairBornCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBornCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -29,6 +30,7 @@ using namespace MathConst;
|
||||||
PairBornCoulWolfOMP::PairBornCoulWolfOMP(LAMMPS *lmp) :
|
PairBornCoulWolfOMP::PairBornCoulWolfOMP(LAMMPS *lmp) :
|
||||||
PairBornCoulWolf(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBornCoulWolf(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairBornOMP::PairBornOMP(LAMMPS *lmp) :
|
PairBornOMP::PairBornOMP(LAMMPS *lmp) :
|
||||||
PairBorn(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBorn(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "random_mars.h"
|
#include "random_mars.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ using namespace MathConst;
|
||||||
PairBrownianOMP::PairBrownianOMP(LAMMPS *lmp) :
|
PairBrownianOMP::PairBrownianOMP(LAMMPS *lmp) :
|
||||||
PairBrownian(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBrownian(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
random_thr = NULL;
|
random_thr = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "random_mars.h"
|
#include "random_mars.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ using namespace MathConst;
|
||||||
PairBrownianPolyOMP::PairBrownianPolyOMP(LAMMPS *lmp) :
|
PairBrownianPolyOMP::PairBrownianPolyOMP(LAMMPS *lmp) :
|
||||||
PairBrownianPoly(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBrownianPoly(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
random_thr = NULL;
|
random_thr = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairBuckCoulCutOMP::PairBuckCoulCutOMP(LAMMPS *lmp) :
|
PairBuckCoulCutOMP::PairBuckCoulCutOMP(LAMMPS *lmp) :
|
||||||
PairBuckCoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBuckCoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairBuckCoulLongOMP::PairBuckCoulLongOMP(LAMMPS *lmp) :
|
PairBuckCoulLongOMP::PairBuckCoulLongOMP(LAMMPS *lmp) :
|
||||||
PairBuckCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBuckCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -36,6 +37,7 @@ using namespace LAMMPS_NS;
|
||||||
PairBuckCoulOMP::PairBuckCoulOMP(LAMMPS *lmp) :
|
PairBuckCoulOMP::PairBuckCoulOMP(LAMMPS *lmp) :
|
||||||
PairBuckCoul(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBuckCoul(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairBuckOMP::PairBuckOMP(LAMMPS *lmp) :
|
PairBuckOMP::PairBuckOMP(LAMMPS *lmp) :
|
||||||
PairBuck(lmp), ThrOMP(lmp, THR_PAIR)
|
PairBuck(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
// This is for debugging purposes. The ASSERT() macro is used in the code to check
|
// This is for debugging purposes. The ASSERT() macro is used in the code to check
|
||||||
|
@ -46,6 +47,7 @@ using namespace LAMMPS_NS;
|
||||||
PairCDEAMOMP::PairCDEAMOMP(LAMMPS *lmp, int _cdeamVersion) :
|
PairCDEAMOMP::PairCDEAMOMP(LAMMPS *lmp, int _cdeamVersion) :
|
||||||
PairEAM(lmp), PairCDEAM(lmp,_cdeamVersion), ThrOMP(lmp, THR_PAIR)
|
PairEAM(lmp), PairCDEAM(lmp,_cdeamVersion), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -28,6 +29,7 @@ using namespace LAMMPS_NS;
|
||||||
PairColloidOMP::PairColloidOMP(LAMMPS *lmp) :
|
PairColloidOMP::PairColloidOMP(LAMMPS *lmp) :
|
||||||
PairColloid(lmp), ThrOMP(lmp, THR_PAIR)
|
PairColloid(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define MAXNEIGH 24
|
#define MAXNEIGH 24
|
||||||
|
@ -31,6 +32,7 @@ using namespace LAMMPS_NS;
|
||||||
PairCombOMP::PairCombOMP(LAMMPS *lmp) :
|
PairCombOMP::PairCombOMP(LAMMPS *lmp) :
|
||||||
PairComb(lmp), ThrOMP(lmp, THR_PAIR)
|
PairComb(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairCoulCutOMP::PairCoulCutOMP(LAMMPS *lmp) :
|
PairCoulCutOMP::PairCoulCutOMP(LAMMPS *lmp) :
|
||||||
PairCoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairCoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairCoulDebyeOMP::PairCoulDebyeOMP(LAMMPS *lmp) :
|
PairCoulDebyeOMP::PairCoulDebyeOMP(LAMMPS *lmp) :
|
||||||
PairCoulDebye(lmp), ThrOMP(lmp, THR_PAIR)
|
PairCoulDebye(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairCoulDielOMP::PairCoulDielOMP(LAMMPS *lmp) :
|
PairCoulDielOMP::PairCoulDielOMP(LAMMPS *lmp) :
|
||||||
PairCoulDiel(lmp), ThrOMP(lmp, THR_PAIR)
|
PairCoulDiel(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairCoulLongOMP::PairCoulLongOMP(LAMMPS *lmp) :
|
PairCoulLongOMP::PairCoulLongOMP(LAMMPS *lmp) :
|
||||||
PairCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
PairCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -29,6 +30,7 @@ using namespace MathConst;
|
||||||
PairCoulWolfOMP::PairCoulWolfOMP(LAMMPS *lmp) :
|
PairCoulWolfOMP::PairCoulWolfOMP(LAMMPS *lmp) :
|
||||||
PairCoulWolf(lmp), ThrOMP(lmp, THR_PAIR)
|
PairCoulWolf(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairDipoleCutOMP::PairDipoleCutOMP(LAMMPS *lmp) :
|
PairDipoleCutOMP::PairDipoleCutOMP(LAMMPS *lmp) :
|
||||||
PairDipoleCut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairDipoleCut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairDipoleSFOMP::PairDipoleSFOMP(LAMMPS *lmp) :
|
PairDipoleSFOMP::PairDipoleSFOMP(LAMMPS *lmp) :
|
||||||
PairDipoleSF(lmp), ThrOMP(lmp, THR_PAIR)
|
PairDipoleSF(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "random_mars.h"
|
#include "random_mars.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EPSILON 1.0e-10
|
#define EPSILON 1.0e-10
|
||||||
|
@ -31,6 +32,7 @@ using namespace LAMMPS_NS;
|
||||||
PairDPDOMP::PairDPDOMP(LAMMPS *lmp) :
|
PairDPDOMP::PairDPDOMP(LAMMPS *lmp) :
|
||||||
PairDPD(lmp), ThrOMP(lmp, THR_PAIR)
|
PairDPD(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
random_thr = NULL;
|
random_thr = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "random_mars.h"
|
#include "random_mars.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EPSILON 1.0e-10
|
#define EPSILON 1.0e-10
|
||||||
|
@ -31,6 +32,7 @@ using namespace LAMMPS_NS;
|
||||||
PairDPDTstatOMP::PairDPDTstatOMP(LAMMPS *lmp) :
|
PairDPDTstatOMP::PairDPDTstatOMP(LAMMPS *lmp) :
|
||||||
PairDPDTstat(lmp), ThrOMP(lmp, THR_PAIR)
|
PairDPDTstat(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
random_thr = NULL;
|
random_thr = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -30,6 +31,7 @@ using namespace LAMMPS_NS;
|
||||||
PairEAMOMP::PairEAMOMP(LAMMPS *lmp) :
|
PairEAMOMP::PairEAMOMP(LAMMPS *lmp) :
|
||||||
PairEAM(lmp), ThrOMP(lmp, THR_PAIR)
|
PairEAM(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairEDIPOMP::PairEDIPOMP(LAMMPS *lmp) :
|
PairEDIPOMP::PairEDIPOMP(LAMMPS *lmp) :
|
||||||
PairEDIP(lmp), ThrOMP(lmp, THR_PAIR)
|
PairEDIP(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -30,6 +31,7 @@ using namespace LAMMPS_NS;
|
||||||
PairEIMOMP::PairEIMOMP(LAMMPS *lmp) :
|
PairEIMOMP::PairEIMOMP(LAMMPS *lmp) :
|
||||||
PairEIM(lmp), ThrOMP(lmp, THR_PAIR)
|
PairEIM(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairGaussCutOMP::PairGaussCutOMP(LAMMPS *lmp) :
|
PairGaussCutOMP::PairGaussCutOMP(LAMMPS *lmp) :
|
||||||
PairGaussCut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairGaussCut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EPSILON 1.0e-10
|
#define EPSILON 1.0e-10
|
||||||
|
@ -28,6 +29,7 @@ using namespace LAMMPS_NS;
|
||||||
PairGaussOMP::PairGaussOMP(LAMMPS *lmp) :
|
PairGaussOMP::PairGaussOMP(LAMMPS *lmp) :
|
||||||
PairGauss(lmp), ThrOMP(lmp, THR_PAIR)
|
PairGauss(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -29,6 +30,7 @@ using namespace LAMMPS_NS;
|
||||||
PairGayBerneOMP::PairGayBerneOMP(LAMMPS *lmp) :
|
PairGayBerneOMP::PairGayBerneOMP(LAMMPS *lmp) :
|
||||||
PairGayBerne(lmp), ThrOMP(lmp, THR_PAIR)
|
PairGayBerne(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -28,6 +29,7 @@ using namespace LAMMPS_NS;
|
||||||
PairGranHertzHistoryOMP::PairGranHertzHistoryOMP(LAMMPS *lmp) :
|
PairGranHertzHistoryOMP::PairGranHertzHistoryOMP(LAMMPS *lmp) :
|
||||||
PairGranHertzHistory(lmp), ThrOMP(lmp, THR_PAIR)
|
PairGranHertzHistory(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -30,6 +31,7 @@ using namespace LAMMPS_NS;
|
||||||
PairGranHookeHistoryOMP::PairGranHookeHistoryOMP(LAMMPS *lmp) :
|
PairGranHookeHistoryOMP::PairGranHookeHistoryOMP(LAMMPS *lmp) :
|
||||||
PairGranHookeHistory(lmp), ThrOMP(lmp, THR_PAIR)
|
PairGranHookeHistory(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
// trigger use of OpenMP version of FixShearHistory
|
// trigger use of OpenMP version of FixShearHistory
|
||||||
suffix = new char[4];
|
suffix = new char[4];
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairGranHookeOMP::PairGranHookeOMP(LAMMPS *lmp) :
|
PairGranHookeOMP::PairGranHookeOMP(LAMMPS *lmp) :
|
||||||
PairGranHooke(lmp), ThrOMP(lmp, THR_PAIR)
|
PairGranHooke(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ using namespace MathConst;
|
||||||
PairHbondDreidingLJOMP::PairHbondDreidingLJOMP(LAMMPS *lmp) :
|
PairHbondDreidingLJOMP::PairHbondDreidingLJOMP(LAMMPS *lmp) :
|
||||||
PairHbondDreidingLJ(lmp), ThrOMP(lmp, THR_PAIR)
|
PairHbondDreidingLJ(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
hbcount_thr = hbeng_thr = NULL;
|
hbcount_thr = hbeng_thr = NULL;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +43,6 @@ PairHbondDreidingLJOMP::PairHbondDreidingLJOMP(LAMMPS *lmp) :
|
||||||
|
|
||||||
PairHbondDreidingLJOMP::~PairHbondDreidingLJOMP()
|
PairHbondDreidingLJOMP::~PairHbondDreidingLJOMP()
|
||||||
{
|
{
|
||||||
respa_enable = 0;
|
|
||||||
if (hbcount_thr) {
|
if (hbcount_thr) {
|
||||||
delete[] hbcount_thr;
|
delete[] hbcount_thr;
|
||||||
delete[] hbeng_thr;
|
delete[] hbeng_thr;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ using namespace MathConst;
|
||||||
PairHbondDreidingMorseOMP::PairHbondDreidingMorseOMP(LAMMPS *lmp) :
|
PairHbondDreidingMorseOMP::PairHbondDreidingMorseOMP(LAMMPS *lmp) :
|
||||||
PairHbondDreidingMorse(lmp), ThrOMP(lmp, THR_PAIR)
|
PairHbondDreidingMorse(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
hbcount_thr = hbeng_thr = NULL;
|
hbcount_thr = hbeng_thr = NULL;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +43,6 @@ PairHbondDreidingMorseOMP::PairHbondDreidingMorseOMP(LAMMPS *lmp) :
|
||||||
|
|
||||||
PairHbondDreidingMorseOMP::~PairHbondDreidingMorseOMP()
|
PairHbondDreidingMorseOMP::~PairHbondDreidingMorseOMP()
|
||||||
{
|
{
|
||||||
respa_enable = 0;
|
|
||||||
if (hbcount_thr) {
|
if (hbcount_thr) {
|
||||||
delete[] hbcount_thr;
|
delete[] hbcount_thr;
|
||||||
delete[] hbeng_thr;
|
delete[] hbeng_thr;
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -33,6 +34,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLineLJOMP::PairLineLJOMP(LAMMPS *lmp) :
|
PairLineLJOMP::PairLineLJOMP(LAMMPS *lmp) :
|
||||||
PairLineLJ(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLineLJ(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJ96CutOMP::PairLJ96CutOMP(LAMMPS *lmp) :
|
PairLJ96CutOMP::PairLJ96CutOMP(LAMMPS *lmp) :
|
||||||
PairLJ96Cut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJ96Cut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCharmmCoulCharmmImplicitOMP::PairLJCharmmCoulCharmmImplicitOMP(LAMMPS *lmp) :
|
PairLJCharmmCoulCharmmImplicitOMP::PairLJCharmmCoulCharmmImplicitOMP(LAMMPS *lmp) :
|
||||||
PairLJCharmmCoulCharmmImplicit(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCharmmCoulCharmmImplicit(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCharmmCoulCharmmOMP::PairLJCharmmCoulCharmmOMP(LAMMPS *lmp) :
|
PairLJCharmmCoulCharmmOMP::PairLJCharmmCoulCharmmOMP(LAMMPS *lmp) :
|
||||||
PairLJCharmmCoulCharmm(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCharmmCoulCharmm(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCharmmCoulLongOMP::PairLJCharmmCoulLongOMP(LAMMPS *lmp) :
|
PairLJCharmmCoulLongOMP::PairLJCharmmCoulLongOMP(LAMMPS *lmp) :
|
||||||
PairLJCharmmCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCharmmCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -40,9 +41,10 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCharmmCoulPPPMOMP::PairLJCharmmCoulPPPMOMP(LAMMPS *lmp) :
|
PairLJCharmmCoulPPPMOMP::PairLJCharmmCoulPPPMOMP(LAMMPS *lmp) :
|
||||||
PairLJCharmmCoulLong(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
PairLJCharmmCoulLong(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
nproxy=1;
|
nproxy=1;
|
||||||
|
|
||||||
kspace = NULL;
|
kspace = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJClass2CoulCutOMP::PairLJClass2CoulCutOMP(LAMMPS *lmp) :
|
PairLJClass2CoulCutOMP::PairLJClass2CoulCutOMP(LAMMPS *lmp) :
|
||||||
PairLJClass2CoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJClass2CoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJClass2CoulLongOMP::PairLJClass2CoulLongOMP(LAMMPS *lmp) :
|
PairLJClass2CoulLongOMP::PairLJClass2CoulLongOMP(LAMMPS *lmp) :
|
||||||
PairLJClass2CoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJClass2CoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -40,9 +41,10 @@ using namespace LAMMPS_NS;
|
||||||
PairLJClass2CoulPPPMOMP::PairLJClass2CoulPPPMOMP(LAMMPS *lmp) :
|
PairLJClass2CoulPPPMOMP::PairLJClass2CoulPPPMOMP(LAMMPS *lmp) :
|
||||||
PairLJClass2CoulLong(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
PairLJClass2CoulLong(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
nproxy=1;
|
nproxy=1;
|
||||||
|
|
||||||
kspace = NULL;
|
kspace = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJClass2OMP::PairLJClass2OMP(LAMMPS *lmp) :
|
PairLJClass2OMP::PairLJClass2OMP(LAMMPS *lmp) :
|
||||||
PairLJClass2(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJClass2(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -36,6 +37,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCoulOMP::PairLJCoulOMP(LAMMPS *lmp) :
|
PairLJCoulOMP::PairLJCoulOMP(LAMMPS *lmp) :
|
||||||
PairLJCoul(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCoul(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace PairLJCubicConstants;
|
using namespace PairLJCubicConstants;
|
||||||
|
|
||||||
|
@ -28,6 +29,7 @@ using namespace PairLJCubicConstants;
|
||||||
PairLJCubicOMP::PairLJCubicOMP(LAMMPS *lmp) :
|
PairLJCubicOMP::PairLJCubicOMP(LAMMPS *lmp) :
|
||||||
PairLJCubic(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCubic(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCutCoulCutOMP::PairLJCutCoulCutOMP(LAMMPS *lmp) :
|
PairLJCutCoulCutOMP::PairLJCutCoulCutOMP(LAMMPS *lmp) :
|
||||||
PairLJCutCoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCutCoulCut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCutCoulDebyeOMP::PairLJCutCoulDebyeOMP(LAMMPS *lmp) :
|
PairLJCutCoulDebyeOMP::PairLJCutCoulDebyeOMP(LAMMPS *lmp) :
|
||||||
PairLJCutCoulDebye(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCutCoulDebye(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCutCoulLongOMP::PairLJCutCoulLongOMP(LAMMPS *lmp) :
|
PairLJCutCoulLongOMP::PairLJCutCoulLongOMP(LAMMPS *lmp) :
|
||||||
PairLJCutCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCutCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -38,6 +39,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCutCoulLongTIP4POMP::PairLJCutCoulLongTIP4POMP(LAMMPS *lmp) :
|
PairLJCutCoulLongTIP4POMP::PairLJCutCoulLongTIP4POMP(LAMMPS *lmp) :
|
||||||
PairLJCutCoulLongTIP4P(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCutCoulLongTIP4P(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
|
|
||||||
// for caching m-shift corrected positions
|
// for caching m-shift corrected positions
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -40,9 +41,10 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCutCoulPPPMOMP::PairLJCutCoulPPPMOMP(LAMMPS *lmp) :
|
PairLJCutCoulPPPMOMP::PairLJCutCoulPPPMOMP(LAMMPS *lmp) :
|
||||||
PairLJCutCoulLong(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
PairLJCutCoulLong(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
nproxy=1;
|
nproxy=1;
|
||||||
|
|
||||||
kspace = NULL;
|
kspace = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define EWALD_F 1.12837917
|
#define EWALD_F 1.12837917
|
||||||
|
@ -42,6 +43,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCutCoulPPPMTIP4POMP::PairLJCutCoulPPPMTIP4POMP(LAMMPS *lmp) :
|
PairLJCutCoulPPPMTIP4POMP::PairLJCutCoulPPPMTIP4POMP(LAMMPS *lmp) :
|
||||||
PairLJCutCoulLongTIP4P(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
PairLJCutCoulLongTIP4P(lmp), ThrOMP(lmp, THR_PAIR|THR_PROXY)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
nproxy=1;
|
nproxy=1;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJCutOMP::PairLJCutOMP(LAMMPS *lmp) :
|
PairLJCutOMP::PairLJCutOMP(LAMMPS *lmp) :
|
||||||
PairLJCut(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJCut(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJExpandOMP::PairLJExpandOMP(LAMMPS *lmp) :
|
PairLJExpandOMP::PairLJExpandOMP(LAMMPS *lmp) :
|
||||||
PairLJExpand(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJExpand(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJGromacsCoulGromacsOMP::PairLJGromacsCoulGromacsOMP(LAMMPS *lmp) :
|
PairLJGromacsCoulGromacsOMP::PairLJGromacsCoulGromacsOMP(LAMMPS *lmp) :
|
||||||
PairLJGromacsCoulGromacs(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJGromacsCoulGromacs(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJGromacsOMP::PairLJGromacsOMP(LAMMPS *lmp) :
|
PairLJGromacsOMP::PairLJGromacsOMP(LAMMPS *lmp) :
|
||||||
PairLJGromacs(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJGromacs(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "lj_sdk_common.h"
|
#include "lj_sdk_common.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace LJSDKParms;
|
using namespace LJSDKParms;
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ using namespace LJSDKParms;
|
||||||
PairLJSDKCoulLongOMP::PairLJSDKCoulLongOMP(LAMMPS *lmp) :
|
PairLJSDKCoulLongOMP::PairLJSDKCoulLongOMP(LAMMPS *lmp) :
|
||||||
PairLJSDKCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJSDKCoulLong(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,8 +93,6 @@ void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr)
|
||||||
double r,rsq,r2inv,forcecoul,forcelj,factor_coul,factor_lj;
|
double r,rsq,r2inv,forcecoul,forcelj,factor_coul,factor_lj;
|
||||||
double grij,expm2,prefactor,t,erfc;
|
double grij,expm2,prefactor,t,erfc;
|
||||||
|
|
||||||
evdwl = ecoul = 0.0;
|
|
||||||
|
|
||||||
const double * const * const x = atom->x;
|
const double * const * const x = atom->x;
|
||||||
double * const * const f = thr->get_f();
|
double * const * const f = thr->get_f();
|
||||||
const double * const q = atom->q;
|
const double * const q = atom->q;
|
||||||
|
@ -123,6 +123,8 @@ void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr)
|
||||||
const int jnum = numneigh[i];
|
const int jnum = numneigh[i];
|
||||||
|
|
||||||
for (jj = 0; jj < jnum; jj++) {
|
for (jj = 0; jj < jnum; jj++) {
|
||||||
|
forcecoul = forcelj = evdwl = ecoul = 0.0;
|
||||||
|
|
||||||
j = jlist[jj];
|
j = jlist[jj];
|
||||||
factor_lj = special_lj[sbmask(j)];
|
factor_lj = special_lj[sbmask(j)];
|
||||||
factor_coul = special_coul[sbmask(j)];
|
factor_coul = special_coul[sbmask(j)];
|
||||||
|
@ -147,7 +149,13 @@ void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr)
|
||||||
erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
||||||
prefactor = qqrd2e * qtmp*q[j]/r;
|
prefactor = qqrd2e * qtmp*q[j]/r;
|
||||||
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2);
|
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2);
|
||||||
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor;
|
if (EFLAG)
|
||||||
|
ecoul = prefactor*erfc;
|
||||||
|
if (factor_coul < 1.0) {
|
||||||
|
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
if (EFLAG)
|
||||||
|
ecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
union_int_float_t rsq_lookup;
|
union_int_float_t rsq_lookup;
|
||||||
rsq_lookup.f = rsq;
|
rsq_lookup.f = rsq;
|
||||||
|
@ -156,15 +164,16 @@ void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr)
|
||||||
fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
|
fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
|
||||||
table = ftable[itable] + fraction*dftable[itable];
|
table = ftable[itable] + fraction*dftable[itable];
|
||||||
forcecoul = qtmp*q[j] * table;
|
forcecoul = qtmp*q[j] * table;
|
||||||
|
if (EFLAG)
|
||||||
|
ecoul = qtmp*q[j] * table;
|
||||||
if (factor_coul < 1.0) {
|
if (factor_coul < 1.0) {
|
||||||
table = ctable[itable] + fraction*dctable[itable];
|
table = ctable[itable] + fraction*dctable[itable];
|
||||||
prefactor = qtmp*q[j] * table;
|
prefactor = qtmp*q[j] * table;
|
||||||
forcecoul -= (1.0-factor_coul)*prefactor;
|
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
if (EFLAG)
|
||||||
|
ecoul -= (1.0-factor_coul)*prefactor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
forcecoul = 0.0;
|
|
||||||
ecoul = 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsq < cut_ljsq[itype][jtype]) {
|
if (rsq < cut_ljsq[itype][jtype]) {
|
||||||
|
@ -177,7 +186,7 @@ void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr)
|
||||||
if (EFLAG)
|
if (EFLAG)
|
||||||
evdwl = r4inv*(lj3[itype][jtype]*r4inv*r4inv
|
evdwl = r4inv*(lj3[itype][jtype]*r4inv*r4inv
|
||||||
- lj4[itype][jtype]) - offset[itype][jtype];
|
- lj4[itype][jtype]) - offset[itype][jtype];
|
||||||
|
|
||||||
} else if (ljt == LJ9_6) {
|
} else if (ljt == LJ9_6) {
|
||||||
const double r3inv = r2inv*sqrt(r2inv);
|
const double r3inv = r2inv*sqrt(r2inv);
|
||||||
const double r6inv = r3inv*r3inv;
|
const double r6inv = r3inv*r3inv;
|
||||||
|
@ -195,12 +204,12 @@ void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr)
|
||||||
evdwl = r6inv*(lj3[itype][jtype]*r6inv
|
evdwl = r6inv*(lj3[itype][jtype]*r6inv
|
||||||
- lj4[itype][jtype]) - offset[itype][jtype];
|
- lj4[itype][jtype]) - offset[itype][jtype];
|
||||||
}
|
}
|
||||||
} else {
|
forcelj *= factor_lj;
|
||||||
forcelj=0.0;
|
if (EFLAG)
|
||||||
evdwl = 0.0;
|
evdwl *= factor_lj;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpair = (forcecoul + factor_lj*forcelj) * r2inv;
|
fpair = (forcecoul + forcelj) * r2inv;
|
||||||
|
|
||||||
fxtmp += delx*fpair;
|
fxtmp += delx*fpair;
|
||||||
fytmp += dely*fpair;
|
fytmp += dely*fpair;
|
||||||
|
@ -211,24 +220,9 @@ void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr)
|
||||||
f[j][2] -= delz*fpair;
|
f[j][2] -= delz*fpair;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFLAG) {
|
if (EVFLAG) ev_tally_thr(this,i,j,nlocal,NEWTON_PAIR,
|
||||||
if (rsq < cut_coulsq) {
|
|
||||||
if (!ncoultablebits || rsq <= tabinnersq)
|
|
||||||
ecoul = prefactor*erfc;
|
|
||||||
else {
|
|
||||||
table = etable[itable] + fraction*detable[itable];
|
|
||||||
ecoul = qtmp*q[j] * table;
|
|
||||||
}
|
|
||||||
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor;
|
|
||||||
} else ecoul = 0.0;
|
|
||||||
|
|
||||||
if (rsq < cut_ljsq[itype][jtype]) {
|
|
||||||
evdwl *= factor_lj;
|
|
||||||
} else evdwl = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (EVFLAG) ev_tally_thr(this, i,j,nlocal,NEWTON_PAIR,
|
|
||||||
evdwl,ecoul,fpair,delx,dely,delz,thr);
|
evdwl,ecoul,fpair,delx,dely,delz,thr);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f[i][0] += fxtmp;
|
f[i][0] += fxtmp;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "lj_sdk_common.h"
|
#include "lj_sdk_common.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace LJSDKParms;
|
using namespace LJSDKParms;
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ using namespace LJSDKParms;
|
||||||
PairLJSDKOMP::PairLJSDKOMP(LAMMPS *lmp) :
|
PairLJSDKOMP::PairLJSDKOMP(LAMMPS *lmp) :
|
||||||
PairLJSDK(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJSDK(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJShiftedForceOMP::PairLJShiftedForceOMP(LAMMPS *lmp) :
|
PairLJShiftedForceOMP::PairLJShiftedForceOMP(LAMMPS *lmp) :
|
||||||
PairLJShiftedForce(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJShiftedForce(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJSmoothLinearOMP::PairLJSmoothLinearOMP(LAMMPS *lmp) :
|
PairLJSmoothLinearOMP::PairLJSmoothLinearOMP(LAMMPS *lmp) :
|
||||||
PairLJSmoothLinear(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJSmoothLinear(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairLJSmoothOMP::PairLJSmoothOMP(LAMMPS *lmp) :
|
PairLJSmoothOMP::PairLJSmoothOMP(LAMMPS *lmp) :
|
||||||
PairLJSmooth(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLJSmooth(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "random_mars.h"
|
#include "random_mars.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@ using namespace MathConst;
|
||||||
PairLubricateOMP::PairLubricateOMP(LAMMPS *lmp) :
|
PairLubricateOMP::PairLubricateOMP(LAMMPS *lmp) :
|
||||||
PairLubricate(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLubricate(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "random_mars.h"
|
#include "random_mars.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@ using namespace MathConst;
|
||||||
PairLubricatePolyOMP::PairLubricatePolyOMP(LAMMPS *lmp) :
|
PairLubricatePolyOMP::PairLubricatePolyOMP(LAMMPS *lmp) :
|
||||||
PairLubricatePoly(lmp), ThrOMP(lmp, THR_PAIR)
|
PairLubricatePoly(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairMorseOMP::PairMorseOMP(LAMMPS *lmp) :
|
PairMorseOMP::PairMorseOMP(LAMMPS *lmp) :
|
||||||
PairMorse(lmp), ThrOMP(lmp, THR_PAIR)
|
PairMorse(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ using namespace MathConst;
|
||||||
PairPeriLPSOMP::PairPeriLPSOMP(LAMMPS *lmp) :
|
PairPeriLPSOMP::PairPeriLPSOMP(LAMMPS *lmp) :
|
||||||
PairPeriLPS(lmp), ThrOMP(lmp, THR_PAIR)
|
PairPeriLPS(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -34,6 +35,7 @@ using namespace LAMMPS_NS;
|
||||||
PairPeriPMBOMP::PairPeriPMBOMP(LAMMPS *lmp) :
|
PairPeriPMBOMP::PairPeriPMBOMP(LAMMPS *lmp) :
|
||||||
PairPeriPMB(lmp), ThrOMP(lmp, THR_PAIR)
|
PairPeriPMB(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -29,6 +30,7 @@ using namespace LAMMPS_NS;
|
||||||
PairRESquaredOMP::PairRESquaredOMP(LAMMPS *lmp) :
|
PairRESquaredOMP::PairRESquaredOMP(LAMMPS *lmp) :
|
||||||
PairRESquared(lmp), ThrOMP(lmp, THR_PAIR)
|
PairRESquared(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ using namespace MathConst;
|
||||||
PairSoftOMP::PairSoftOMP(LAMMPS *lmp) :
|
PairSoftOMP::PairSoftOMP(LAMMPS *lmp) :
|
||||||
PairSoft(lmp), ThrOMP(lmp, THR_PAIR)
|
PairSoft(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairSWOMP::PairSWOMP(LAMMPS *lmp) :
|
PairSWOMP::PairSWOMP(LAMMPS *lmp) :
|
||||||
PairSW(lmp), ThrOMP(lmp, THR_PAIR)
|
PairSW(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -28,6 +29,7 @@ using namespace LAMMPS_NS;
|
||||||
PairTableOMP::PairTableOMP(LAMMPS *lmp) :
|
PairTableOMP::PairTableOMP(LAMMPS *lmp) :
|
||||||
PairTable(lmp), ThrOMP(lmp, THR_PAIR)
|
PairTable(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairTersoffOMP::PairTersoffOMP(LAMMPS *lmp) :
|
PairTersoffOMP::PairTersoffOMP(LAMMPS *lmp) :
|
||||||
PairTersoff(lmp), ThrOMP(lmp, THR_PAIR)
|
PairTersoff(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -28,6 +29,7 @@ using namespace LAMMPS_NS;
|
||||||
PairTersoffTableOMP::PairTersoffTableOMP(LAMMPS *lmp) :
|
PairTersoffTableOMP::PairTersoffTableOMP(LAMMPS *lmp) :
|
||||||
PairTersoffTable(lmp), ThrOMP(lmp, THR_PAIR)
|
PairTersoffTable(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -35,6 +36,7 @@ using namespace LAMMPS_NS;
|
||||||
PairTriLJOMP::PairTriLJOMP(LAMMPS *lmp) :
|
PairTriLJOMP::PairTriLJOMP(LAMMPS *lmp) :
|
||||||
PairTriLJ(lmp), ThrOMP(lmp, THR_PAIR)
|
PairTriLJ(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairYukawaColloidOMP::PairYukawaColloidOMP(LAMMPS *lmp) :
|
PairYukawaColloidOMP::PairYukawaColloidOMP(LAMMPS *lmp) :
|
||||||
PairYukawaColloid(lmp), ThrOMP(lmp, THR_PAIR)
|
PairYukawaColloid(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
|
|
||||||
|
#include "suffix.h"
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -27,6 +28,7 @@ using namespace LAMMPS_NS;
|
||||||
PairYukawaOMP::PairYukawaOMP(LAMMPS *lmp) :
|
PairYukawaOMP::PairYukawaOMP(LAMMPS *lmp) :
|
||||||
PairYukawa(lmp), ThrOMP(lmp, THR_PAIR)
|
PairYukawa(lmp), ThrOMP(lmp, THR_PAIR)
|
||||||
{
|
{
|
||||||
|
suffix_flag |= Suffix::OMP;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,6 +173,8 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||||
double **f = lmp->atom->f;
|
double **f = lmp->atom->f;
|
||||||
double **x = lmp->atom->x;
|
double **x = lmp->atom->x;
|
||||||
|
|
||||||
|
int need_force_reduce = 1;
|
||||||
|
|
||||||
if (evflag)
|
if (evflag)
|
||||||
sync_threads();
|
sync_threads();
|
||||||
|
|
||||||
|
@ -180,12 +182,23 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||||
|
|
||||||
case THR_PAIR: {
|
case THR_PAIR: {
|
||||||
Pair * const pair = lmp->force->pair;
|
Pair * const pair = lmp->force->pair;
|
||||||
|
|
||||||
if (pair->vflag_fdotr) {
|
if (pair->vflag_fdotr) {
|
||||||
if (lmp->neighbor->includegroup == 0)
|
|
||||||
thr->virial_fdotr_compute(x, nlocal, nghost, -1);
|
if (style == fix->last_pair_hybrid) {
|
||||||
else
|
// pair_style hybrid will compute fdotr for us
|
||||||
thr->virial_fdotr_compute(x, nlocal, nghost, nfirst);
|
// but we first need to reduce the forces
|
||||||
|
data_reduce_thr(&(f[0][0]), nall, nthreads, 3, tid);
|
||||||
|
need_force_reduce = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// this is a non-hybrid pair style. compute per thread fdotr
|
||||||
|
if (fix->last_pair_hybrid == NULL) {
|
||||||
|
if (lmp->neighbor->includegroup == 0)
|
||||||
|
thr->virial_fdotr_compute(x, nlocal, nghost, -1);
|
||||||
|
else
|
||||||
|
thr->virial_fdotr_compute(x, nlocal, nghost, nfirst);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evflag) {
|
if (evflag) {
|
||||||
|
@ -217,12 +230,23 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||||
|
|
||||||
case THR_PAIR|THR_PROXY: {
|
case THR_PAIR|THR_PROXY: {
|
||||||
Pair * const pair = lmp->force->pair;
|
Pair * const pair = lmp->force->pair;
|
||||||
|
|
||||||
if (tid >= nproxy && pair->vflag_fdotr) {
|
if (tid >= nproxy && pair->vflag_fdotr) {
|
||||||
if (lmp->neighbor->includegroup == 0)
|
|
||||||
thr->virial_fdotr_compute(x, nlocal, nghost, -1);
|
if (fix->last_pair_hybrid) {
|
||||||
else
|
if (tid == nproxy)
|
||||||
thr->virial_fdotr_compute(x, nlocal, nghost, nfirst);
|
lmp->error->all(FLERR,
|
||||||
|
"Cannot use hybrid pair style with kspace proxy");
|
||||||
|
else return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// this is a non-hybrid pair style. compute per thread fdotr
|
||||||
|
if (fix->last_pair_hybrid == NULL) {
|
||||||
|
if (lmp->neighbor->includegroup == 0)
|
||||||
|
thr->virial_fdotr_compute(x, nlocal, nghost, -1);
|
||||||
|
else
|
||||||
|
thr->virial_fdotr_compute(x, nlocal, nghost, nfirst);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evflag) {
|
if (evflag) {
|
||||||
|
@ -406,8 +430,10 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style == fix->last_omp_style) {
|
if (style == fix->last_omp_style) {
|
||||||
data_reduce_thr(&(f[0][0]), nall, nthreads, 3, tid);
|
if (need_force_reduce)
|
||||||
|
data_reduce_thr(&(f[0][0]), nall, nthreads, 3, tid);
|
||||||
|
|
||||||
if (lmp->atom->torque)
|
if (lmp->atom->torque)
|
||||||
data_reduce_thr(&(lmp->atom->torque[0][0]), nall, nthreads, 3, tid);
|
data_reduce_thr(&(lmp->atom->torque[0][0]), nall, nthreads, 3, tid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "accelerator_cuda.h"
|
#include "accelerator_cuda.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "suffix.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
@ -71,6 +72,7 @@ Pair::Pair(LAMMPS *lmp) : Pointers(lmp)
|
||||||
tabinner = sqrt(2.0);
|
tabinner = sqrt(2.0);
|
||||||
|
|
||||||
allocated = 0;
|
allocated = 0;
|
||||||
|
suffix_flag = Suffix::NONE;
|
||||||
|
|
||||||
maxeatom = maxvatom = 0;
|
maxeatom = maxvatom = 0;
|
||||||
eatom = NULL;
|
eatom = NULL;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* ----------------------------------------------------------------------
|
/* -*- c++ -*- ----------------------------------------------------------
|
||||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||||
http://lammps.sandia.gov, Sandia National Laboratories
|
http://lammps.sandia.gov, Sandia National Laboratories
|
||||||
Steve Plimpton, sjplimp@sandia.gov
|
Steve Plimpton, sjplimp@sandia.gov
|
||||||
|
@ -26,6 +26,7 @@ class Pair : protected Pointers {
|
||||||
friend class DihedralCharmm;
|
friend class DihedralCharmm;
|
||||||
friend class DihedralCharmmOMP;
|
friend class DihedralCharmmOMP;
|
||||||
friend class FixGPU;
|
friend class FixGPU;
|
||||||
|
friend class FixOMP;
|
||||||
friend class ThrOMP;
|
friend class ThrOMP;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -133,7 +134,8 @@ class Pair : protected Pointers {
|
||||||
virtual void min_x_set(int) {}
|
virtual void min_x_set(int) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int allocated; // 0/1 = whether arrays are allocated
|
int allocated; // 0/1 = whether arrays are allocated
|
||||||
|
int suffix_flag; // suffix compatibility flag
|
||||||
|
|
||||||
// pair_modify settings
|
// pair_modify settings
|
||||||
int offset_flag,mix_flag; // flags for offset and mixing
|
int offset_flag,mix_flag; // flags for offset and mixing
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PairBeck : public Pair {
|
||||||
public:
|
public:
|
||||||
PairBeck(class LAMMPS *);
|
PairBeck(class LAMMPS *);
|
||||||
virtual ~PairBeck();
|
virtual ~PairBeck();
|
||||||
void compute(int, int);
|
virtual void compute(int, int);
|
||||||
void settings(int, char **);
|
void settings(int, char **);
|
||||||
void coeff(int, char **);
|
void coeff(int, char **);
|
||||||
double init_one(int, int);
|
double init_one(int, int);
|
||||||
|
@ -56,17 +56,14 @@ class PairBeck : public Pair {
|
||||||
|
|
||||||
E: Illegal ... command
|
E: Illegal ... command
|
||||||
|
|
||||||
Self-explanatory. Check the input script syntax and compare to the
|
UNDOCUMENTED
|
||||||
documentation for the command. You can use -echo screen as a
|
|
||||||
command-line option when running LAMMPS to see the offending line.
|
|
||||||
|
|
||||||
E: Incorrect args for pair coefficients
|
E: Incorrect args for pair coefficients
|
||||||
|
|
||||||
Self-explanatory. Check the input script or data file.
|
UNDOCUMENTED
|
||||||
|
|
||||||
E: All pair coeffs are not set
|
E: All pair coeffs are not set
|
||||||
|
|
||||||
All pair coefficients must be set in the data file or by the
|
UNDOCUMENTED
|
||||||
pair_coeff command before running a simulation.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||||
|
http://lammps.sandia.gov, Sandia National Laboratories
|
||||||
|
Steve Plimpton, sjplimp@sandia.gov
|
||||||
|
|
||||||
|
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||||
|
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||||
|
certain rights in this software. This software is distributed under
|
||||||
|
the GNU General Public License.
|
||||||
|
|
||||||
|
See the README file in the top-level LAMMPS directory.
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#ifndef LMP_SUFFIX_H
|
||||||
|
#define LMP_SUFFIX_H
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
namespace Suffix {
|
||||||
|
static const int NONE = 0;
|
||||||
|
static const int OPT = 1<<0;
|
||||||
|
static const int GPU = 1<<1;
|
||||||
|
static const int CUDA = 1<<2;
|
||||||
|
static const int OMP = 1<<3;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue