gen_init_vec_ftlm Subroutine

public subroutine gen_init_vec_ftlm()

Arguments

None

Contents

Source Code


Source Code

    subroutine gen_init_vec_ftlm()

        use dSFMT_interface, only: genrand_real2_dSFMT

        integer :: i
        real(dp) :: r, amp

        ! The magnitude of the amplitude required to make the initial vector normalised to 1.0.
        amp = 1 / sqrt(real(sum(ndets_ftlm), dp))

        do i = 1, ndets_ftlm(iProcIndex)
            r = genrand_real2_dSFMT()
            if (r > 0.5_dp) then
                ftlm_vecs(i, 1) = amp
            else
                ftlm_vecs(i, 1) = -amp
            end if
        end do

    end subroutine gen_init_vec_ftlm