MODULE Generic_EvalGamma ! ---- Given the passive scalar ! ---- this returns the local value of ! ---- the gas constant gamma INTERFACE GetGamma MODULE PROCEDURE EvalGamma_point MODULE PROCEDURE EvalGamma_line MODULE PROCEDURE EvalGamma_area MODULE PROCEDURE EvalGamma_volume END INTERFACE CONTAINS SUBROUTINE EvalGamma_point(ux,vx,gamma) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms use cles_interfaces ! ---- IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: ux(ncomps) DOUBLE PRECISION, INTENT(IN) :: vx(nvars) DOUBLE PRECISION, INTENT(OUT) :: gamma DOUBLE PRECISION :: tmp, mu(1) call cles_roe(ux, ux, ncomps, vx, vx, nvars, gamma, tmp, mu, 0) END SUBROUTINE EvalGamma_point SUBROUTINE EvalGamma_line(ux, vx, gamma) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms use cles_interfaces ! ---- IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: ux(ncomps,ixlo:ixhi) DOUBLE PRECISION, INTENT(IN) :: vx(nvars,ixlo:ixhi) DOUBLE PRECISION, INTENT(OUT) :: gamma(ixlo:ixhi) DOUBLE PRECISION :: tmp, mu(1) INTEGER :: i do i=ixlo,ixhi call cles_roe(ux(1,i), ux(1,i), ncomps, vx(1,i), vx(1,i), & nvars, gamma(i), tmp, mu, 0) enddo END SUBROUTINE EvalGamma_line SUBROUTINE EvalGamma_area(ux, vx, gamma) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms use cles_interfaces ! ---- IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: ux(ncomps,ixlo:ixhi,iylo:iyhi) DOUBLE PRECISION, INTENT(IN) :: vx(nvars,ixlo:ixhi,iylo:iyhi) DOUBLE PRECISION, INTENT(OUT) :: gamma(ixlo:ixhi,iylo:iyhi) DOUBLE PRECISION :: tmp, mu(1) INTEGER :: i, j do j=iylo,iyhi do i=ixlo,ixhi call cles_roe(ux(1,i,j), ux(1,i,j), ncomps, vx(1,i,j), vx(1,i,j), & nvars, gamma(i,j), tmp, mu, 0) enddo enddo END SUBROUTINE EvalGamma_area SUBROUTINE EvalGamma_volume(ux, vx, gamma) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms use cles_interfaces ! ---- IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: ux(ncomps,ixlo:ixhi,iylo:iyhi,izlo:izhi) DOUBLE PRECISION, INTENT(IN) :: vx(nvars,ixlo:ixhi,iylo:iyhi,izlo:izhi) DOUBLE PRECISION, INTENT(OUT) :: gamma(ixlo:ixhi,iylo:iyhi,izlo:izhi) DOUBLE PRECISION :: tmp, mu(1) INTEGER :: i, j, k call cleslog_log_enter('EvalGamma_volume') do k=izlo,izhi do j=iylo,iyhi do i=ixlo,ixhi call cles_roe(ux(1,i,j,k), ux(1,i,j,k), ncomps, & vx(1,i,j,k), vx(1,i,j,k), nvars, gamma(i,j,k), tmp, mu, 0) enddo enddo enddo call cleslog_log_exit('EvalGamma_volume') END SUBROUTINE EvalGamma_volume END MODULE Generic_EvalGamma