uvw_to_cyl Subroutine

public subroutine uvw_to_cyl(uvw, cyl)

Convert machine coordinate uvw to cylindrical coordinate cyl

Arguments

Type IntentOptional AttributesName
real(kind=Float64), intent(in), dimension(3):: uvw
real(kind=Float64), intent(out), dimension(3):: cyl

Called by

proc~~uvw_to_cyl~~CalledByGraph proc~uvw_to_cyl uvw_to_cyl proc~in_passive_grid in_passive_grid proc~in_passive_grid->proc~uvw_to_cyl proc~xyz_to_cyl xyz_to_cyl proc~xyz_to_cyl->proc~uvw_to_cyl proc~grid_intersect grid_intersect proc~grid_intersect->proc~in_passive_grid proc~fida_weights_los fida_weights_los proc~fida_weights_los->proc~grid_intersect proc~circle_grid_intersect circle_grid_intersect proc~circle_grid_intersect->proc~grid_intersect proc~make_diagnostic_grids make_diagnostic_grids proc~make_diagnostic_grids->proc~grid_intersect proc~mc_nbi mc_nbi proc~mc_nbi->proc~grid_intersect proc~read_mc read_mc proc~read_mc->proc~circle_grid_intersect proc~ndmc ndmc proc~ndmc->proc~mc_nbi program~fidasim fidasim program~fidasim->proc~fida_weights_los program~fidasim->proc~make_diagnostic_grids program~fidasim->proc~ndmc proc~read_distribution read_distribution program~fidasim->proc~read_distribution proc~read_distribution->proc~read_mc

Contents

Source Code


Source Code

subroutine uvw_to_cyl(uvw, cyl)
    !+ Convert machine coordinate `uvw` to cylindrical coordinate `cyl`
    real(Float64), dimension(3), intent(in)  :: uvw
    real(Float64), dimension(3), intent(out) :: cyl

    cyl(1) = sqrt(uvw(1)*uvw(1) + uvw(2)*uvw(2))
    cyl(2) = uvw(3)
    cyl(3) = atan2(uvw(2),uvw(1))

end subroutine uvw_to_cyl