|
| 1 | +KERNEL_NAME: alterpol_cu1 |
| 2 | + |
| 3 | +CUT_DISTANCE: |
| 4 | + - 'cut' |
| 5 | + |
| 6 | +OFF_DISTANCE: |
| 7 | + - 'off' |
| 8 | + |
| 9 | +EXCLUDE_INFO: |
| 10 | + - 'dinfo' |
| 11 | + |
| 12 | +SCALE_1X_TYPE: real3_const_array,1 |
| 13 | + |
| 14 | +EXTRA_PARAMS: | |
| 15 | + , real (*restrict polscale)[9] |
| 16 | + , const real* restrict kpep, const real* restrict prepep |
| 17 | + , const real* restrict dmppep, const int* restrict lpep |
| 18 | + , ExpolScr scrtyp |
| 19 | +
|
| 20 | +I_POSITION: |
| 21 | + - def: shared real xi from:x |
| 22 | + - def: shared real yi from:y |
| 23 | + - def: shared real zi from:z |
| 24 | +K_POSITION: |
| 25 | + - def: register real xk from:x |
| 26 | + - def: register real yk from:y |
| 27 | + - def: register real zk from:z |
| 28 | + |
| 29 | +I_FORCE: |
| 30 | + - def: shared real psci00 addto:polscale,0 |
| 31 | + - def: shared real psci01 addto:polscale,1 |
| 32 | + - def: shared real psci02 addto:polscale,2 |
| 33 | + - def: shared real psci10 addto:polscale,3 |
| 34 | + - def: shared real psci11 addto:polscale,4 |
| 35 | + - def: shared real psci12 addto:polscale,5 |
| 36 | + - def: shared real psci20 addto:polscale,6 |
| 37 | + - def: shared real psci21 addto:polscale,7 |
| 38 | + - def: shared real psci22 addto:polscale,8 |
| 39 | +K_FORCE: |
| 40 | + - def: register real psck00 addto:polscale,0 |
| 41 | + - def: register real psck01 addto:polscale,1 |
| 42 | + - def: register real psck02 addto:polscale,2 |
| 43 | + - def: register real psck10 addto:polscale,3 |
| 44 | + - def: register real psck11 addto:polscale,4 |
| 45 | + - def: register real psck12 addto:polscale,5 |
| 46 | + - def: register real psck20 addto:polscale,6 |
| 47 | + - def: register real psck21 addto:polscale,7 |
| 48 | + - def: register real psck22 addto:polscale,8 |
| 49 | + |
| 50 | +I_VARIABLES: |
| 51 | + - def: shared real springi from:kpep |
| 52 | + - def: shared real sizi from:prepep |
| 53 | + - def: shared real alphai from:dmppep |
| 54 | + - def: shared int epli from:lpep |
| 55 | +K_VARIABLES: |
| 56 | + - def: register real springk from:kpep |
| 57 | + - def: register real sizk from:prepep |
| 58 | + - def: register real alphak from:dmppep |
| 59 | + - def: register int eplk from:lpep |
| 60 | + |
| 61 | +FULL_PAIRWISE_INTERACTION: | |
| 62 | + real xr = xk - @xi@; |
| 63 | + real yr = yk - @yi@; |
| 64 | + real zr = zk - @zi@; |
| 65 | + real r2 = image2(xr, yr, zr); |
| 66 | + if ((eplk or @epli@) and r2 <= off * off and incl) { |
| 67 | + real r = REAL_SQRT(r2); |
| 68 | + real ks2i[3][3], ks2k[3][3]; |
| 69 | + pair_alterpol(scrtyp, r, scaleb, cut, off, xr, yr, zr, @springi@, @sizi@, @alphai@, |
| 70 | + springk, sizk, alphak, ks2i, ks2k); |
| 71 | + @psci00@ += ks2i[0][0]; |
| 72 | + @psci01@ += ks2i[0][1]; |
| 73 | + @psci02@ += ks2i[0][2]; |
| 74 | + @psci10@ += ks2i[1][0]; |
| 75 | + @psci11@ += ks2i[1][1]; |
| 76 | + @psci12@ += ks2i[1][2]; |
| 77 | + @psci20@ += ks2i[2][0]; |
| 78 | + @psci21@ += ks2i[2][1]; |
| 79 | + @psci22@ += ks2i[2][2]; |
| 80 | + psck00 += ks2k[0][0]; |
| 81 | + psck01 += ks2k[0][1]; |
| 82 | + psck02 += ks2k[0][2]; |
| 83 | + psck10 += ks2k[1][0]; |
| 84 | + psck11 += ks2k[1][1]; |
| 85 | + psck12 += ks2k[1][2]; |
| 86 | + psck20 += ks2k[2][0]; |
| 87 | + psck21 += ks2k[2][1]; |
| 88 | + psck22 += ks2k[2][2]; |
| 89 | + } |
0 commit comments