g1_box Function

public pure function g1_box(r) result(val)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: r

Distance from filter center

Return Value real(kind=wp)

Result


Source Code

    pure function g1_box(r) result(val)
      ! Box filter/
      implicit none
      real(wp), intent(in) :: r                                                !! Distance from filter center
      real(wp)             :: val                                              !! Result

      if ( (abs(r).le. 1.0_WP)) then
        val=0.5_wp
      else
        val=0.0_WP
      end if

      return
    end function g1_box