change_map_to_particular_range Subroutine

private subroutine change_map_to_particular_range()

Modified the indicies for MPI communication

Arguments

None

Called by

proc~~change_map_to_particular_range~~CalledByGraph proc~change_map_to_particular_range change_map_to_particular_range proc~read_interface_map read_interface_map proc~read_interface_map->proc~change_map_to_particular_range proc~setup_grid setup_grid proc~setup_grid->proc~read_interface_map proc~setup_solver setup_solver proc~setup_solver->proc~setup_grid proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents


Source Code

      subroutine change_map_to_particular_range()
        !< Modified the indicies for MPI communication
        !-------------------------------------
        !eg: 1-kmx to 0 to kmx for data transfer
        !--------------------------------------
        implicit none
        integer :: i
        Pilo=ilo
        Pjlo=jlo
        Pklo=klo
        Pihi=ihi
        Pjhi=jhi
        Pkhi=khi
        PiDir=1
        PjDir=1
        PkDir=1
        do i=1,6
          if(ilo(i)==1 .and. i>2)then
            Pilo(i)=1
            Gilo(i)=-2
          end if
          if(jlo(i)==1 .and. (i>4 .or.i<3) )then
            Pjlo(i)=1
            Gjlo(i)=-2
          end if
          if(klo(i)==1 .and. i<5)then
            Pklo(i)=1
            Gklo(i)=-2
          end if
          if(ihi(i)==1 .and. i>2)then
            Pihi(i)=1          
            Gihi(i)=-2         
            PiDir(i)=-1
          end if               
          if(jhi(i)==1 .and. (i>4 .or. i<3))then
            Pjhi(i)=1          
            Gjhi(i)=-2          
            PjDir(i)=-1
          end if               
          if(khi(i)==1 .and. i<5)then
            Pkhi(i)=1
            Gkhi(i)=-2
            PkDir(i)=-1
          end if
          if(ilo(i)>1 .and. i>2) then
            Gilo(i)=ilo(i)+3
            Pilo(i)=ilo(i)-1
            PiDir(i)=-1
          end if
          if(jlo(i)>1 .and. (i>4 .or. i<5)) then
            Gjlo(i)=jlo(i)+3
            Pjlo(i)=jlo(i)-1
            PjDir(i)=-1
          end if
          if(klo(i)>1 .and. i<5) then
            Gklo(i)=klo(i)+3
            Pklo(i)=klo(i)-1
            PkDir(i)=-1
          end if
          if(ihi(i)>1 .and. i>2) then
            Gihi(i)=ihi(i)+3
            Pihi(i)=ihi(i)-1
          end if
          if(jhi(i)>1 .and. (i>4 .or. i<5)) then
            Gjhi(i)=jhi(i)+3
            Pjhi(i)=jhi(i)-1
          end if
          if(khi(i)>1 .and. i<5) then
            Gkhi(i)=khi(i)+3
            Pkhi(i)=khi(i)-1
          end if
        end do
        
      end subroutine change_map_to_particular_range