utility_recip_lattice Subroutine

public subroutine utility_recip_lattice(real_lat, recip_lat, volume, error, comm)

Uses

  • proc~~utility_recip_lattice~~UsesGraph proc~utility_recip_lattice utility_recip_lattice module~w90_constants w90_constants proc~utility_recip_lattice->module~w90_constants module~w90_error w90_error proc~utility_recip_lattice->module~w90_error module~w90_comms w90_comms module~w90_error->module~w90_comms module~w90_error_base w90_error_base module~w90_error->module~w90_error_base module~w90_comms->module~w90_constants module~w90_comms->module~w90_error_base

Calculates the reciprical lattice vectors and the cell volume Includes a check that the volume isn't almost 0 Use the first time the lattice is read to check its sensible

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: real_lat(3,3)
real(kind=dp), intent(out) :: recip_lat(3,3)
real(kind=dp), intent(out) :: volume
type(w90_error_type), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~utility_recip_lattice~~CallsGraph proc~utility_recip_lattice utility_recip_lattice proc~set_error_fatal set_error_fatal proc~utility_recip_lattice->proc~set_error_fatal proc~utility_recip_lattice_base utility_recip_lattice_base proc~utility_recip_lattice->proc~utility_recip_lattice_base proc~comms_sync_error comms_sync_error proc~set_error_fatal->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_fatal->proc~set_base_error proc~utility_inv3 utility_inv3 proc~utility_recip_lattice_base->proc~utility_inv3

Called by

proc~~utility_recip_lattice~~CalledByGraph proc~utility_recip_lattice utility_recip_lattice proc~k_slice k_slice proc~k_slice->proc~utility_recip_lattice proc~kmesh_get kmesh_get proc~kmesh_get->proc~utility_recip_lattice proc~w90_postw90_readwrite_read w90_postw90_readwrite_read proc~w90_postw90_readwrite_read->proc~utility_recip_lattice proc~w90_postw90_readwrite_readall w90_postw90_readwrite_readall proc~w90_postw90_readwrite_readall->proc~utility_recip_lattice proc~w90_readwrite_read_chkpt_header w90_readwrite_read_chkpt_header proc~w90_readwrite_read_chkpt_header->proc~utility_recip_lattice proc~w90_create_kmesh w90_create_kmesh proc~w90_create_kmesh->proc~kmesh_get proc~w90_readwrite_read_chkpt w90_readwrite_read_chkpt proc~w90_readwrite_read_chkpt->proc~w90_readwrite_read_chkpt_header program~postw90 postw90 program~postw90->proc~k_slice program~postw90->proc~kmesh_get program~postw90->proc~w90_postw90_readwrite_read program~postw90->proc~w90_readwrite_read_chkpt proc~read_chkpt read_chkpt proc~read_chkpt->proc~w90_readwrite_read_chkpt proc~w90_get_gkpb~2 w90_get_gkpb proc~w90_get_gkpb~2->proc~w90_create_kmesh proc~w90_get_nnkp~2 w90_get_nnkp proc~w90_get_nnkp~2->proc~w90_create_kmesh proc~w90_get_nn~2 w90_get_nn proc~w90_get_nn~2->proc~w90_create_kmesh proc~write_kmesh write_kmesh proc~write_kmesh->proc~w90_create_kmesh proc~w90_get_gkpb w90_get_gkpb proc~w90_get_gkpb->proc~w90_get_gkpb~2 proc~w90_get_nn w90_get_nn proc~w90_get_nn->proc~w90_get_nn~2 proc~w90_get_nnkp w90_get_nnkp proc~w90_get_nnkp->proc~w90_get_nnkp~2 program~wannier wannier program~wannier->proc~read_chkpt program~wannier->proc~w90_get_nn~2 program~wannier->proc~write_kmesh

Source Code

  subroutine utility_recip_lattice(real_lat, recip_lat, volume, error, comm)
    !================================================!
    !
    !!  Calculates the reciprical lattice vectors and the cell volume
    !!  Includes a check that the volume isn't almost 0
    !!  Use the first time the lattice is read to check its sensible
    !
    !================================================

    use w90_constants, only: dp, eps5
    use w90_error, only: w90_error_type, set_error_fatal

    implicit none
    type(w90_error_type), allocatable :: error
    real(kind=dp), intent(in)  :: real_lat(3, 3)
    real(kind=dp), intent(out) :: recip_lat(3, 3)
    real(kind=dp), intent(out) :: volume
    type(w90_comm_type), intent(in) :: comm

    call utility_recip_lattice_base(real_lat, recip_lat, volume)

    if (abs(volume) < eps5) then
      call set_error_fatal(error, ' Found almost zero Volume in utility_recip_lattice', comm)
      return
    end if

    return

  end subroutine utility_recip_lattice