get_position Subroutine

public subroutine get_position(ind, pos, input_coords)

Get position pos given indices ind

Arguments

TypeIntentOptionalAttributesName
integer(kind=Int32), intent(in), dimension(3):: ind

Indices

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

Position in beam_grid coordinates [cm]

integer, intent(in), optional :: input_coords

Indicates coordinate system of ind. Beam grid (0) and cylindrical (2)


Calls

proc~~get_position~~CallsGraph proc~get_position get_position proc~cyl_to_xyz cyl_to_xyz proc~get_position->proc~cyl_to_xyz proc~cyl_to_uvw cyl_to_uvw proc~cyl_to_xyz->proc~cyl_to_uvw proc~uvw_to_xyz uvw_to_xyz proc~cyl_to_xyz->proc~uvw_to_xyz

Called by

proc~~get_position~~CalledByGraph proc~get_position get_position proc~get_fields get_fields proc~get_fields->proc~get_position proc~get_distribution get_distribution proc~get_distribution->proc~get_position proc~get_plasma get_plasma proc~get_plasma->proc~get_position proc~get_ep_denf get_ep_denf proc~get_ep_denf->proc~get_position proc~mc_fastion_pass_grid mc_fastion_pass_grid proc~mc_fastion_pass_grid->proc~get_fields proc~mc_fastion_pass_grid->proc~get_distribution proc~pnpa_mc pnpa_mc proc~pnpa_mc->proc~get_fields proc~pnpa_mc->proc~get_plasma proc~attenuate attenuate proc~pnpa_mc->proc~attenuate proc~store_npa store_npa proc~pnpa_mc->proc~store_npa proc~dcx_spec dcx_spec proc~dcx_spec->proc~get_plasma proc~store_photons store_photons proc~dcx_spec->proc~store_photons proc~dcx dcx proc~dcx->proc~get_plasma proc~track track proc~dcx->proc~track proc~dcx->proc~store_photons proc~pnpa_f pnpa_f proc~pnpa_f->proc~get_plasma proc~pnpa_f->proc~mc_fastion_pass_grid proc~pnpa_f->proc~attenuate proc~pnpa_f->proc~store_npa proc~track->proc~get_fields proc~track->proc~get_plasma proc~pfida_mc pfida_mc proc~pfida_mc->proc~get_fields proc~pfida_mc->proc~get_plasma proc~track_cylindrical track_cylindrical proc~pfida_mc->proc~track_cylindrical proc~store_fida_photons store_fida_photons proc~pfida_mc->proc~store_fida_photons proc~npa_weights npa_weights proc~npa_weights->proc~get_fields proc~npa_weights->proc~get_ep_denf proc~npa_weights->proc~attenuate proc~attenuate->proc~get_plasma proc~halo_spec halo_spec proc~halo_spec->proc~get_plasma proc~halo_spec->proc~store_photons proc~store_fw_photons store_fw_photons proc~store_fw_photons->proc~get_fields proc~neutron_f neutron_f proc~neutron_f->proc~get_fields proc~neutron_f->proc~get_plasma proc~make_diagnostic_grids make_diagnostic_grids proc~make_diagnostic_grids->proc~get_fields proc~make_diagnostic_grids->proc~track proc~make_diagnostic_grids->proc~track_cylindrical proc~fida_f fida_f proc~fida_f->proc~get_plasma proc~fida_f->proc~track proc~mc_fastion mc_fastion proc~fida_f->proc~mc_fastion proc~fida_f->proc~store_fida_photons proc~cfpd_f cfpd_f proc~cfpd_f->proc~get_fields proc~cfpd_f->proc~get_plasma proc~cfpd_f->proc~get_ep_denf proc~track_cylindrical->proc~get_fields proc~track_cylindrical->proc~get_plasma proc~neutron_mc neutron_mc proc~neutron_mc->proc~get_fields proc~neutron_mc->proc~get_plasma proc~cold_spec cold_spec proc~cold_spec->proc~get_plasma proc~cold_spec->proc~store_photons proc~npa_f npa_f proc~npa_f->proc~get_plasma proc~npa_f->proc~attenuate proc~npa_f->proc~mc_fastion proc~npa_f->proc~store_npa proc~mc_fastion->proc~get_fields proc~mc_fastion->proc~get_distribution proc~fida_mc fida_mc proc~fida_mc->proc~get_fields proc~fida_mc->proc~get_plasma proc~fida_mc->proc~track proc~fida_mc->proc~store_fida_photons proc~pfida_f pfida_f proc~pfida_f->proc~get_plasma proc~pfida_f->proc~mc_fastion_pass_grid proc~pfida_f->proc~track_cylindrical proc~pfida_f->proc~store_fida_photons proc~store_npa->proc~get_fields proc~ndmc ndmc proc~ndmc->proc~get_fields proc~ndmc->proc~get_plasma proc~ndmc->proc~track proc~store_nbi_photons store_nbi_photons proc~ndmc->proc~store_nbi_photons proc~bremsstrahlung bremsstrahlung proc~bremsstrahlung->proc~get_plasma proc~store_photons->proc~get_fields proc~npa_mc npa_mc proc~npa_mc->proc~get_fields proc~npa_mc->proc~attenuate proc~npa_mc->proc~store_npa proc~fida_weights_mc fida_weights_mc proc~fida_weights_mc->proc~get_fields proc~fida_weights_mc->proc~get_plasma proc~fida_weights_mc->proc~get_ep_denf proc~fida_weights_mc->proc~track proc~fida_weights_mc->proc~store_fw_photons proc~halo halo proc~halo->proc~get_plasma proc~halo->proc~track proc~halo->proc~store_photons proc~fida_weights_los fida_weights_los proc~fida_weights_los->proc~get_fields proc~fida_weights_los->proc~get_plasma proc~fida_weights_los->proc~get_ep_denf proc~fida_weights_los->proc~track program~fidasim fidasim program~fidasim->proc~pnpa_mc program~fidasim->proc~dcx_spec program~fidasim->proc~dcx program~fidasim->proc~pnpa_f program~fidasim->proc~pfida_mc program~fidasim->proc~npa_weights program~fidasim->proc~halo_spec program~fidasim->proc~neutron_f program~fidasim->proc~make_diagnostic_grids program~fidasim->proc~fida_f program~fidasim->proc~cfpd_f program~fidasim->proc~neutron_mc program~fidasim->proc~cold_spec program~fidasim->proc~npa_f program~fidasim->proc~fida_mc program~fidasim->proc~pfida_f program~fidasim->proc~ndmc program~fidasim->proc~bremsstrahlung program~fidasim->proc~npa_mc program~fidasim->proc~fida_weights_mc program~fidasim->proc~halo program~fidasim->proc~fida_weights_los proc~nbi_spec nbi_spec program~fidasim->proc~nbi_spec proc~store_nbi_photons->proc~store_photons proc~store_fida_photons->proc~store_photons proc~nbi_spec->proc~store_photons

Contents

Source Code


Source Code

subroutine get_position(ind, pos, input_coords)
    !+ Get position `pos` given indices `ind`
    integer(Int32), dimension(3), intent(in) :: ind
        !+ Indices
    real(Float64), dimension(3), intent(out) :: pos
        !+ Position in [[libfida:beam_grid]] coordinates [cm]
    integer, intent(in), optional            :: input_coords
        !+ Indicates coordinate system of `ind`. Beam grid (0) and cylindrical (2)

    real(Float64), dimension(3) :: pos_temp1, pos_temp2
    integer :: ics, ocs

    if(present(input_coords)) then
        ics = input_coords
    else
        ics = 0
    endif

    if(ics.eq.0) then
        pos(1) = beam_grid%xc(ind(1))
        pos(2) = beam_grid%yc(ind(2))
        pos(3) = beam_grid%zc(ind(3))
    endif

    if(ics.eq.2) then
        pos_temp1(1) = inter_grid%r(ind(1))
        pos_temp1(2) = inter_grid%z(ind(2))
        pos_temp1(3) = inter_grid%phi(ind(3))
        call cyl_to_xyz(pos_temp1,pos)
    endif

end subroutine get_position