utility_frac_to_cart Subroutine

public subroutine utility_frac_to_cart(frac, cart, real_lat)

Convert from fractional to Cartesian coordinates

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in) :: frac(3)
real(kind=dp), intent(out) :: cart(3)
real(kind=dp), intent(in) :: real_lat(3,3)

Called by

proc~~utility_frac_to_cart~~CalledByGraph proc~utility_frac_to_cart utility_frac_to_cart proc~ws_translate_dist ws_translate_dist proc~ws_translate_dist->proc~utility_frac_to_cart proc~r_wz_sc R_wz_sc proc~r_wz_sc->proc~utility_frac_to_cart proc~utility_translate_home utility_translate_home proc~utility_translate_home->proc~utility_frac_to_cart proc~plot_interpolate_bands plot_interpolate_bands proc~plot_interpolate_bands->proc~ws_translate_dist

Contents

Source Code


Source Code

  subroutine utility_frac_to_cart(frac, cart, real_lat)
    !==================================================================!
    !                                                                  !
    !!  Convert from fractional to Cartesian coordinates
    !                                                                  !
    !===================================================================
    implicit none

    real(kind=dp), intent(in)  :: real_lat(3, 3)
    real(kind=dp), intent(in)  :: frac(3)
    real(kind=dp), intent(out) :: cart(3)

    integer :: i

    do i = 1, 3
      cart(i) = real_lat(1, i)*frac(1) + real_lat(2, i)*frac(2) + real_lat(3, i)*frac(3)
    end do

    return

  end subroutine utility_frac_to_cart