spx_math Module

数学模块


Uses


Contents


Variables

Type Visibility Attributes Name Initial
real(kind=rk), public, parameter :: sqrt_eps = sqrt(epsilon(0.0_rk))

sqrt(epsilon)

real(kind=rk), public, parameter :: r13 = 1.0_rk/3.0_rk
real(kind=rk), public, parameter :: r23 = 2.0_rk/3.0_rk
integer, public, parameter :: dim = 3

3 dimension

integer, private, parameter :: dim = 2

2 dimension


Subroutines

public pure subroutine get_distance(x, y, d, r)

粒子之间的距离 (distance)

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(2) :: x

两点坐标

real(kind=rk), intent(in), dimension(2) :: y

两点坐标

real(kind=rk), intent(out), dimension(2) :: d

坐标轴距离

real(kind=rk), intent(out) :: r

欧式距离