交互粒子对
需要与 items 联系起来
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | len |
粒子对数量 |
|||
integer, | private | :: | cap |
向量容量 |
|||
integer, | public, | pointer | :: | items(:) |
粒子对的2个粒子序号的数组 [(i, j), ...] |
||
real(kind=rk), | public, | pointer | :: | rdx(:) |
r, dx(:) |
||
real(kind=rk), | public, | allocatable | :: | wdwdx(:,:) |
w, dwdx(:) |
||
integer, | public, | allocatable | :: | contact_type(:) |
接触控制类型 |
计算 dW/dX
接触控制
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nnps_pairs_type), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | itype(:) |
粒子类型 |
初始化内存空间
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nnps_pairs_type), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | n |
粒子对容量 |
拓展内存空间,
优化效率
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nnps_pairs_type), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | len |
粒子对容量 |
type nnps_pairs_type
integer :: len !! 粒子对数量
integer, private :: cap !! 向量容量
integer, pointer :: items(:) !! 粒子对的2个粒子序号的数组 [(i, j), ...]
real(rk), pointer :: rdx(:) !! r, dx(:)
real(rk), allocatable :: wdwdx(:, :) !! w, dwdx(:)
integer, allocatable :: contact_type(:) !! 接触控制类型
contains
procedure :: init, calc
procedure, private :: extend
end type nnps_pairs_type