Eq 3 then do i21n2 do i11n1 bufflen bufflen 1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ndx + 1 u(i1,i2,1) = buff(indx, buff_id ) enddo enddo endif i3=2,n3-1 do i1=1,n1 buff_len = buff_len + 1 buff(buff_len, buff_id )= u( i1,n2-1,i3) enddo enddo include 'cafnpb.h' include 'globals.h' integer n1, n2, n3, kk double precision u(n1,n2,n3) integer axis if( .not. dead(kk) )then do axis = 1, 3 if( nprocs .ne. 1) then call sync_all() call give3( axis, +1, call give3( axis, -1, call sync_all() call take3( axis, -1, call take3( axis, +1, else call comm1p( axis, u, endif enddo else do axis = 1, 3 call sync_all() call sync_all() enddo call zero3(u,n1,n2,n3) endif return end else if( dir .eq. +1 ) then do implicit none buff(1:buff_len,buff_id+1)[nbr(axis,dir,k)] = buff(1:buff_len,buff_id) > endif endif do i3=2,n3-1 do i1=1,n1 indx = indx + 1 u(i1,1,i3) = buff(indx, buff_id ) enddo enddo if( axis .eq. 3 )then if( dir .eq. -1 )then u, n1, n2, n3, kk ) u, n1, n2, n3, kk ) do i2=1,n2 do i1=1,n1 indx = indx + 1 u(i1,i2,n3) = buff(indx, buff_id ) enddo enddo do i2=1,n2 do i1=1,n1 buff_len = buff_len + 1 buff(buff_len, buff_id ) = u( i1,i2,2) enddo enddo u, n1, n2, n3 ) u, n1, n2, n3 ) n1, n2, n3, kk ) else if( dir .eq. +1 ) then do i2=1,n2 do i1=1,n1 indx = indx + 1 u(i1,i2,1) = buff(indx, buff_id ) enddo enddo buff(1:...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online