get_amp_ind Function

private function get_amp_ind(this, ind) result(amp)

Type Bound

cc_amplitude

Arguments

Type IntentOptional Attributes Name
class(cc_amplitude) :: this
integer, intent(in) :: ind

Return Value real(kind=dp)


Contents

Source Code


Source Code

    function get_amp_ind(this, ind) result(amp)
        ! write an amplitude getter, which gives 0 if the index does not
        ! fit
        class(cc_amplitude) :: this
        integer, intent(in) :: ind
        real(dp) :: amp

        if (ind == 0) then
            amp = 0.0_dp
        else
            amp = this%amplitudes(ind)
        end if

    end function get_amp_ind