从备份中恢复
| 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 |
pure subroutine restore_backup(particle, backup, istart, iend)
class(particle_type), intent(inout) :: particle !! particle
type(backup_type), intent(in) :: backup !! backup
integer, intent(in) :: istart, iend !! start and end index
particle%loc(:, istart:iend) = backup%loc
particle%vel(:, istart:iend) = backup%vel
particle%rho(istart:iend) = backup%rho
particle%p(istart:iend) = backup%p
end subroutine restore_backup