should not use pow() for computing cube, use multiplication.
This commit is contained in:
@ -992,7 +992,8 @@ __kernel void k_amoeba_umutual2b(const __global numtyp4 *restrict x_,
|
|||||||
numtyp damp = pdi * coeff[jtype].x; // pdamp[jtype]
|
numtyp damp = pdi * coeff[jtype].x; // pdamp[jtype]
|
||||||
if (damp != (numtyp)0.0) {
|
if (damp != (numtyp)0.0) {
|
||||||
numtyp pgamma = MIN(pti,coeff[jtype].y); // thole[jtype]
|
numtyp pgamma = MIN(pti,coeff[jtype].y); // thole[jtype]
|
||||||
damp = pgamma * ucl_powr(r/damp,(numtyp)3.0);
|
numtyp rdamp = r/damp;
|
||||||
|
damp = pgamma * rdamp*rdamp*rdamp;
|
||||||
if (damp < (numtyp)50.0) {
|
if (damp < (numtyp)50.0) {
|
||||||
numtyp expdamp = ucl_exp(-damp);
|
numtyp expdamp = ucl_exp(-damp);
|
||||||
scale3 = (numtyp)1.0 - expdamp;
|
scale3 = (numtyp)1.0 - expdamp;
|
||||||
|
|||||||
@ -845,7 +845,7 @@ __kernel void k_hippo_dispersion(const __global numtyp4 *restrict x_,
|
|||||||
numtyp scale = factor_disp * damp*damp;
|
numtyp scale = factor_disp * damp*damp;
|
||||||
scale = scale - (numtyp)1.0;
|
scale = scale - (numtyp)1.0;
|
||||||
numtyp e = -ci * ck * (expa+scale) / r6;
|
numtyp e = -ci * ck * (expa+scale) / r6;
|
||||||
numtyp rterm = -ucl_powr(ralpha2,(numtyp)3.0) * expterm / r;
|
numtyp rterm = -ralpha2*ralpha2*ralpha2 * expterm / r;
|
||||||
numtyp de = (numtyp)-6.0*e/r2 - ci*ck*rterm/r7 - (numtyp)2.0*ci*ck*factor_disp*damp*ddamp/r7;
|
numtyp de = (numtyp)-6.0*e/r2 - ci*ck*rterm/r7 - (numtyp)2.0*ci*ck*factor_disp*damp*ddamp/r7;
|
||||||
|
|
||||||
energy+= e;
|
energy+= e;
|
||||||
|
|||||||
Reference in New Issue
Block a user