receipt のキーだけ value を読み戻す。found は表と同じ添字で、重複の検出に使う。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(in) | :: | value | |||
| type(matching_plane_stats), | intent(inout) | :: | receipt | |||
| logical, | intent(inout) | :: | found(matching_plane_summary_key_count) |
subroutine read_matching_plane_summary_key(key, value, receipt, found) character(len=*), intent(in) :: key, value type(matching_plane_stats), intent(inout) :: receipt logical, intent(inout) :: found(matching_plane_summary_key_count) integer :: k, ios, real_index real(dp) :: x, real_values(receipt_real_count) k = key_index(key) if (k == 0) return if (.not. receipt_keys(k)%restored) return if (receipt_keys(k)%unique) then if (found(k)) error stop 'Resume checkpoint summary contains duplicate matching-plane key: '//trim(key) end if found(k) = .true. select case (receipt_keys(k)%value_kind) case (value_logical) call read_matching_summary_logical(value, key, receipt%state_valid) case (value_integer) call read_matching_summary_integer(value, key, receipt%iterations) case (value_spectrum) read (value, *, iostat=ios) receipt%photoelectron_spectrum_m2_s if (ios /= 0) error stop 'Resume checkpoint matching-plane photoelectron spectrum could not be parsed.' case (value_real) call read_matching_summary_real(value, key, x) real_values = receipt_real_values(receipt) real_index = count(receipt_keys(:k)%value_kind == value_real) real_values(real_index) = x call restore_receipt_real_values(receipt, real_values) end select end subroutine read_matching_plane_summary_key