git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8814 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -127,10 +127,8 @@ include ..\/..\/lib\/gpu\/Makefile.lammps
|
|||||||
cp pair_lj96_cut_gpu.cpp ..
|
cp pair_lj96_cut_gpu.cpp ..
|
||||||
cp pair_lj_expand_gpu.cpp ..
|
cp pair_lj_expand_gpu.cpp ..
|
||||||
cp pair_lj_cut_coul_cut_gpu.cpp ..
|
cp pair_lj_cut_coul_cut_gpu.cpp ..
|
||||||
# cp pair_lj_cut_coul_dsf.cpp ..
|
cp pair_lj_cut_coul_dsf_gpu.cpp ..
|
||||||
# cp pair_lj_cut_coul_dsf_gpu.cpp ..
|
cp pair_coul_dsf_gpu.cpp ..
|
||||||
# cp pair_coul_dsf.cpp ..
|
|
||||||
# cp pair_coul_dsf_gpu.cpp ..
|
|
||||||
cp pair_lj_cut_coul_debye_gpu.cpp ..
|
cp pair_lj_cut_coul_debye_gpu.cpp ..
|
||||||
cp pair_born_gpu.cpp ..
|
cp pair_born_gpu.cpp ..
|
||||||
cp pair_born_coul_wolf_gpu.cpp ..
|
cp pair_born_coul_wolf_gpu.cpp ..
|
||||||
@ -144,10 +142,8 @@ include ..\/..\/lib\/gpu\/Makefile.lammps
|
|||||||
cp pair_lj96_cut_gpu.h ..
|
cp pair_lj96_cut_gpu.h ..
|
||||||
cp pair_lj_expand_gpu.h ..
|
cp pair_lj_expand_gpu.h ..
|
||||||
cp pair_lj_cut_coul_cut_gpu.h ..
|
cp pair_lj_cut_coul_cut_gpu.h ..
|
||||||
# cp pair_lj_cut_coul_dsf.h ..
|
cp pair_lj_cut_coul_dsf_gpu.h ..
|
||||||
# cp pair_lj_cut_coul_dsf_gpu.h ..
|
cp pair_coul_dsf_gpu.h ..
|
||||||
# cp pair_coul_dsf.h ..
|
|
||||||
# cp pair_coul_dsf_gpu.h ..
|
|
||||||
cp pair_lj_cut_coul_debye_gpu.h ..
|
cp pair_lj_cut_coul_debye_gpu.h ..
|
||||||
cp pair_born_gpu.h ..
|
cp pair_born_gpu.h ..
|
||||||
cp pair_born_coul_wolf_gpu.h ..
|
cp pair_born_coul_wolf_gpu.h ..
|
||||||
@ -197,9 +193,7 @@ elif (test $1 = 0) then
|
|||||||
rm -f ../pair_yukawa_colloid_gpu.cpp
|
rm -f ../pair_yukawa_colloid_gpu.cpp
|
||||||
rm -f ../pair_dipole_cut_gpu.cpp
|
rm -f ../pair_dipole_cut_gpu.cpp
|
||||||
rm -f ../pair_dipole_sf_gpu.cpp
|
rm -f ../pair_dipole_sf_gpu.cpp
|
||||||
rm -f ../pair_lj_cut_coul_dsf.cpp
|
|
||||||
rm -f ../pair_lj_cut_coul_dsf_gpu.cpp
|
rm -f ../pair_lj_cut_coul_dsf_gpu.cpp
|
||||||
rm -f ../pair_coul_dsf.cpp
|
|
||||||
rm -f ../pair_coul_dsf_gpu.cpp
|
rm -f ../pair_coul_dsf_gpu.cpp
|
||||||
rm -f ../pair_lj_cut_coul_debye_gpu.cpp
|
rm -f ../pair_lj_cut_coul_debye_gpu.cpp
|
||||||
rm -f ../pppm_gpu.cpp
|
rm -f ../pppm_gpu.cpp
|
||||||
@ -236,9 +230,7 @@ elif (test $1 = 0) then
|
|||||||
rm -f ../pair_yukawa_colloid_gpu.h
|
rm -f ../pair_yukawa_colloid_gpu.h
|
||||||
rm -f ../pair_dipole_cut_gpu.h
|
rm -f ../pair_dipole_cut_gpu.h
|
||||||
rm -f ../pair_dipole_sf_gpu.h
|
rm -f ../pair_dipole_sf_gpu.h
|
||||||
rm -f ../pair_lj_cut_coul_dsf.h
|
|
||||||
rm -f ../pair_lj_cut_coul_dsf_gpu.h
|
rm -f ../pair_lj_cut_coul_dsf_gpu.h
|
||||||
rm -f ../pair_coul_dsf.h
|
|
||||||
rm -f ../pair_coul_dsf_gpu.h
|
rm -f ../pair_coul_dsf_gpu.h
|
||||||
rm -f ../pair_lj_cut_coul_debye_gpu.h
|
rm -f ../pair_lj_cut_coul_debye_gpu.h
|
||||||
rm -f ../pppm_gpu.h
|
rm -f ../pppm_gpu.h
|
||||||
|
|||||||
@ -108,12 +108,6 @@ for file in *.cpp *.h; do
|
|||||||
if (test $file = pair_lj_charmm_coul_long_gpu.h -a ! -e ../pair_lj_charmm_coul_long.cpp) then
|
if (test $file = pair_lj_charmm_coul_long_gpu.h -a ! -e ../pair_lj_charmm_coul_long.cpp) then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if (test $file = pair_lj_cut_coul_dsf_gpu.cpp -a ! -e ../pair_lj_cut_coul_dsf.cpp) then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if (test $file = pair_lj_cut_coul_dsf_gpu.h -a ! -e ../pair_lj_cut_coul_dsf.cpp) then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if (test $file = pppm_gpu.cpp -a ! -e ../pppm.cpp) then
|
if (test $file = pppm_gpu.cpp -a ! -e ../pppm.cpp) then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -197,10 +197,10 @@ void PairBornCoulWolfGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||||||
int i,j,ii,jj,jnum,itype,jtype;
|
int i,j,ii,jj,jnum,itype,jtype;
|
||||||
double xtmp,ytmp,ztmp,qtmp,delx,dely,delz,evdwl,ecoul,fpair;
|
double xtmp,ytmp,ztmp,qtmp,delx,dely,delz,evdwl,ecoul,fpair;
|
||||||
double rsq,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj;
|
double rsq,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj;
|
||||||
|
double erfcc,erfcd,v_sh,dvdrr,e_self,qisq;
|
||||||
double prefactor;
|
double prefactor;
|
||||||
double r,rexp;
|
double r,rexp;
|
||||||
int *jlist;
|
int *jlist;
|
||||||
double erfcc,erfcd,v_sh,dvdrr,e_self,e_shift,f_shift,qisq;
|
|
||||||
|
|
||||||
evdwl = ecoul = 0.0;
|
evdwl = ecoul = 0.0;
|
||||||
|
|
||||||
@ -213,9 +213,9 @@ void PairBornCoulWolfGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||||||
double *special_lj = force->special_lj;
|
double *special_lj = force->special_lj;
|
||||||
double qqrd2e = force->qqrd2e;
|
double qqrd2e = force->qqrd2e;
|
||||||
|
|
||||||
qisq = qtmp*qtmp;
|
double e_shift = erfc(alf*cut_coul)/cut_coul;
|
||||||
e_self = -(e_shift/2.0 + alf/MY_PIS) * qisq*qqrd2e;
|
double f_shift = -(e_shift+ 2.0*alf/MY_PIS * exp(-alf*alf*cut_coul*cut_coul)) /
|
||||||
if (evflag) ev_tally(i,i,nlocal,0,0.0,e_self,0.0,0.0,0.0,0.0);
|
cut_coul;
|
||||||
|
|
||||||
// loop over neighbors of my atoms
|
// loop over neighbors of my atoms
|
||||||
|
|
||||||
@ -229,6 +229,10 @@ void PairBornCoulWolfGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||||||
jlist = firstneigh[i];
|
jlist = firstneigh[i];
|
||||||
jnum = numneigh[i];
|
jnum = numneigh[i];
|
||||||
|
|
||||||
|
qisq = qtmp*qtmp;
|
||||||
|
e_self = -(e_shift/2.0 + alf/MY_PIS) * qisq*qqrd2e;
|
||||||
|
if (evflag) ev_tally(i,i,nlocal,0,0.0,e_self,0.0,0.0,0.0,0.0);
|
||||||
|
|
||||||
for (jj = 0; jj < jnum; jj++) {
|
for (jj = 0; jj < jnum; jj++) {
|
||||||
j = jlist[jj];
|
j = jlist[jj];
|
||||||
factor_lj = special_lj[sbmask(j)];
|
factor_lj = special_lj[sbmask(j)];
|
||||||
@ -270,9 +274,10 @@ void PairBornCoulWolfGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||||||
f[i][2] += delz*fpair;
|
f[i][2] += delz*fpair;
|
||||||
|
|
||||||
if (eflag) {
|
if (eflag) {
|
||||||
if (rsq < cut_coulsq)
|
if (rsq < cut_coulsq) {
|
||||||
ecoul = v_sh;
|
ecoul = v_sh;
|
||||||
else ecoul = 0.0;
|
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor;
|
||||||
|
} else ecoul = 0.0;
|
||||||
if (rsq < cut_ljsq[itype][jtype]) {
|
if (rsq < cut_ljsq[itype][jtype]) {
|
||||||
evdwl = a[itype][jtype]*rexp - c[itype][jtype]*r6inv +
|
evdwl = a[itype][jtype]*rexp - c[itype][jtype]*r6inv +
|
||||||
d[itype][jtype]*r6inv*r2inv - offset[itype][jtype];
|
d[itype][jtype]*r6inv*r2inv - offset[itype][jtype];
|
||||||
|
|||||||
@ -219,6 +219,7 @@ void PairEAMAlloyGPU::file2array()
|
|||||||
nr = setfl->nr;
|
nr = setfl->nr;
|
||||||
drho = setfl->drho;
|
drho = setfl->drho;
|
||||||
dr = setfl->dr;
|
dr = setfl->dr;
|
||||||
|
rhomax = (nrho-1) * drho;
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// setup frho arrays
|
// setup frho arrays
|
||||||
|
|||||||
@ -224,6 +224,7 @@ void PairEAMFSGPU::file2array()
|
|||||||
nr = fs->nr;
|
nr = fs->nr;
|
||||||
drho = fs->drho;
|
drho = fs->drho;
|
||||||
dr = fs->dr;
|
dr = fs->dr;
|
||||||
|
rhomax = (nrho-1) * drho;
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// setup frho arrays
|
// setup frho arrays
|
||||||
|
|||||||
@ -41,11 +41,11 @@ int eam_gpu_init(const int ntypes, double host_cutforcesq,
|
|||||||
int **host_type2rhor, int **host_type2z2r,
|
int **host_type2rhor, int **host_type2z2r,
|
||||||
int *host_type2frho, double ***host_rhor_spline,
|
int *host_type2frho, double ***host_rhor_spline,
|
||||||
double ***host_z2r_spline, double ***host_frho_spline,
|
double ***host_z2r_spline, double ***host_frho_spline,
|
||||||
double rdr, double rdrho, int nrhor, int nrho, int nz2r,
|
double rdr, double rdrho, double rhomax,
|
||||||
int nfrho, int nr, const int nlocal, const int nall,
|
int nrhor, int nrho, int nz2r, int nfrho, int nr,
|
||||||
const int max_nbors, const int maxspecial,
|
const int nlocal, const int nall, const int max_nbors,
|
||||||
const double cell_size, int &gpu_mode, FILE *screen,
|
const int maxspecial, const double cell_size, int &gpu_mode,
|
||||||
int &fp_size);
|
FILE *screen, int &fp_size);
|
||||||
void eam_gpu_clear();
|
void eam_gpu_clear();
|
||||||
int** eam_gpu_compute_n(const int ago, const int inum_full, const int nall,
|
int** eam_gpu_compute_n(const int ago, const int inum_full, const int nall,
|
||||||
double **host_x, int *host_type, double *sublo,
|
double **host_x, int *host_type, double *sublo,
|
||||||
@ -180,7 +180,7 @@ void PairEAMGPU::init_style()
|
|||||||
int fp_size;
|
int fp_size;
|
||||||
int success = eam_gpu_init(atom->ntypes+1, cutforcesq, type2rhor, type2z2r,
|
int success = eam_gpu_init(atom->ntypes+1, cutforcesq, type2rhor, type2z2r,
|
||||||
type2frho, rhor_spline, z2r_spline, frho_spline,
|
type2frho, rhor_spline, z2r_spline, frho_spline,
|
||||||
rdr, rdrho, nrhor, nrho, nz2r, nfrho, nr,
|
rdr, rdrho, rhomax, nrhor, nrho, nz2r, nfrho, nr,
|
||||||
atom->nlocal, atom->nlocal+atom->nghost, 300,
|
atom->nlocal, atom->nlocal+atom->nghost, 300,
|
||||||
maxspecial, cell_size, gpu_mode, screen, fp_size);
|
maxspecial, cell_size, gpu_mode, screen, fp_size);
|
||||||
GPU_EXTRA::check_flag(success,error,world);
|
GPU_EXTRA::check_flag(success,error,world);
|
||||||
|
|||||||
Reference in New Issue
Block a user