cross_product Function

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

Calculates the cross product of two vectors: uxv

Arguments

Type IntentOptional AttributesName
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~plane_basis plane_basis proc~plane_basis->proc~cross_product proc~gyro_correction gyro_correction proc~gyro_correction->proc~gyro_step proc~npa_weights npa_weights proc~npa_weights->proc~gyro_step proc~gyro_radius gyro_radius proc~gyro_radius->proc~gyro_step proc~read_npa read_npa proc~read_npa->proc~plane_basis proc~fida_weights_mc fida_weights_mc proc~fida_weights_mc->proc~gyro_correction proc~fida_f fida_f proc~fida_f->proc~gyro_correction proc~neutron_mc neutron_mc proc~neutron_mc->proc~gyro_correction program~fidasim fidasim program~fidasim->proc~npa_weights program~fidasim->proc~read_npa program~fidasim->proc~fida_weights_mc program~fidasim->proc~fida_f program~fidasim->proc~neutron_mc proc~neutron_f neutron_f program~fidasim->proc~neutron_f proc~fida_mc fida_mc program~fidasim->proc~fida_mc proc~neutron_f->proc~gyro_correction proc~fida_mc->proc~gyro_correction

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