Ignore:
Timestamp:
Jan 9, 2008 8:17:38 AM (13 years ago)
Author:
raasch
Message:

second preliminary update for turbulent inflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_pegrid.f90

    r139 r145  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Collect on PE0 horizontal index bounds from all other PEs
    77! TEST OUTPUT (TO BE REMOVED) logging mpi2 ierr values
    88!
     
    458458    DEALLOCATE( nxlf , nxrf , nynf , nysf )
    459459
     460!
     461!-- Collect index bounds from other PEs (to be written to restart file later)
     462    ALLOCATE( hor_index_bounds(4,0:numprocs-1) )
     463
     464    IF ( myid == 0 )  THEN
     465
     466       hor_index_bounds(1,0) = nxl
     467       hor_index_bounds(2,0) = nxr
     468       hor_index_bounds(3,0) = nys
     469       hor_index_bounds(4,0) = nyn
     470
     471!
     472!--    Receive data from all other PEs
     473       DO  i = 1, numprocs-1
     474          CALL MPI_RECV( ibuf, 4, MPI_INTEGER, i, MPI_ANY_TAG, comm2d, status, &
     475                         ierr )
     476          hor_index_bounds(:,i) = ibuf(1:4)
     477       ENDDO
     478
     479    ELSE
     480!
     481!--    Send index bounds to PE0
     482       ibuf(1) = nxl
     483       ibuf(2) = nxr
     484       ibuf(3) = nys
     485       ibuf(4) = nyn
     486       CALL MPI_SEND( ibuf, 4, MPI_INTEGER, 0, myid, comm2d, ierr )
     487
     488    ENDIF
     489
    460490#if defined( __print )
    461491!
     
    606636    nzta = nz
    607637    nnz  = nz
     638
     639    ALLOCATE( hor_index_bounds(4,0:0) )
     640    hor_index_bounds(1,0) = nxl
     641    hor_index_bounds(2,0) = nxr
     642    hor_index_bounds(3,0) = nys
     643    hor_index_bounds(4,0) = nyn
    608644
    609645!
Note: See TracChangeset for help on using the changeset viewer.