|
|
@ -480,16 +480,21 @@ contains
|
|
|
|
nxt = nv + 1
|
|
|
|
nxt = nv + 1
|
|
|
|
ip = idx(i)
|
|
|
|
ip = idx(i)
|
|
|
|
call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info)
|
|
|
|
call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info)
|
|
|
|
|
|
|
|
if (info >= 0) then
|
|
|
|
if (lip == nxt) then
|
|
|
|
if (lip == nxt) then
|
|
|
|
! We have added one item
|
|
|
|
! We have added one item
|
|
|
|
call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500)
|
|
|
|
call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500)
|
|
|
|
if (info /= 0) then
|
|
|
|
if (info /= 0) then
|
|
|
|
info = -4
|
|
|
|
info = -4
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
idxmap%local_cols = nxt + idxmap%local_rows
|
|
|
|
|
|
|
|
idxmap%loc_to_glob(nxt) = idx(i)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
idxmap%local_cols = nxt + idxmap%local_rows
|
|
|
|
info = psb_success_
|
|
|
|
idxmap%loc_to_glob(nxt) = idx(i)
|
|
|
|
else
|
|
|
|
|
|
|
|
info = -5
|
|
|
|
|
|
|
|
return
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
idx(i) = lip + idxmap%local_rows
|
|
|
|
idx(i) = lip + idxmap%local_rows
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -502,7 +507,7 @@ contains
|
|
|
|
else if (.not.present(mask)) then
|
|
|
|
else if (.not.present(mask)) then
|
|
|
|
|
|
|
|
|
|
|
|
do i=1, is
|
|
|
|
do i=1, is
|
|
|
|
|
|
|
|
|
|
|
|
if ((idxmap%min_glob_row <= idx(i)).and.(idx(i) <= idxmap%max_glob_row)) then
|
|
|
|
if ((idxmap%min_glob_row <= idx(i)).and.(idx(i) <= idxmap%max_glob_row)) then
|
|
|
|
idx(i) = idx(i) - idxmap%min_glob_row + 1
|
|
|
|
idx(i) = idx(i) - idxmap%min_glob_row + 1
|
|
|
|
else if ((1<= idx(i)).and.(idx(i) <= idxmap%global_rows)) then
|
|
|
|
else if ((1<= idx(i)).and.(idx(i) <= idxmap%global_rows)) then
|
|
|
@ -510,16 +515,22 @@ contains
|
|
|
|
nxt = nv + 1
|
|
|
|
nxt = nv + 1
|
|
|
|
ip = idx(i)
|
|
|
|
ip = idx(i)
|
|
|
|
call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info)
|
|
|
|
call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info)
|
|
|
|
|
|
|
|
|
|
|
|
if (lip == nxt) then
|
|
|
|
if (info >= 0) then
|
|
|
|
! We have added one item
|
|
|
|
if (lip == nxt) then
|
|
|
|
call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500)
|
|
|
|
! We have added one item
|
|
|
|
if (info /= 0) then
|
|
|
|
call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500)
|
|
|
|
info = -4
|
|
|
|
if (info /= 0) then
|
|
|
|
return
|
|
|
|
info = -4
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
idxmap%local_cols = nxt + idxmap%local_rows
|
|
|
|
|
|
|
|
idxmap%loc_to_glob(nxt) = idx(i)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
idxmap%local_cols = nxt + idxmap%local_rows
|
|
|
|
info = psb_success_
|
|
|
|
idxmap%loc_to_glob(nxt) = idx(i)
|
|
|
|
else
|
|
|
|
|
|
|
|
info = -5
|
|
|
|
|
|
|
|
return
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
idx(i) = lip + idxmap%local_rows
|
|
|
|
idx(i) = lip + idxmap%local_rows
|
|
|
|
else
|
|
|
|
else
|
|
|
|