RPN_COMM

(RPN_COMM_compress)



subroutine RPN_COMM_compress(array,minx,maxx,miny,maxy,nil,njl,nk)
subroutine RPN_COMM_compress8(array,minx,maxx,miny,maxy,nil,njl,nk)
subroutine RPN_COMM_expand(array8,minx,maxx,miny,maxy,nil,njl,nk)
subroutine RPN_COMM_expand8(array8,minx,maxx,miny,maxy,nil,njl,nk)



ARGUMENTS

IN


OUT

  • array, with the compressed (or expanded) data

  • DESCRIPTION


    Compress an array by removing the halo. Typically, the input will have the following shape: (case k=1):

    +---------+      
    |         |      
    | +-----+ |      
    | |ni*nj| |    ->
          (maxx-minx+1)*(maxy*miny+1) 
    | O-----+ |        +---------+----------+-------+-------+
    |         |        |ni*nj k=1| ni*nj k=2|
    ...k=nk|       |
    +---------+        +---------+----------+-------+-------+

    "O" is the origin, the outmost part is of size minx:maxx, miny:maxy and inmost part is ni,nj. The compression process rewrite the inmost part in the outmost part in a way that all ni*nj*nk points are consecutive in the (maxx-minx+1)*(maxy*miny+1) array. Then, we can save (maxx-minx+1)*(maxy*miny+1)-ni*nj*nk at the end of the array. Calling compress8 will do the same trick for double precision arrays.

    If we use "expand", we proceed the opposite way, placing the ni*nj*nk first points in an array of size minx:maxx, miny:maxy, beginning at point (1,1,1). Calling expand8 will do the same trick for double precision arrays.


    SEE ALSO

    RPN_COMM_* 

    Return to RPN Libraries home page