If use_ws_distance = true, get list of all R vectors that appear in irdist_ws and write them to irvec_pw90. Set the index map ir_ind_ws_to_pw90
If use_ws_distance = false, copy irvec to irvec_pw90.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ws_distance_type), | intent(inout) | :: | ws_distance | |||
| type(ws_region_type), | intent(in) | :: | ws_region | |||
| type(wigner_seitz_type), | intent(inout) | :: | wigner_seitz | |||
| integer, | intent(in) | :: | num_wann | |||
| real(kind=dp), | intent(in) | :: | real_lattice(3,3) | |||
| integer, | intent(in) | :: | nrpts | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
subroutine wigner_seitz_opt_setup(ws_distance, ws_region, wigner_seitz, num_wann, real_lattice, & nrpts, error, comm) !========================================================================== ! !! If use_ws_distance = true, get list of all R vectors that appear in !! irdist_ws and write them to irvec_pw90. Set the index map ir_ind_ws_to_pw90 !! !! If use_ws_distance = false, copy irvec to irvec_pw90. ! !========================================================================== use w90_constants, only: dp use w90_types, only: ws_region_type, ws_distance_type use w90_comms, only: w90_comm_type use w90_postw90_types, only: wigner_seitz_type use w90_ws_distance, only: ws_expand_rvec implicit none type(ws_distance_type), intent(inout) :: ws_distance type(ws_region_type), intent(in) :: ws_region type(wigner_seitz_type), intent(inout) :: wigner_seitz type(w90_error_type), allocatable, intent(out) :: error type(w90_comm_type), intent(in) :: comm real(kind=dp), intent(in) :: real_lattice(3, 3) integer, intent(in) :: num_wann integer, intent(in) :: nrpts integer :: ir, ierr, ir_origin call ws_expand_rvec(ws_distance, ws_region%use_ws_distance, num_wann, nrpts, & wigner_seitz%irvec, wigner_seitz%ndegen, wigner_seitz%irvec_pw90, & wigner_seitz%nrpts_pw90, wigner_seitz%ir_ind_ws_to_pw90, ir_origin, & error, comm) if (allocated(error)) return allocate (wigner_seitz%crvec_pw90(3, wigner_seitz%nrpts_pw90), stat=ierr) if (ierr /= 0) then call set_error_alloc(error, 'Error in allocating crvec_pw90 in wigner_seitz_opt_setup', comm) return end if do ir = 1, wigner_seitz%nrpts_pw90 wigner_seitz%crvec_pw90(:, ir) = matmul(transpose(real_lattice), & real(wigner_seitz%irvec_pw90(:, ir), dp)) end do end subroutine wigner_seitz_opt_setup