Compute smoothness indicators.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(smoothness_indicators_js), | intent(inout) | :: | self | Smoothness indicator. |
||
integer(kind=I_P), | intent(in) | :: | S | Number of stencils actually used. |
||
real(kind=R_P), | intent(in) | :: | stencil(1:,1-S:) | Stencil used for the interpolation, [1:2, 1-S:-1+S]. |
||
integer(kind=I_P), | intent(in) | :: | f1 | Faces to be computed. |
||
integer(kind=I_P), | intent(in) | :: | f2 | Faces to be computed. |
||
integer(kind=I_P), | intent(in) | :: | ff | Faces to be computed. |
pure subroutine compute(self, S, stencil, f1, f2, ff)
!< Compute smoothness indicators.
class(smoothness_indicators_js), intent(inout) :: self !< Smoothness indicator.
integer(I_P), intent(in) :: S !< Number of stencils actually used.
real(R_P), intent(in) :: stencil(1:, 1 - S:) !< Stencil used for the interpolation, [1:2, 1-S:-1+S].
integer(I_P), intent(in) :: f1, f2, ff !< Faces to be computed.
integer(I_P) :: s1, s2, s3, f !< Counters
do s1=0, S - 1 ! stencils loop
do f=f1, f2 ! 1 => left interface (i-1/2), 2 => right interface (i+1/2)
self%si(f, s1) = 0._R_P
do s2=0, S - 1
do s3=0, S - 1
self%si(f, s1) = self%si(f, s1) + self%coef(s3, s2, s1) * stencil(f + ff, s1 - s3) * stencil(f + ff, s1 - s2)
enddo
enddo
enddo
enddo
endsubroutine compute