Last active
August 29, 2015 14:14
-
-
Save goyalankit/ccac1625033b6c33c71c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBROUTINE source(it,jt,kt,isct,nm,Src,Srcx,Sigs,Flux,Pflux) | |
IMPLICIT NONE | |
INTEGER :: it, jt, kt, isct, nm | |
DOUBLE PRECISION, DIMENSION(it,jt,kt) :: Srcx | |
DOUBLE PRECISION, DIMENSION(it,jt,kt,isct + 1) :: Sigs | |
DOUBLE PRECISION, DIMENSION(it,jt,kt,nm) :: Flux | |
DOUBLE PRECISION, DIMENSION(it,jt,kt,nm) :: Src | |
DOUBLE PRECISION, DIMENSION(it,jt,kt) :: Pflux | |
INTEGER :: i, j, k | |
IF (isct .EQ. 0) THEN | |
DO k = 1, kt | |
DO j = 1, jt | |
DO i = 1, it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subroutine source(it,jt,kt,isct,nm, Src,Srcx,Sigs,Flux,Pflux) | |
c | |
c Compute source from external source plus scattering moments | |
c | |
implicit none | |
integer it,jt,kt,isct,nm | |
double precision Srcx(it,jt,kt) | |
double precision Sigs(it,jt,kt,isct+1) | |
double precision Flux(it,jt,kt,nm) | |
double precision Src(it,jt,kt,nm) | |
double precision Pflux(it,jt,kt) | |
integer i,j,k | |
if (isct.eq.0) then | |
do k = 1, kt | |
do j = 1, jt | |
do i = 1, it | |
Src(i,j,k,1) = Srcx(i,j,k) | |
$ + Sigs(i,j,k,1)*Flux(i,j,k,1) | |
Pflux(i,j,k) = Flux(i,j,k,1) | |
Flux(i,j,k,1) = 0.0d+00 | |
end do | |
end do | |
end do | |
else | |
do k = 1, kt | |
do j = 1, jt | |
do i = 1, it | |
Src(i,j,k,1) = Srcx(i,j,k) | |
$ + Sigs(i,j,k,1)*Flux(i,j,k,1) | |
Src(i,j,k,2) = Sigs(i,j,k,2)*Flux(i,j,k,2) | |
Src(i,j,k,3) = Sigs(i,j,k,2)*Flux(i,j,k,3) | |
Src(i,j,k,4) = Sigs(i,j,k,2)*Flux(i,j,k,4) | |
Pflux(i,j,k) = Flux(i,j,k,1) | |
Flux(i,j,k,1) = 0.0d+00 | |
Flux(i,j,k,2) = 0.0d+00 | |
Flux(i,j,k,3) = 0.0d+00 | |
Flux(i,j,k,4) = 0.0d+00 | |
end do | |
end do | |
end do | |
endif | |
return | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment