MODULE Generic_FluxG ! Given the values of the conserved variables (ux) ! this returns the flux vector (fx) G for the 3D euler eqns INTERFACE GetFluxG MODULE PROCEDURE FluxG_point MODULE PROCEDURE FluxG_line MODULE PROCEDURE FluxG_area MODULE PROCEDURE FluxG_volume END INTERFACE CONTAINS SUBROUTINE FluxG_point(ux,vx,fx) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms ! ---- Shared Procedures IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: ux(ncomps) DOUBLE PRECISION, INTENT(IN) :: vx(nvars) DOUBLE PRECISION, INTENT(OUT) :: fx(nvars) ! ---- fx_1 = rho V fx(1) = ux(3) ! ---- fx_2 = rho U V fx(2) = ux(2)*vx(3) ! ---- fx_3 = rho V**2 + P fx(3) = ux(3)*vx(3) + vx(5) ! ---- fx_4 = rho V W fx(4) = ux(3) * vx(4) ! ---- fx_4 = (E + P) V fx(5) = ( ux(5) + vx(5) ) * vx(3) ! ---- fx_(6:nvars) = rho V Scalar_s fx(6:nvars)=ux(3)*vx(6:nvars) END SUBROUTINE FluxG_point SUBROUTINE FluxG_line(ux,vx,fx) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms ! ---- Shared Procedures IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: ux(ncomps,ixlo:ixhi) DOUBLE PRECISION, INTENT(IN) :: vx(nvars,ixlo:ixhi) DOUBLE PRECISION, INTENT(OUT) :: fx(nvars,ixlo:ixhi) INTEGER :: i ! ---- fx_1 = rho V fx(1,:) = ux(3,:) ! ---- fx_2 = rho U V fx(2,:) = ux(2,:)*vx(3,:) ! ---- fx_3 = rho V**2 + P fx(3,:) = ux(3,:)*vx(3,:) + vx(5,:) ! ---- fx_4 = rho V W fx(4,:) = ux(3,:) * vx(4,:) ! ---- fx_4 = (E + P) V fx(5,:) = ( ux(5,:) + vx(5,:) ) * vx(3,:) ! ---- fx_(6:nvars) = rho V Scalar_s DO i=6,nvars fx(i,:)=ux(3,:)*vx(i,:) END DO END SUBROUTINE FluxG_line SUBROUTINE FluxG_area(ux,vx,fx) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms ! ---- Shared Procedures 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) :: fx(nvars,ixlo:ixhi,iylo:iyhi) INTEGER :: i ! ---- fx_1 = rho V fx(1,:,:) = ux(3,:,:) ! ---- fx_2 = rho U V fx(2,:,:) = ux(2,:,:)*vx(3,:,:) ! ---- fx_3 = rho V**2 + P fx(3,:,:) = ux(3,:,:)*vx(3,:,:) + vx(5,:,:) ! ---- fx_4 = rho V W fx(4,:,:) = ux(3,:,:) * vx(4,:,:) ! ---- fx_4 = (E + P) V fx(5,:,:) = ( ux(5,:,:) + vx(5,:,:) ) * vx(3,:,:) ! ---- fx_(6:nvars) = rho V Scalar_s DO i=6,nvars fx(i,:,:)=ux(3,:,:)*vx(i,:,:) END DO END SUBROUTINE FluxG_area SUBROUTINE FluxG_volume(ux,vx,fx) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms ! ---- Shared Procedures 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) :: fx(nvars,ixlo:ixhi,iylo:iyhi,izlo:izhi) INTEGER :: i call cleslog_log_enter('FluxG_volume') ! ---- fx_1 = rho V fx(1,:,:,:) = ux(3,:,:,:) ! ---- fx_2 = rho U V fx(2,:,:,:) = ux(2,:,:,:)*vx(3,:,:,:) ! ---- fx_3 = rho V**2 + P fx(3,:,:,:) = ux(3,:,:,:)*vx(3,:,:,:) + vx(5,:,:,:) ! ---- fx_4 = rho V W fx(4,:,:,:) = ux(3,:,:,:) * vx(4,:,:,:) ! ---- fx_4 = (E + P) V fx(5,:,:,:) = ( ux(5,:,:,:) + vx(5,:,:,:) ) * vx(3,:,:,:) ! ---- fx_(6:nvars) = rho V Scalar_s DO i=6,nvars fx(i,:,:,:)=ux(3,:,:,:)*vx(i,:,:,:) END DO call cleslog_log_exit('FluxG_volume') END SUBROUTINE FluxG_volume END MODULE Generic_FluxG