粒子信息
使用数组作为存储结构, SoA (Structure of Array) 结构效率更高
纯粒子域,用于高速存储与计算
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public | :: | hsml |
光滑长度 |
|||
real(kind=rk), | public, | allocatable | :: | loc(:,:) |
位置, m |
||
real(kind=rk), | public, | allocatable | :: | vel(:,:) |
速度, m/s |
||
real(kind=rk), | public, | allocatable | :: | acc(:,:) |
加速度, m/s^2 |
||
real(kind=rk), | public, | allocatable | :: | mass(:) |
质量, kg |
||
real(kind=rk), | public, | allocatable | :: | rho(:) |
密度, kg/m^3 |
||
real(kind=rk), | public, | allocatable | :: | drho(:) |
密度变化率, kg/m^3/s |
||
real(kind=rk), | public, | allocatable | :: | u(:) |
内能密度 |
||
real(kind=rk), | public, | allocatable | :: | du(:) |
内能密度变化率 |
||
real(kind=rk), | public, | allocatable | :: | p(:) |
压强, Pa |
||
real(kind=rk), | public, | allocatable | :: | c(:) |
声速, m/s |
||
integer, | public, | allocatable | :: | itype(:) |
粒子类型 |
procedure , public , :: restore_backup Subroutine | |
procedure , public , :: create_backup Subroutine |
创建备份
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(particle_type), | intent(in) | :: | particle |
particle |
||
type(backup_type), | intent(out) | :: | backup |
backup |
||
integer, | intent(in) | :: | istart |
start and end index |
||
integer, | intent(in) | :: | iend |
start and end index |
从备份中恢复
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(particle_type), | intent(inout) | :: | particle |
particle |
||
type(backup_type), | intent(in) | :: | backup |
backup |
||
integer, | intent(in) | :: | istart |
start and end index |
||
integer, | intent(in) | :: | iend |
start and end index |