sumy_ibm Subroutine

public subroutine sumy_ibm(sumy, var, ib, ie, jb, je, kb, ke, II)

Arguments

Type IntentOptional Attributes Name
real :: sumy(ib:ie,kb:ke)
real :: var(ib:ie,jb:je,kb:ke)
integer :: ib
integer :: ie
integer :: jb
integer :: je
integer :: kb
integer :: ke
integer :: II(ib:ie,jb:je,kb:ke)

Calls

proc~~sumy_ibm~~CallsGraph proc~sumy_ibm sumy_ibm mpi_allreduce mpi_allreduce proc~sumy_ibm->mpi_allreduce

Called by

proc~~sumy_ibm~~CalledByGraph proc~sumy_ibm sumy_ibm proc~masscorr masscorr proc~masscorr->proc~sumy_ibm proc~uoutletarea uoutletarea proc~uoutletarea->proc~sumy_ibm proc~calcfluidvolumes calcfluidvolumes proc~calcfluidvolumes->proc~uoutletarea program~dalesurban DALESURBAN program~dalesurban->proc~masscorr program~dalesurban->proc~calcfluidvolumes

Source Code

  subroutine sumy_ibm(sumy,var,ib,ie,jb,je,kb,ke,II)
    ! This routine sums up a variable over the y direction,
    ! only including the fluid cells.
    implicit none
    integer                 :: ib,ie,jb,je,kb,ke
    real                    :: sumy(ib:ie,kb:ke)
    real                    :: sumproc(ib:ie,kb:ke)
    real                    :: var(ib:ie,jb:je,kb:ke)
    integer                 :: II(ib:ie,jb:je,kb:ke)

    sumproc = 0.
    sumy  = 0.

    sumproc = sum(var(ib:ie,jb:je,kb:ke)*II(ib:ie,jb:je,kb:ke), DIM=2)

    call MPI_ALLREDUCE(sumproc(ib:ie,kb:ke), sumy(ib:ie,kb:ke), (ke-kb+1)*(ie-ib+1), MY_REAL,MPI_SUM, comm3d,mpierr)

    end subroutine sumy_ibm