Convert from fractional to Cartesian coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | frac(3) | |||
real(kind=dp), | intent(out) | :: | cart(3) | |||
real(kind=dp), | intent(in) | :: | real_lat(3,3) |
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