createpurifiers Subroutine

public subroutine createpurifiers()

Uses

  • proc~~createpurifiers~~UsesGraph proc~createpurifiers createpurifiers module~modglobal modglobal proc~createpurifiers->module~modglobal module~modmpi modmpi proc~createpurifiers->module~modmpi mpi mpi module~modmpi->mpi

Arguments

None

Calls

proc~~createpurifiers~~CallsGraph proc~createpurifiers createpurifiers mpi_bcast mpi_bcast proc~createpurifiers->mpi_bcast

Called by

proc~~createpurifiers~~CalledByGraph proc~createpurifiers createpurifiers program~dalesurban DALESURBAN program~dalesurban->proc~createpurifiers

Source Code

    subroutine createpurifiers
    use modglobal,  only : lpurif,npurif,purif,cexpnr,ifinput
    use modmpi,     only : myid,comm3d,mpierr

    implicit none
    integer :: n
    character(80) chmess

    if (lpurif .eqv. .false.) return
    
      allocate(purif(npurif,7))

      ! read global purifiers
      if(myid==0) then
        ! write(*,*) '1, myid, npurif, lpurif, cexpnr', myid, npurif, lpurif, cexpnr
        if (npurif>0) then
          open (ifinput,file='purifs.inp.'//cexpnr)
          read (ifinput,'(a80)') chmess
          read (ifinput,'(a80)') chmess
          do n=1,npurif
            read (ifinput,*) &
                  purif(n,1), &
                  purif(n,2), &
                  purif(n,3), &
                  purif(n,4), &
                  purif(n,5), &
                  purif(n,6), & 
                  purif(n,7)
          end do

          ! write (6,*) 'Purifier number,  il, iu, jl, ju, kl, ku, ipu '
          ! do n=1,npurif
          !   write (6,*) &
          !         n , &
          !         purif(n,1), &
          !         purif(n,2), &
          !         purif(n,3), &
          !         purif(n,4), &
          !         purif(n,5), &
          !         purif(n,6), &
          !         purif(n,7)                 
          ! end do
        end if
      ! write(*,*) 'Finished determining purifiers on myid == 0'
      end if ! end if myid==0

      call MPI_BCAST(purif  ,7*npurif,MPI_INTEGER ,0,comm3d,mpierr)
      call MPI_BCAST(npurif ,1,MPI_INTEGER ,0,comm3d,mpierr)

      end subroutine createpurifiers