MODULE Generic_Source ! This uses weno_source to create the ! source term INTERFACE AddSource MODULE PROCEDURE AddSource_line MODULE PROCEDURE AddSource_area MODULE PROCEDURE AddSource_volume END INTERFACE CONTAINS SUBROUTINE AddSource_line(ux,vx,rhs) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: ux(ncomps,ixlo:ixhi) DOUBLE PRECISION, INTENT(IN) :: vx(nvars,ixlo:ixhi) DOUBLE PRECISION, INTENT(INOUT) :: rhs(nvars,1:nx) DOUBLE PRECISION :: work(ixlo:ixhi) CALL cles_source(ux,vx,work,ncomps,ixhi,ixlo,rhs,nvars,nx,dx) RETURN END SUBROUTINE AddSource_line SUBROUTINE AddSource_area(ux,vx,rhs) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms 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(INOUT) :: rhs(nvars,nx,ny) DOUBLE PRECISION :: work(ixlo:ixhi,iylo:iyhi) CALL cles_source(ux,vx,work,ncomps,ixhi,ixlo,iyhi,iylo,& rhs,nvars,nx,ny,dx,dy) RETURN END SUBROUTINE AddSource_area SUBROUTINE AddSource_volume(ux,vx,rhs) ! ---- Shared Variables USE mesh USE array_bounds USE method_parms 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(INOUT) :: rhs(nvars,nx,ny,nz) DOUBLE PRECISION :: work(ixlo:ixhi,iylo:iyhi,izlo:izhi) CALL cles_source(ux,vx,work,ncomps,ixhi,ixlo,iyhi,iylo,izhi,izlo, & rhs,nvars,nx,ny,nz,dx,dy,dz) RETURN END SUBROUTINE AddSource_volume END MODULE Generic_Source