nnps_pairs_type Derived Type

type, public :: nnps_pairs_type

交互粒子对


Contents

Source Code


Components

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(:)

接触控制类型


Type-Bound Procedures

procedure, public, :: calc

  • private subroutine calc(self, itype)

    计算 dW/dX

    Arguments

    Type IntentOptional Attributes Name
    class(nnps_pairs_type), intent(inout) :: self
    integer, intent(in) :: itype(:)

    粒子类型

procedure, public, :: init

  • private subroutine init(self, n)

    初始化内存空间

    Arguments

    Type IntentOptional Attributes Name
    class(nnps_pairs_type), intent(inout) :: self
    integer, intent(in) :: n

    粒子对容量

procedure, private :: extend

  • private subroutine extend(self, len)

    拓展内存空间,

    Arguments

    Type IntentOptional Attributes Name
    class(nnps_pairs_type), intent(inout) :: self
    integer, intent(in) :: len

    粒子对容量

Source Code

    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