decomp_global_to_local Subroutine

public pure subroutine decomp_global_to_local(d, ig, jg, il, jl)

Public only for the unit-test suite (no production module imports it); ignore when developing production code in other modules. Convert global physical indices to local physical indices

Arguments

Type IntentOptional Attributes Name
type(decomp_t), intent(in) :: d
integer, intent(in) :: ig

Global i-index (1-based, physical cells)

integer, intent(in) :: jg

Global j-index (1-based, physical cells)

integer, intent(out) :: il

Local i-index (1-based, physical cells)

integer, intent(out) :: jl

Local j-index (1-based, physical cells)


Source Code

   pure subroutine decomp_global_to_local(d, ig, jg, il, jl)
      !! Public only for the unit-test suite (no production module imports it);
      !! ignore when developing production code in other modules.
      !! Convert global physical indices to local physical indices
      type(decomp_t), intent(in) :: d
      integer, intent(in) :: ig
         !! Global i-index (1-based, physical cells)
      integer, intent(in) :: jg
         !! Global j-index (1-based, physical cells)
      integer, intent(out) :: il
         !! Local i-index (1-based, physical cells)
      integer, intent(out) :: jl
         !! Local j-index (1-based, physical cells)

      il = ig - d%i_start + 1
      jl = jg - d%j_start + 1

   end subroutine decomp_global_to_local