Back to OASIS3-MCT home

In oasis3-mct/lib/mct/mct/m_GlobalSegMap.F90 :

Type GlobalSegMap (<= mct_gsmap in psmile)

      integer :: comp_id            ! Component ID number
      integer :: ngseg                ! No. of Global segments
      integer :: gsize                ! No. of Global elements
      integer,dimension(:),pointer :: start    ! global seg. start index
      integer,dimension(:),pointer :: length    ! segment lengths
      integer,dimension(:),pointer :: pe_loc    ! PE locations

end type GlobalSegMap

! !MODULE: m_GlobalSegMap - a nontrivial 1-D decomposition of an array.
! Consider the problem of the 1-dimensional decomposition of an array
! across multiple processes.  If each process owns only one contiguous
! segment, then the {\tt GlobalMap} (see {\tt m\_GlobalMap} or details)
! is sufficient to describe the decomposition.  If, however, each 
! process owns multiple, non-adjacent segments of the array, a more
! sophisticated approach is needed.   The {\tt GlobalSegMap} data type
! allows one to describe a one-dimensional decomposition of an array
! with each process owning multiple, non-adjacent segments of the array.
! In the current implementation of the {\tt GlobalSegMap}, there is no
! santity check to guarantee that
!$${\tt GlobalSegMap\%gsize} = \sum_{{\tt i}=1}^{\tt ngseg}
! {\tt GlobalSegMap\%length(i)} . $$
! The reason we have not implemented such a check is to allow the user
! to use the {\tt GlobalSegMap} type to support decompositions of both
! {\em haloed} and {\em masked} data.