emissiv.F [SRC] [CPP] [JOB] [SCAN]
SOURCES / MODEL



   1 | include(dom.inc)
   2 | 
   3 |        SUBROUTINE EMISSIV(celldata, Lb, Lo, epsil, Tf, nelmts,          &
   4 |      &                    ieltd, ieltf, nbface, bfbeg, bfend)
   5 | 
   6 |        USE mod_pmm
   7 | #ifdef USEPALM
   8 |        USE palmlib
   9 | #endif
  10 |        USE mod_slave
  11 | 
  12 |        IMPLICIT NONE
  13 | 
  14 |        include 'dom_constants.h'
  15 | 
  16 | !      IN
  17 |        DOM_INT                              :: nelmts,nbface
  18 |        DOM_INT                              :: ieltd, ieltf
  19 |        DOM_INT                              :: bfbeg, bfend
  20 |        DOM_REAL, DIMENSION(8,nelmts)        :: celldata
  21 |        DOM_REAL, DIMENSION(nbface)          :: epsil, Tf
  22 | 
  23 | !      OUT
  24 |        DOM_REAL, DIMENSION(nelmts)          :: Lb
  25 |        DOM_REAL, DIMENSION(nbface)          :: Lo
  26 | 
  27 | !      LOCAL
  28 |        DOM_INT                              :: ielt, ibnd
  29 | !      DOM_INT                              :: local_ncell
  30 | !      DOM_INT                              :: ierr
  31 |        DOM_REAL                             :: planck
  32 |        DOM_REAL, DIMENSION(nelmts)          :: local_Lb
  33 |        DOM_REAL, DIMENSION(nbface)          :: local_Lo
  34 | 
  35 |        Lo = 0.
  36 |        Lb = 0.
  37 | 
  38 | !      -----------------------------!
  39 | !      Initializing local cell data !
  40 | !      -----------------------------!
  41 | 
  42 |        local_Lo = 0.
  43 |        local_Lb = 0.
  44 | 
  45 | !      --------------------------------------------------------!
  46 | !      Intensities at the boundaries in the partitioned domain !
  47 | !      --------------------------------------------------------!
  48 | 
  49 | !$OMP PARALLEL DO                                                       &
  50 | !$OMP&  SHARED(local_Lo)
  51 | 
  52 |        DO ibnd = bfbeg, bfend
  53 | 
  54 |          local_Lo(ibnd)=epsil(ibnd)*planck(Tf(ibnd))
  55 | 
  56 |        ENDDO
  57 | 
  58 | !$OMP END PARALLEL DO
  59 | 
  60 | !      ---------------------------------------------!
  61 | !      Spectral intensity in the partitioned domain !
  62 | !      ---------------------------------------------!
  63 | 
  64 | !$OMP PARALLEL DO                                                       &
  65 | !$OMP&  SHARED(local_Lb)
  66 | 
  67 |        DO ielt = ieltd, ieltf
  68 | 
  69 |          local_Lb(ielt)=planck(celldata(1,ielt))
  70 | 
  71 |        ENDDO
  72 | 
  73 | !$OMP END PARALLEL DO
  74 | 
  75 | !      ---------------------------------------!
  76 | !      communcation....to put in pmm_reducelb !
  77 | !      ---------------------------------------!
  78 | 
  79 | !      print*, " proc ", pmm_rank,": sending L (",ieltd,",",ieltf,")"
  80 | 
  81 | !      CALL MPI_ALLREDUCE(local_Lo, Lo, nbface,                         &
  82 | !    &                    MPI_DOUBLE_PRECISION, MPI_SUM, SUB_COMM ,     &
  83 | !    &                    ierr)
  84 | 
  85 | !      CALL MPI_ALLREDUCE(local_Lb, Lb, nelmts, MPI_DOUBLE_PRECISION,   &
  86 | !    &                    MPI_SUM, SUB_COMM, ierr)
  87 | 
  88 |        Lo = local_Lo
  89 |        Lb = local_Lb
  90 | 
  91 |        END SUBROUTINE EMISSIV


emissiv.F could be called by:
Makefile [SOURCES] - 117
slave.F [SOURCES/MAIN/SLAVE] - 181