diff --git a/util/psb_partidx_mod.F90 b/util/psb_partidx_mod.F90 index 9b88738a..c93522bf 100644 --- a/util/psb_partidx_mod.F90 +++ b/util/psb_partidx_mod.F90 @@ -48,8 +48,30 @@ module psb_partidx_mod module procedure ijk2idx3d, ijk2idxv, ijk2idx2d end interface ijk2idx - logical, private, save : col_major=.true. + logical, private, save :: col_major=.true. + contains + + subroutine psb_pidx_set_col_major(val) + implicit none + logical, intent(in), optional :: val + logical :: val_ + val_ =.true. + if (present(val)) val_ = val + col_major = val_ + end subroutine psb_pidx_set_col_major + + subroutine psb_pidx_set_row_major() + implicit none + call psb_pidx_set_col_major(.false.) + end subroutine psb_pidx_set_row_major + + function psb_pidx_get_col_major() result(val) + implicit none + logical :: val + val = col_major + end function psb_pidx_get_col_major + ! ! Given a global index IDX and the domain size (NX,NY,NZ) ! compute the point coordinates (I,J,K)