Compute the distinguisher between odd and even number of stencils.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I_P), | intent(in) | :: | S | Number of stencils used. |
Distinguishing between odd and even number of stencils.
pure function weno_odd(S) result(w_odd)
!< Compute the distinguisher between odd and even number of stencils.
integer(I_P), intent(in) :: S !< Number of stencils used.
integer(I_P) :: w_odd !< Distinguishing between odd and even number of stencils.
w_odd = int(mod(S, 2_I_P), I_P)
endfunction weno_odd