HLLE Subroutine

subroutine HLLE(leftst, rigtst, nflux)

Uses

  • proc~~hlle~~UsesGraph proc~hlle HLLE module~fluxmod fluxmod proc~hlle->module~fluxmod module~basicmod basicmod module~fluxmod->module~basicmod module~config config module~basicmod->module~config

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in), dimension(2*mflx+madd) :: leftst
real(kind=8), intent(in), dimension(2*mflx+madd) :: rigtst
real(kind=8), intent(out), dimension(mflx) :: nflux

Source Code

      subroutine HLLE(leftst,rigtst,nflux)
!$acc routine seq
      use fluxmod
      implicit none
      real(8),dimension(2*mflx+madd),intent(in)::leftst,rigtst
      real(8),dimension(mflx),intent(out)::nflux
      real(8),dimension(mflx)::ul,ur,fl,fr
      real(8)::csl,csr
      real(8):: vl, vr
      real(8):: sl, sr

      ul(1:mflx) = leftst(1:mflx)
      fl(1:mflx) = leftst(mflx+1:2*mflx)
      ur(1:mflx) = rigtst(1:mflx)
      fr(1:mflx) = rigtst(mflx+1:2*mflx)
      csl=leftst(mcsp)
      csr=rigtst(mcsp)
       vl=leftst(mvel)
       vr=rigtst(mvel)

       sl = min(vl,vr) - max(csl,csr)
       sl = min(0.0d0,sl)
       sr = max(vl,vr) + max(csl,csr)
       sr = max(0.0d0,sr)

       nflux(:) = (sr*fl(:)-sl*fr(:) +sl*sr*(ur(:)-ul(:)))/(sr-sl)

      return
      end subroutine HLLE