计算 dW/dX
接触控制
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nnps_pairs_type), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | itype(:) |
粒子类型 |
subroutine calc(self, itype)
class(nnps_pairs_type), intent(inout) :: self
integer, intent(in) :: itype(:) !! 粒子类型
integer :: i, ix
call self%extend(size(self%items)/2)
!$omp parallel do private(i, ix)
do i = 1, self%len
ix = 3*i
call skf_obj%kernel(self%rdx(ix - 2), self%rdx(ix - 1:ix), &
self%wdwdx(1, i), self%wdwdx(2:3, i))
ix = 2*i
self%contact_type(i) = contact_control(itype, self%items(ix - 1), self%items(ix))
end do
end subroutine calc