Reads the flag for Gamma-only mode ("gamma_only")
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(settings_type), | intent(inout) | :: | settings | |||
| logical, | intent(inout) | :: | gamma_only | |||
| integer, | intent(in) | :: | num_kpts | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
subroutine w90_readwrite_read_gamma_only(settings, gamma_only, num_kpts, error, comm) !! Reads the flag for Gamma-only mode ("gamma_only") use w90_error, only: w90_error_type, set_error_input implicit none integer, intent(in) :: num_kpts logical, intent(inout) :: gamma_only type(settings_type), intent(inout) :: settings type(w90_comm_type), intent(in) :: comm type(w90_error_type), allocatable, intent(out) :: error logical :: found, ltmp ltmp = .false. gamma_only = .false. call w90_readwrite_get_keyword(settings, 'gamma_only', found, error, comm, l_value=ltmp) if (allocated(error)) return if (found) gamma_only = ltmp if (gamma_only .and. (num_kpts .ne. 1)) then call set_error_input(error, 'Error: gamma_only is true, but num_kpts > 1', comm) return end if end subroutine w90_readwrite_read_gamma_only