spx_smoothed_kernel_function Module

Smoothed kernel function
光滑核函数


Uses


Contents


Variables

Type Visibility Attributes Name Initial
type(smoothed_kernel_function_type), public :: skf_obj

光滑核函数对象


Abstract Interfaces

abstract interface

  • public pure subroutine kernel_fcn(skf, r, dx, w, dwdx)

    Kernel function
    光滑核函数

    Arguments

    Type IntentOptional Attributes Name
    class(smoothed_kernel_function_type), intent(in) :: skf

    Smoothed kernel function
    光滑核函数

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

    Euclidean distance between two points
    欧氏距离

    real(kind=rk), intent(in) :: dx(2)

    dimensional distance between two points
    对应坐标轴距离

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

    kernel value
    核函数

    real(kind=rk), intent(out) :: dwdx(2)

    derivative of kernel value
    核函数导数


Derived Types

type, public ::  smoothed_kernel_function_type

光滑核函数

Components

Type Visibility Attributes Name Initial
real(kind=rk), public :: selfden

粒子的自身物理量加权系数, 一般用于计算粒子密度

real(kind=rk), public :: hsml

光滑长度

integer, public :: scale = 2

光滑长度缩尺比例

real(kind=rk), public :: scale_hsml

缩尺后的光滑长度

character(len=:), public, allocatable :: type

光滑函数类型

procedure(kernel_fcn), public, pointer :: kernel => cubic_spline_kernel

光滑核函数句柄

real(kind=rk), private :: factor

核函数常量

Type-Bound Procedures

procedure , public , :: init Subroutine

Subroutines

public subroutine init(self)

建立光滑核函数句柄

Arguments

Type IntentOptional Attributes Name
class(smoothed_kernel_function_type), intent(inout) :: self

public pure subroutine cubic_spline_kernel(skf, r, dx, w, dwdx)

Smoothed kernel function: Cubic spline
三次样条曲线 (monaghan 1985)
计算光滑函数 Wij 及其导数 dWdxij 的子例程

Arguments

Type IntentOptional Attributes Name
class(smoothed_kernel_function_type), intent(in) :: skf
real(kind=rk), intent(in) :: r

Euclidean distance between two points
欧氏距离

real(kind=rk), intent(in) :: dx(2)

Dimensional distance between two points
对应坐标轴距离

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

kernel value
核函数值

real(kind=rk), intent(out) :: dwdx(2)

Derivative of kernel value
核函数导数

public pure subroutine quintic_spline_kernel(skf, r, dx, w, dwdx)

Smoothed kernel function: Quintic spline
四次样条曲线 (Liu 2010)

Arguments

Type IntentOptional Attributes Name
class(smoothed_kernel_function_type), intent(in) :: skf
real(kind=rk), intent(in) :: r

Euclidean distance between two points
欧氏距离

real(kind=rk), intent(in) :: dx(2)

Dimensional distance between two points
对应坐标轴距离

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

kernel value
核函数值

real(kind=rk), intent(out) :: dwdx(2)

Derivative of kernel value
核函数导数