FIXME : Add documentation
Relies upon is_global to determine species. This function only takes one argument so that it can be passed as an argument to genquad
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | v |
real function eval_f0(v)
use constants, only: pi
use mp, only: mp_abort
implicit none
real, intent(in):: v
real::dummy1, dummy2
eval_f0 = 0.0 !Set a default, avoids warnings about maybe unset
if (is_global <= 0) call mp_abort("is_global not specified when calling eval_f0")
select case(spec(is_global)%f0type)
case (f0_maxwellian)
eval_f0 = exp(-v**2) / pi**1.5
case (f0_sdanalytic)
call eval_f0_sdanalytic(is_global, v, eval_f0, dummy1, dummy2)
case (f0_tabulated)
call mp_abort("ERROR: eval_f0 cannot yet handle tabulated option.")
end select
end function eval_f0