cross_product Function

public function cross_product(u, v) result(s)

Calculates the cross product of two vectors: uxv

Arguments

TypeIntentOptionalAttributesName
real(kind=Float64), intent(in), dimension(3):: u
real(kind=Float64), intent(in), dimension(3):: v

Return Value real(kind=Float64),dimension(3)


Called by

proc~~cross_product~~CalledByGraph proc~cross_product cross_product proc~gyro_step gyro_step proc~gyro_step->proc~cross_product proc~get_pgyro get_pgyro proc~get_pgyro->proc~cross_product proc~plane_basis plane_basis proc~plane_basis->proc~cross_product proc~gyro_radius gyro_radius proc~gyro_radius->proc~gyro_step proc~ndmc ndmc proc~ndmc->proc~gyro_step proc~read_npa read_npa proc~read_npa->proc~plane_basis proc~track_cylindrical track_cylindrical proc~track_cylindrical->proc~plane_basis proc~npa_weights npa_weights proc~npa_weights->proc~gyro_step proc~cfpd_f cfpd_f proc~cfpd_f->proc~gyro_step proc~cfpd_f->proc~get_pgyro proc~gyro_correction gyro_correction proc~gyro_correction->proc~gyro_step program~fidasim fidasim program~fidasim->proc~ndmc program~fidasim->proc~read_npa program~fidasim->proc~npa_weights program~fidasim->proc~cfpd_f proc~neutron_f neutron_f program~fidasim->proc~neutron_f proc~fida_f fida_f program~fidasim->proc~fida_f proc~neutron_mc neutron_mc program~fidasim->proc~neutron_mc proc~fida_mc fida_mc program~fidasim->proc~fida_mc proc~pfida_f pfida_f program~fidasim->proc~pfida_f proc~pfida_mc pfida_mc program~fidasim->proc~pfida_mc proc~fida_weights_mc fida_weights_mc program~fidasim->proc~fida_weights_mc proc~make_diagnostic_grids make_diagnostic_grids program~fidasim->proc~make_diagnostic_grids proc~neutron_f->proc~gyro_correction proc~fida_f->proc~gyro_correction proc~neutron_mc->proc~gyro_correction proc~fida_mc->proc~gyro_correction proc~pfida_f->proc~track_cylindrical proc~pfida_f->proc~gyro_correction proc~pfida_mc->proc~track_cylindrical proc~pfida_mc->proc~gyro_correction proc~fida_weights_mc->proc~gyro_correction proc~make_diagnostic_grids->proc~track_cylindrical

Contents

Source Code


Source Code

function cross_product(u, v) result(s)
    !+ Calculates the cross product of two vectors: `u`x`v`
    real(Float64), dimension(3), intent(in) :: u
    real(Float64), dimension(3), intent(in) :: v
    real(Float64), dimension(3)             :: s

    s(1) = u(2)*v(3) - u(3)*v(2)
    s(2) = u(3)*v(1) - u(1)*v(3)
    s(3) = u(1)*v(2) - u(2)*v(1)

end function cross_product