ORNL/CabanaPD

Revisions of force models

Closed this issue · 2 comments

We need to review the force models functions to ensure accuracy and consistence, including comments.

Comments for src/CabanaPD_Force.hpp:

Line 74: the function "getDistanceComponents" does not exactly get the distance components. What are the exact output? We may change the name to reflect the actual computation. (similar comment for Line 103)

Line 78: the comment "// Get the reference positions and displacements." does not seem accurate. We are using x and u to compute other quantities. (similar comment for Line 107)

Line 94: What is the output of "getDistance"? Does the name properly reflect that? (similar comment for Line 120)

Lines 108-115: Why we do not have "const double" for xi_x, xi_y, xi_z as in getDistanceComponents?

Line 132: Why the title "Force free functions"?

Line 144: Could you please remind me why do we need the atomic force? What does it mean?

Lines 149-152: Do we need these commented lines? (same for lines 181-184, 208-212, 241-244)

Line 161 (and 187): What does "Kokkos::fence();" do?

Line 192: For consistency we may add a comment "// Forces without bond breaking." before Line 134

Line 223: I was initially confused about the comment "// Energy and damage." because we only call the Energy function (which in fact is strain energy density, but that's OK), However, I then realized we ay also be computing phi in addition to W. So, that seems fine.

Duplication of #94 - add to the list whatever you see fit