git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9175 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-01-02 16:27:31 +00:00
parent d6353f2da3
commit c8624bc7eb
4 changed files with 42 additions and 13 deletions

View File

@ -77,9 +77,9 @@ __kernel void k_yukawa(const __global numtyp4 *restrict x_,
int mtype=itype*lj_types+jtype;
if (rsq<coeff[mtype].z) {
numtyp r2inv = (numtyp)1.0/rsq;
numtyp r = ucl_rsqrt(r2inv);
numtyp rinv = 1.0/r;
numtyp r2inv = ucl_recip(rsq);
numtyp r = ucl_sqrt(rsq);
numtyp rinv = ucl_recip(r);
numtyp screening = exp(-kappa*r);
numtyp force = coeff[mtype].x*screening*(kappa + rinv)*r2inv;
force*=factor_lj;
@ -165,9 +165,9 @@ __kernel void k_yukawa_fast(const __global numtyp4 *restrict x_,
numtyp rsq = delx*delx+dely*dely+delz*delz;
if (rsq<coeff[mtype].z) {
numtyp r2inv = (numtyp)1.0/rsq;
numtyp r = ucl_rsqrt(r2inv);
numtyp rinv = 1.0/r;
numtyp r2inv = ucl_recip(rsq);
numtyp r = ucl_sqrt(rsq);
numtyp rinv = ucl_recip(r);
numtyp screening = exp(-kappa*r);
numtyp force = coeff[mtype].x*screening*(kappa + rinv)*r2inv;
force*=factor_lj;