get_position Subroutine

public subroutine get_position(ind, pos)

Get position pos given beam_grid indices ind

Arguments

Type IntentOptional AttributesName
integer(kind=Int32), intent(in), dimension(3):: ind

beam_grid indices

real(kind=Float64), intent(out), dimension(3):: pos

Position [cm]


Contents

Source Code


Source Code

subroutine get_position(ind, pos)
    !+ Get position `pos` given [[libfida:beam_grid]] indices `ind`
    integer(Int32), dimension(3), intent(in) :: ind
        !+ [[libfida:beam_grid]] indices
    real(Float64), dimension(3), intent(out) :: pos
        !+ Position [cm]

    pos(1) = beam_grid%xc(ind(1))
    pos(2) = beam_grid%yc(ind(2))
    pos(3) = beam_grid%zc(ind(3))

end subroutine get_position