sumx_ibm Subroutine

public subroutine sumx_ibm(sumx, var, ib, ie, jb, je, kb, ke, II)

Arguments

Type IntentOptional Attributes Name
real :: sumx(jb:je,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~~sumx_ibm~~CallsGraph proc~sumx_ibm sumx_ibm mpi_allreduce mpi_allreduce proc~sumx_ibm->mpi_allreduce

Called by

proc~~sumx_ibm~~CalledByGraph proc~sumx_ibm sumx_ibm proc~voutletarea voutletarea proc~voutletarea->proc~sumx_ibm proc~calcfluidvolumes calcfluidvolumes proc~calcfluidvolumes->proc~voutletarea program~dalesurban DALESURBAN program~dalesurban->proc~calcfluidvolumes

Source Code

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

     sumproc = 0.
     sumx  = 0.

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

     call MPI_ALLREDUCE(sumproc(jb:je,kb:ke), sumx(jb:je,kb:ke), (ke-kb+1)*(je-jb+1), MY_REAL,MPI_SUM, comm3d,mpierr)

     end subroutine sumx_ibm