Integral of box filter from 0 to r.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | r |
Distance from filter center |
Result
pure function int_g1_box(r) result(val) !> Integral of box filter from 0 to r. implicit none real(wp), intent(in) :: r !! Distance from filter center real(wp) :: val !! Result ! Work variable real(wp) :: new_r new_r = min(max(r,-1.0_wp),1.0_wp) val=0.5_wp*new_r return end function int_g1_box