1 | include(dom.inc)
2 |
3 | SUBROUTINE EMISSIV(nfcelt, celldata, Lb, Lo, epsil, Tf, ncells, &
4 | & nfacemax, celld, cellf, bcell, bface, nbface, &
5 | & bfbeg, bfend)
6 |
7 | USE mod_pmm
8 |
9 | IMPLICIT NONE
10 |
11 | include 'dom_constants.h'
12 |
13 | ! IN
14 | DOM_INT :: ncells,nfacemax,nbface
15 | DOM_INT :: celld, cellf
16 | DOM_INT :: bfbeg, bfend
17 | DOM_INT, DIMENSION (ncells) :: nfcelt
18 | DOM_REAL, DIMENSION(8,ncells) :: celldata
19 | DOM_REAL, DIMENSION(nbface) :: epsil, Tf
20 | DOM_INT , DIMENSION(nbface) :: bcell, bface
21 |
22 | ! OUT
23 | DOM_REAL, DIMENSION(ncells) :: Lb
24 | DOM_REAL, DIMENSION(nfacemax,ncells) :: Lo
25 |
26 | ! LOCAL
27 | DOM_INT :: ielt,m, ibnd
28 | DOM_INT :: local_ncell
29 | DOM_INT :: ierr
30 | DOM_REAL :: planck
31 | DOM_REAL, DIMENSION(ncells) :: local_Lb
32 | DOM_REAL, DIMENSION(nfacemax,ncells) :: local_Lo
33 |
34 | Lo = 0.
35 | Lb = 0.
36 |
37 | ! -----------------------------!
38 | ! Initializing local cell data !
39 | ! -----------------------------!
40 |
41 | local_Lo = 0.
42 | local_Lb = 0.
43 |
44 | ! --------------------------------------------------------!
45 | ! Intensities at the boundaries in the partitioned domain !
46 | ! --------------------------------------------------------!
47 |
48 | DO ibnd = bfbeg, bfend
49 |
50 | ielt = bcell(ibnd)
51 | m = bface(ibnd)
52 |
53 | local_Lo(m,ielt)=epsil(ibnd)*planck(Tf(ibnd))
54 |
55 | ENDDO
56 |
57 | ! ---------------------------------------------!
58 | ! Spectral intensity in the partitioned domain !
59 | ! ---------------------------------------------!
60 |
61 | DO ielt = celld, cellf
62 |
63 | local_Lb(ielt)=planck(celldata(1,ielt))
64 |
65 | ENDDO
66 |
67 | ! ---------------------------------------!
68 | ! communcation....to put in pmm_reducelb !
69 | ! ---------------------------------------!
70 |
71 | ! print*, " proc ", pmm_rank,": sending L (",celld,",",cellf,")"
72 | CALL MPI_ALLREDUCE(local_Lo, Lo, nfacemax*ncells, &
73 | & MPI_DOUBLE_PRECISION, MPI_SUM, MPI_COMM_WORLD,&
74 | & ierr)
75 |
76 | CALL MPI_ALLREDUCE(local_Lb, Lb, ncells, MPI_DOUBLE_PRECISION, &
77 | & MPI_SUM, MPI_COMM_WORLD, ierr)
78 |
79 | END SUBROUTINE EMISSIV
emissiv.F could be called by: