• VTF
  • FSI
  • AMROC
  • SFC
  • Motion
  • STLIB
  • Main Page
  • src/generic/Generic_GetFlux.f90

    MODULE Generic_GetFlux
    
    
      ! ---- Given the values of conserved variables (ux) 
      ! ---- this calculates the flux vector (fx) 
    
    INTERFACE GetFlux
       MODULE PROCEDURE OneDGetFlux
       MODULE PROCEDURE TwoDGetFlux
       MODULE PROCEDURE ThreeDGetFlux
    END INTERFACE
    
    CONTAINS
    
      
      SUBROUTINE  OneDGetFlux(ux,vx,fx,direction)
        
        ! ----  Shared Variables
        USE mesh
        USE array_bounds
        USE method_parms
        
        ! ----  Shared Procedures
        USE Generic_FluxF
        USE Generic_FluxG
        USE Generic_FluxH
    
        IMPLICIT NONE
      
        DOUBLE PRECISION, INTENT(OUT) :: fx(nvars,ixlo:ixhi)
        DOUBLE PRECISION, INTENT(IN)  :: ux(ncomps,ixlo:ixhi)
        DOUBLE PRECISION, INTENT(IN)  :: vx(nvars,ixlo:ixhi)
    
        INTEGER, INTENT(IN) :: direction
    
        whichdirection: SELECT CASE(direction)
    
        CASE (1)
    
           ! ---- The Flux Term F ( to be differenced in the x-direction)  
           
           CALL GetFluxF(ux,vx,fx)
           
        CASE (2)
           
           ! ---- The Flux Term G ( to be differenced in the y-direction)  
           
           CALL GetFluxG(ux,vx,fx)
           
        CASE (3)
           
         ! ---- The Flux Term H ( to be differenced in the z-direction)  
           
           CALL GetFluxH(ux,vx,fx)
           
        END SELECT WHICHDIRECTION
           
      
      END SUBROUTINE OneDGetFlux
    
      
      SUBROUTINE  TwoDGetFlux(ux,vx,fx,direction)
    
        ! ----  Shared Variables
        USE mesh
        USE array_bounds
        USE method_parms
        
        ! ----  Shared Procedures
        USE Generic_FluxF
        USE Generic_FluxG
        USE Generic_FluxH
        
        IMPLICIT NONE
      
        DOUBLE PRECISION, INTENT(OUT) :: fx(nvars,ixlo:ixhi,iylo:iyhi)
        DOUBLE PRECISION, INTENT(IN)  :: ux(ncomps,ixlo:ixhi,iylo:iyhi) 
        DOUBLE PRECISION, INTENT(IN)  :: vx(nvars,ixlo:ixhi,iylo:iyhi) 
    
        INTEGER, INTENT(IN) :: direction
    
        whichdirection: SELECT CASE(direction)
    
        CASE (1)
    
           ! ---- The Flux Term F ( to be differenced in the x-direction)  
           
           CALL GetFluxF(ux,vx,fx)
           
        CASE (2)
           
           ! ---- The Flux Term G ( to be differenced in the y-direction)  
           
           CALL GetFluxG(ux,vx,fx)
           
        CASE (3)
           
           ! ---- The Flux Term H ( to be differenced in the z-direction)  
           
           CALL GetFluxH(ux,vx,fx)
           
        END SELECT WHICHDIRECTION
           
      
      END SUBROUTINE TwoDGetFlux
    
      
      SUBROUTINE  ThreeDGetFlux(ux,vx,fx,direction)
    
        ! ----  Shared Variables
        USE mesh
        USE array_bounds
        USE method_parms
        
        ! ----  Shared Procedures
        USE Generic_FluxF
        USE Generic_FluxG
        USE Generic_FluxH
    
        IMPLICIT NONE
      
        DOUBLE PRECISION, INTENT(OUT) :: fx(nvars,ixlo:ixhi,iylo:iyhi,izlo:izhi)
        DOUBLE PRECISION, INTENT(IN) ::  ux(ncomps,ixlo:ixhi,iylo:iyhi,izlo:izhi) 
        DOUBLE PRECISION, INTENT(IN) ::  vx(nvars,ixlo:ixhi,iylo:iyhi,izlo:izhi) 
    
        INTEGER, INTENT(IN) :: direction
    
        whichdirection: SELECT CASE(direction)
    
        CASE (1)
    
           ! ---- The Flux Term F ( to be differenced in the x-direction)  
           
           CALL GetFluxF(ux,vx,fx)
           
        CASE (2)
           
           ! ---- The Flux Term G ( to be differenced in the y-direction)  
           
           CALL GetFluxG(ux,vx,fx)
           
        CASE (3)
           
         ! ---- The Flux Term H ( to be differenced in the z-direction)  
           
           CALL GetFluxH(ux,vx,fx)
           
        END SELECT WHICHDIRECTION
           
      
      END SUBROUTINE ThreeDGetFlux
    
    END MODULE Generic_GetFlux
      
    
    
    
    
    
    
    

<