13 TYPE position_x[nAtoms],
14 TYPE position_y[nAtoms],
15 TYPE position_z[nAtoms],
18 TYPE delx, dely, delz, r2inv;
19 TYPE r6inv, potential, force, j_x, j_y, j_z;
20 TYPE i_x, i_y, i_z, fx, fy, fz;
24 loop_i :
for (i = 0; i <
nAtoms; i++){
33 jidx =
NL[i*maxNeighbors + j];
35 j_x = position_x[jidx];
36 j_y = position_y[jidx];
37 j_z = position_z[jidx];
42 r2inv = 1.0/( delx*delx + dely*dely + delz*delz );
44 r6inv = r2inv * r2inv * r2inv;
45 potential = r6inv*(
lj1*r6inv -
lj2);
47 force = r2inv*potential;
void md_kernel(TYPE force_x[nAtoms], TYPE force_y[nAtoms], TYPE force_z[nAtoms], TYPE position_x[nAtoms], TYPE position_y[nAtoms], TYPE position_z[nAtoms], int32_t NL[nAtoms *maxNeighbors])