You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psblas3/base/serial/psb_zcoins.f90

586 lines
17 KiB
Fortran

!!$
!!$ Parallel Sparse BLAS version 2.2
!!$ (C) Copyright 2006/2007/2008
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari University of Rome Tor Vergata
!!$
!!$ Redistribution and use in source and binary forms, with or without
!!$ modification, are permitted provided that the following conditions
!!$ are met:
!!$ 1. Redistributions of source code must retain the above copyright
!!$ notice, this list of conditions and the following disclaimer.
!!$ 2. Redistributions in binary form must reproduce the above copyright
!!$ notice, this list of conditions, and the following disclaimer in the
!!$ documentation and/or other materials provided with the distribution.
!!$ 3. The name of the PSBLAS group or the names of its contributors may
!!$ not be used to endorse or promote products derived from this
!!$ software without specific written permission.
!!$
!!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
!!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
!!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
!!$ POSSIBILITY OF SUCH DAMAGE.
!!$
!!$
! File: psbzcoins.f90
! Subroutine:
! Parameters:
subroutine psb_zcoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild)
use psb_spmat_type
use psb_const_mod
use psb_realloc_mod
use psb_string_mod
use psb_error_mod
use psb_serial_mod, psb_protect_name => psb_zcoins
use psb_update_mod
implicit none
integer, intent(in) :: nz, imin,imax,jmin,jmax
integer, intent(in) :: ia(:),ja(:)
psblas-dev: README base/comm/psb_dgather.f90 base/comm/psb_dhalo.f90 base/comm/psb_dovrl.f90 base/comm/psb_dscatter.F90 base/comm/psb_ihalo.f90 base/comm/psb_zgather.f90 base/comm/psb_zhalo.f90 base/comm/psb_zovrl.f90 base/comm/psb_zscatter.F90 base/internals/psi_dswapdata.F90 base/internals/psi_dswaptran.F90 base/internals/psi_iswapdata.F90 base/internals/psi_iswaptran.F90 base/internals/psi_zswapdata.F90 base/internals/psi_zswaptran.F90 base/modules/Makefile base/modules/cutil.c base/modules/fakempi.c base/modules/psb_comm_mod.f90 base/modules/psb_const_mod.f90 base/modules/psb_desc_type.f90 base/modules/psb_error_mod.F90 base/modules/psb_inter_desc_type.f90 base/modules/psb_penv_mod.F90 base/modules/psb_psblas_mod.f90 base/modules/psb_realloc_mod.F90 base/modules/psb_serial_mod.f90 base/modules/psb_sort_mod.f90 base/modules/psb_spmat_type.f90 base/modules/psb_spsb_mod.f90 base/modules/psb_tools_mod.f90 base/modules/psi_mod.f90 base/modules/psi_serial_mod.f90 base/psblas/psb_damax.f90 base/psblas/psb_dasum.f90 base/psblas/psb_daxpby.f90 base/psblas/psb_ddot.f90 base/psblas/psb_dnrm2.f90 base/psblas/psb_dnrmi.f90 base/psblas/psb_dspmm.f90 base/psblas/psb_dspsm.f90 base/psblas/psb_zamax.f90 base/psblas/psb_zasum.f90 base/psblas/psb_zaxpby.f90 base/psblas/psb_zdot.f90 base/psblas/psb_znrm2.f90 base/psblas/psb_znrmi.f90 base/psblas/psb_zspmm.f90 base/psblas/psb_zspsm.f90 base/serial/aux/dasr.f90 base/serial/aux/dasrx.f90 base/serial/aux/dmsort_dw.f90 base/serial/aux/dmsort_up.f90 base/serial/aux/dmsr.f90 base/serial/aux/dmsrx.f90 base/serial/aux/dsr.f90 base/serial/aux/dsrx.f90 base/serial/aux/zacmp_mod.f90 base/serial/aux/zalcmp_mod.f90 base/serial/aux/zalsr.f90 base/serial/aux/zalsrx.f90 base/serial/aux/zamsort_dw.f90 base/serial/aux/zamsort_up.f90 base/serial/aux/zamsr.f90 base/serial/aux/zamsrx.f90 base/serial/aux/zasr.f90 base/serial/aux/zasrx.f90 base/serial/aux/zlcmp_mod.f90 base/serial/aux/zlsr.f90 base/serial/aux/zlsrx.f90 base/serial/coo/dcoomm.f base/serial/coo/dcoomv.f base/serial/coo/dcoonrmi.f base/serial/coo/dcoorws.f base/serial/coo/dcoosm.f base/serial/coo/dcoosv.f base/serial/coo/zcoomm.f base/serial/coo/zcoomv.f base/serial/coo/zcoonrmi.f base/serial/coo/zcoorws.f base/serial/coo/zcoosm.f base/serial/coo/zcoosv.f base/serial/csr/dcrnrmi.f base/serial/csr/dcsrck.f base/serial/csr/dcsrmm.f base/serial/csr/dcsrmv.f base/serial/csr/dcsrmv2.f base/serial/csr/dcsrmv3.f base/serial/csr/dcsrmv4.f base/serial/csr/dcsrrws.f base/serial/csr/dcsrsm.f base/serial/csr/dcsrsv.f base/serial/csr/zcrnrmi.f base/serial/csr/zcsrck.f base/serial/csr/zcsrmm.f base/serial/csr/zcsrrws.f base/serial/csr/zcsrsm.f base/serial/csr/zsrmv.f base/serial/csr/zsrsv.f base/serial/dp/dcoco.f base/serial/dp/dcocr.f base/serial/dp/dcrco.f base/serial/dp/dcrcr.f base/serial/dp/dcrjd.f base/serial/dp/dcsrp1.f base/serial/dp/dcsrrp.f base/serial/dp/dgind_tri.f base/serial/dp/dgindex.f base/serial/dp/djadrp.f base/serial/dp/djadrp1.f base/serial/dp/djdco.f base/serial/dp/djdcox.f base/serial/dp/dvtfg.f base/serial/dp/reordvn.f base/serial/dp/zcoco.f base/serial/dp/zcocr.f base/serial/dp/zcrco.f base/serial/dp/zcrcr.f base/serial/dp/zcrjd.f base/serial/dp/zgind_tri.f base/serial/dp/zgindex.f base/serial/f77/daxpby.f base/serial/f77/dcsmm.f base/serial/f77/dcsnmi.f base/serial/f77/dcsrp.f base/serial/f77/dcsrws.f base/serial/f77/dcssm.f base/serial/f77/dgelp.f base/serial/f77/dlpupd.f base/serial/f77/dswmm.f base/serial/f77/dswsm.f base/serial/f77/smmp.f base/serial/f77/zaxpby.f base/serial/f77/zcsmm.f base/serial/f77/zcsnmi.f base/serial/f77/zcsrws.f base/serial/f77/zcssm.f base/serial/f77/zgelp.f base/serial/f77/zlpupd.f base/serial/f77/zswmm.f base/serial/f77/zswsm.f base/serial/jad/djadmm.f base/serial/jad/djadmv.f base/serial/jad/djadmv2.f base/serial/jad/djadmv3.f base/serial/jad/djadmv4.f base/serial/jad/djadnr.f base/serial/jad/djadrws.f base/serial/jad/djadsm.f base/serial/jad/djadsv.f base/serial/jad/djdnrmi.f base/serial/jad/djdrws.f base/serial/psb_dcoins.f90 base/serial/psb_dcsmm.f90 base/serial/psb_dcsmv.f90 base/serial/psb_dcsnmi.f90 base/serial/psb_dcsrp.f90 base/serial/psb_dcsrws.f90 base/serial/psb_dcssm.f90 base/serial/psb_dcssv.f90 base/serial/psb_dgelp.f90 base/serial/psb_dneigh.f90 base/serial/psb_dnumbmm.f90 base/serial/psb_dspcnv.f90 base/serial/psb_dspgetrow.f90 base/serial/psb_dspgtdiag.f90 base/serial/psb_dspscal.f90 base/serial/psb_dsymbmm.f90 base/serial/psb_getrow_mod.f90 base/serial/psb_regen_mod.f90 base/serial/psb_update_mod.f90 base/serial/psb_zcoins.f90 base/serial/psb_zcsmm.f90 base/serial/psb_zcsmv.f90 base/serial/psb_zcsnmi.f90 base/serial/psb_zcsrp.f90 base/serial/psb_zcsrws.f90 base/serial/psb_zcssm.f90 base/serial/psb_zcssv.f90 base/serial/psb_zgelp.f90 base/serial/psb_zneigh.f90 base/serial/psb_znumbmm.f90 base/serial/psb_zspcnv.f90 base/serial/psb_zspgetrow.f90 base/serial/psb_zspgtdiag.f90 base/serial/psb_zspscal.f90 base/serial/psb_zsymbmm.f90 base/tools/psb_dallc.f90 base/tools/psb_dasb.f90 base/tools/psb_dfree.f90 base/tools/psb_dins.f90 base/tools/psb_dsphalo.F90 base/tools/psb_dspins.f90 base/tools/psb_zallc.f90 base/tools/psb_zasb.f90 base/tools/psb_zfree.f90 base/tools/psb_zins.f90 base/tools/psb_zsphalo.F90 base/tools/psb_zspins.f90 docs/pdf/datastruct.tex docs/pdf/penv.tex docs/userguide.pdf krylov/psb_dbicg.f90 krylov/psb_dcg.f90 krylov/psb_dcgs.f90 krylov/psb_dcgstab.F90 krylov/psb_dcgstabl.f90 krylov/psb_drgmres.f90 krylov/psb_krylov_mod.f90 krylov/psb_zbicg.f90 krylov/psb_zcg.f90 krylov/psb_zcgs.f90 krylov/psb_zcgstab.f90 krylov/psb_zcgstabl.f90 krylov/psb_zrgmres.f90 prec/psb_dbjac_aply.f90 prec/psb_dbjac_bld.f90 prec/psb_dgprec_aply.f90 prec/psb_dilu_fct.f90 prec/psb_dprc_aply.f90 prec/psb_dprecset.f90 prec/psb_prec_mod.f90 prec/psb_prec_type.f90 prec/psb_zbjac_aply.f90 prec/psb_zbjac_bld.f90 prec/psb_zgprec_aply.f90 prec/psb_zilu_fct.f90 prec/psb_zprc_aply.f90 prec/psb_zprecset.f90 test/fileread/df_sample.f90 test/fileread/getp.f90 test/fileread/zf_sample.f90 test/pargen/ppde.f90 test/util/Makefile util/psb_hbio_mod.f90 util/psb_mat_dist_mod.f90 util/psb_metispart_mod.F90 util/psb_mmio_mod.f90 util/psb_read_mat_mod.f90 Merged kind type names changes from r:2905:2906 in branches/psblas-2.2-maint.
17 years ago
complex(psb_dpk_), intent(in) :: val(:)
type(psb_zspmat_type), intent(inout) :: a
integer, intent(out) :: info
integer, intent(in), optional :: gtl(:)
logical, intent(in), optional :: rebuild
character(len=5) :: ufida
integer :: ng, nza, isza,spstate, &
& ip1, nzl, err_act, int_err(5), iupd, irst
logical, parameter :: debug=.false.
logical :: rebuild_
character(len=20) :: name, ch_err
type(psb_zspmat_type) :: tmp
name='psb_zcoins'
info = 0
call psb_erractionsave(err_act)
info = 0
if (nz <= 0) then
info = 10
int_err(1)=1
call psb_errpush(info,name,i_err=int_err)
goto 9999
end if
if (size(ia) < nz) then
info = 35
int_err(1)=2
call psb_errpush(info,name,i_err=int_err)
goto 9999
end if
if (size(ja) < nz) then
info = 35
int_err(1)=3
call psb_errpush(info,name,i_err=int_err)
goto 9999
end if
if (size(val) < nz) then
info = 35
int_err(1)=4
call psb_errpush(info,name,i_err=int_err)
goto 9999
end if
if (present(rebuild)) then
rebuild_ = rebuild
else
rebuild_ = .false.
end if
call touppers(a%fida,ufida)
spstate = psb_sp_getifld(psb_state_,a,info)
if (present(gtl)) then
ng = size(gtl)
select case(spstate)
case(psb_spmat_bld_)
if ((ufida /= 'COO').and.(ufida/='COI')) then
info = 134
ch_err(1:3)=ufida(1:3)
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
call psb_sp_info(psb_nztotreq_,a,nza,info)
call psb_sp_info(psb_nzsizereq_,a,isza,info)
if(info /= izero) then
info=4010
ch_err='psb_spinfo'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
if ((nza+nz)>isza) then
call psb_sp_reall(a,max(nza+nz,int(1.5*isza)),info)
if(info /= izero) then
info=4010
ch_err='psb_sp_reall'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
endif
call psb_inner_ins(nz,ia,ja,val,nza,a%ia1,a%ia2,a%aspk,&
& min(size(a%ia1),size(a%ia2),size(a%aspk)),&
& imin,imax,jmin,jmax,info,gtl,ng)
if(info /= izero) then
ch_err='psb_inner_ins'
call psb_errpush(4013,name,a_err=ch_err,i_err=(/info,0,0,0,0/))
goto 9999
endif
if (debug) then
if ((nza - a%infoa(psb_nnz_)) /= nz) then
write(0,*) 'PSB_COINS: insert discarded items '
end if
end if
if ((nza - psb_sp_getifld(psb_nnz_,a,info)) /= nz) then
call psb_sp_setifld(nza,psb_del_bnd_,a,info)
endif
call psb_sp_setifld(nza,psb_nnz_,a,info)
case(psb_spmat_upd_)
iupd = psb_sp_getifld(psb_upd_,a,info)
select case (iupd)
case (psb_upd_perm_)
ip1 = psb_sp_getifld(psb_upd_pnt_,a,info)
nzl = psb_sp_getifld(psb_del_bnd_,a,info)
select case(ufida)
case ('JAD')
nza = a%ia1(ip1+psb_nnz_)
case default
nza = a%ia2(ip1+psb_nnz_)
end select
call psb_inner_upd(nz,ia,ja,val,nza,a%aspk,size(a%aspk),&
& imin,imax,jmin,jmax,nzl,info,gtl,ng)
if (info /= izero) then
ch_err='psb_inner_upd'
call psb_errpush(4013,name,a_err=ch_err,i_err=(/info,0,0,0,0/))
goto 9999
endif
if (debug) then
if ((nza - a%ia2(ip1+psb_nnz_)) /= nz) then
write(0,*) 'PSB_COINS: update discarded items '
end if
end if
select case(ufida)
case ('JAD')
a%ia1(ip1+psb_nnz_) = nza
case default
a%ia2(ip1+psb_nnz_) = nza
end select
if (debug) write(0,*) 'From COINS(UPD) : NZA:',nza
case (psb_upd_srch_)
call psb_srch_upd(nz,ia,ja,val,nza,a,&
& imin,imax,jmin,jmax,nzl,info,gtl,ng)
if (info > 0) then
if (rebuild_) then
if (debug) write(0,*)&
& 'COINS: Going through rebuild_ fingers crossed!'
irst = info
call psb_nullify_sp(tmp)
call psb_spcnv(a,tmp,info,afmt='coo')
if(info /= izero) then
info=4010
ch_err='psb_csdp'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
call psb_sp_setifld(psb_spmat_bld_,psb_state_,tmp,info)
if (debug) then
write(0,*) 'COINS Rebuild: size',tmp%infoa(psb_nnz_) ,irst
endif
call psb_sp_transfer(tmp,a,info)
if(info /= izero) then
info=4010
ch_err='psb_sp_transfer'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
call psb_sp_info(psb_nztotreq_,a,nza,info)
call psb_sp_info(psb_nzsizereq_,a,isza,info)
if(info /= izero) then
info=4010
ch_err='psb_spinfo'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
if (debug) write(0,*)&
& 'COINS: Reinserting',a%fida,nza,isza,irst,nz
if ((nza+nz)>isza) then
call psb_sp_reall(a,max(nza+nz,int(1.5*isza)),info)
if(info /= izero) then
info=4010
ch_err='psb_sp_reall'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
endif
if (irst <= nz) then
call psb_inner_ins((nz-irst+1),ia(irst:nz),ja(irst:nz),val(irst:nz),&
& nza,a%ia1,a%ia2,a%aspk,&
& min(size(a%ia1),size(a%ia2),size(a%aspk)),&
&imin,imax,jmin,jmax,info,gtl,ng)
if (info /= izero) then
ch_err='psb_inner_ins'
call psb_errpush(4013,name,a_err=ch_err,i_err=(/info,0,0,0,0/))
endif
call psb_sp_setifld(nza,psb_del_bnd_,a,info)
call psb_sp_setifld(nza,psb_nnz_,a,info)
end if
else
info = 2231
call psb_errpush(info,name)
goto 9999
end if
else if (info < 0) then
info = 2230
call psb_errpush(info,name)
goto 9999
end if
case default
info = 2231
call psb_errpush(info,name)
goto 9999
end select
case default
info = 2232
call psb_errpush(info,name)
goto 9999
end select
else
ng = -1
select case(spstate)
case(psb_spmat_bld_)
if ((ufida /= 'COO').and.(ufida/='COI')) then
info = 134
ch_err(1:3)=ufida(1:3)
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
call psb_sp_info(psb_nztotreq_,a,nza,info)
call psb_sp_info(psb_nzsizereq_,a,isza,info)
if(info /= izero) then
info=4010
ch_err='psb_spinfo'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
if ((nza+nz)>isza) then
call psb_sp_reall(a,max(nza+nz,int(1.5*isza)),info)
if(info /= izero) then
info=4010
ch_err='psb_sp_reall'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
endif
call psb_inner_ins(nz,ia,ja,val,nza,a%ia1,a%ia2,a%aspk,&
& min(size(a%ia1),size(a%ia2),size(a%aspk)),&
& imin,imax,jmin,jmax,info)
if(info /= izero) then
ch_err='psb_inner_ins'
call psb_errpush(4013,name,a_err=ch_err,i_err=(/info,0,0,0,0/))
goto 9999
endif
if (debug) then
if ((nza - a%infoa(psb_nnz_)) /= nz) then
write(0,*) 'PSB_COINS: insert discarded items '
end if
end if
if ((nza - psb_sp_getifld(psb_nnz_,a,info)) /= nz) then
call psb_sp_setifld(nza,psb_del_bnd_,a,info)
!!$ write(0,*) 'Settind del_bnd_ 2: ',nza
endif
call psb_sp_setifld(nza,psb_nnz_,a,info)
case(psb_spmat_upd_)
iupd = psb_sp_getifld(psb_upd_,a,info)
select case (iupd)
case (psb_upd_perm_)
ip1 = psb_sp_getifld(psb_upd_pnt_,a,info)
nzl = psb_sp_getifld(psb_del_bnd_,a,info)
nza = a%ia2(ip1+psb_nnz_)
call psb_inner_upd(nz,ia,ja,val,nza,a%aspk,size(a%aspk),&
& imin,imax,jmin,jmax,nzl,info)
if (info /= izero) then
ch_err='psb_inner_upd'
call psb_errpush(4013,name,a_err=ch_err,i_err=(/info,0,0,0,0/))
goto 9999
endif
if (debug) then
if ((nza - a%ia2(ip1+psb_nnz_)) /= nz) then
write(0,*) 'PSB_COINS: update discarded items '
end if
end if
a%ia2(ip1+psb_nnz_) = nza
if (debug) write(0,*) 'From COINS(UPD) : NZA:',nza
case (psb_upd_srch_)
call psb_srch_upd(nz,ia,ja,val,nza,a,&
& imin,imax,jmin,jmax,nzl,info)
if (info > 0) then
if (rebuild_) then
if (debug) write(0,*)&
& 'COINS: Going through rebuild_ fingers crossed!'
irst = info
call psb_nullify_sp(tmp)
call psb_spcnv(a,tmp,info,afmt='coo')
call psb_sp_setifld(psb_spmat_bld_,psb_state_,tmp,info)
if (debug) then
write(0,*) 'COINS Rebuild: size',tmp%infoa(psb_nnz_) ,irst
endif
call psb_sp_transfer(tmp,a,info)
call psb_sp_info(psb_nztotreq_,a,nza,info)
call psb_sp_info(psb_nzsizereq_,a,isza,info)
if(info /= izero) then
info=4010
ch_err='psb_spinfo'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
if (debug) write(0,*)&
& 'COINS: Reinserting',a%fida,nza,isza
if ((nza+nz)>isza) then
call psb_sp_reall(a,max(nza+nz,int(1.5*isza)),info)
if(info /= izero) then
info=4010
ch_err='psb_sp_reall'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
endif
if (irst <= nz) then
call psb_inner_ins((nz-irst+1),ia(irst:nz),ja(irst:nz),val(irst:nz),&
& nza,a%ia1,a%ia2,a%aspk,&
& min(size(a%ia1),size(a%ia2),size(a%aspk)),&
& imin,imax,jmin,jmax,info)
if (info /= izero) then
ch_err='psb_inner_ins'
call psb_errpush(4013,name,a_err=ch_err,i_err=(/info,0,0,0,0/))
endif
call psb_sp_setifld(nza,psb_del_bnd_,a,info)
call psb_sp_setifld(nza,psb_nnz_,a,info)
end if
else
info = 2231
call psb_errpush(info,name)
goto 9999
end if
else if (info < 0) then
info = 2230
call psb_errpush(info,name)
goto 9999
end if
case default
info = 2233
call psb_errpush(info,name)
goto 9999
end select
case default
info = 2232
call psb_errpush(info,name)
goto 9999
end select
endif
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
contains
subroutine psb_inner_upd(nz,ia,ja,val,nza,aspk,maxsz,&
& imin,imax,jmin,jmax,nzl,info,gtl,ng)
implicit none
integer, intent(in) :: nz, imin,imax,jmin,jmax,nzl,maxsz
integer, intent(in) :: ia(:),ja(:)
integer, intent(inout) :: nza
psblas-dev: README base/comm/psb_dgather.f90 base/comm/psb_dhalo.f90 base/comm/psb_dovrl.f90 base/comm/psb_dscatter.F90 base/comm/psb_ihalo.f90 base/comm/psb_zgather.f90 base/comm/psb_zhalo.f90 base/comm/psb_zovrl.f90 base/comm/psb_zscatter.F90 base/internals/psi_dswapdata.F90 base/internals/psi_dswaptran.F90 base/internals/psi_iswapdata.F90 base/internals/psi_iswaptran.F90 base/internals/psi_zswapdata.F90 base/internals/psi_zswaptran.F90 base/modules/Makefile base/modules/cutil.c base/modules/fakempi.c base/modules/psb_comm_mod.f90 base/modules/psb_const_mod.f90 base/modules/psb_desc_type.f90 base/modules/psb_error_mod.F90 base/modules/psb_inter_desc_type.f90 base/modules/psb_penv_mod.F90 base/modules/psb_psblas_mod.f90 base/modules/psb_realloc_mod.F90 base/modules/psb_serial_mod.f90 base/modules/psb_sort_mod.f90 base/modules/psb_spmat_type.f90 base/modules/psb_spsb_mod.f90 base/modules/psb_tools_mod.f90 base/modules/psi_mod.f90 base/modules/psi_serial_mod.f90 base/psblas/psb_damax.f90 base/psblas/psb_dasum.f90 base/psblas/psb_daxpby.f90 base/psblas/psb_ddot.f90 base/psblas/psb_dnrm2.f90 base/psblas/psb_dnrmi.f90 base/psblas/psb_dspmm.f90 base/psblas/psb_dspsm.f90 base/psblas/psb_zamax.f90 base/psblas/psb_zasum.f90 base/psblas/psb_zaxpby.f90 base/psblas/psb_zdot.f90 base/psblas/psb_znrm2.f90 base/psblas/psb_znrmi.f90 base/psblas/psb_zspmm.f90 base/psblas/psb_zspsm.f90 base/serial/aux/dasr.f90 base/serial/aux/dasrx.f90 base/serial/aux/dmsort_dw.f90 base/serial/aux/dmsort_up.f90 base/serial/aux/dmsr.f90 base/serial/aux/dmsrx.f90 base/serial/aux/dsr.f90 base/serial/aux/dsrx.f90 base/serial/aux/zacmp_mod.f90 base/serial/aux/zalcmp_mod.f90 base/serial/aux/zalsr.f90 base/serial/aux/zalsrx.f90 base/serial/aux/zamsort_dw.f90 base/serial/aux/zamsort_up.f90 base/serial/aux/zamsr.f90 base/serial/aux/zamsrx.f90 base/serial/aux/zasr.f90 base/serial/aux/zasrx.f90 base/serial/aux/zlcmp_mod.f90 base/serial/aux/zlsr.f90 base/serial/aux/zlsrx.f90 base/serial/coo/dcoomm.f base/serial/coo/dcoomv.f base/serial/coo/dcoonrmi.f base/serial/coo/dcoorws.f base/serial/coo/dcoosm.f base/serial/coo/dcoosv.f base/serial/coo/zcoomm.f base/serial/coo/zcoomv.f base/serial/coo/zcoonrmi.f base/serial/coo/zcoorws.f base/serial/coo/zcoosm.f base/serial/coo/zcoosv.f base/serial/csr/dcrnrmi.f base/serial/csr/dcsrck.f base/serial/csr/dcsrmm.f base/serial/csr/dcsrmv.f base/serial/csr/dcsrmv2.f base/serial/csr/dcsrmv3.f base/serial/csr/dcsrmv4.f base/serial/csr/dcsrrws.f base/serial/csr/dcsrsm.f base/serial/csr/dcsrsv.f base/serial/csr/zcrnrmi.f base/serial/csr/zcsrck.f base/serial/csr/zcsrmm.f base/serial/csr/zcsrrws.f base/serial/csr/zcsrsm.f base/serial/csr/zsrmv.f base/serial/csr/zsrsv.f base/serial/dp/dcoco.f base/serial/dp/dcocr.f base/serial/dp/dcrco.f base/serial/dp/dcrcr.f base/serial/dp/dcrjd.f base/serial/dp/dcsrp1.f base/serial/dp/dcsrrp.f base/serial/dp/dgind_tri.f base/serial/dp/dgindex.f base/serial/dp/djadrp.f base/serial/dp/djadrp1.f base/serial/dp/djdco.f base/serial/dp/djdcox.f base/serial/dp/dvtfg.f base/serial/dp/reordvn.f base/serial/dp/zcoco.f base/serial/dp/zcocr.f base/serial/dp/zcrco.f base/serial/dp/zcrcr.f base/serial/dp/zcrjd.f base/serial/dp/zgind_tri.f base/serial/dp/zgindex.f base/serial/f77/daxpby.f base/serial/f77/dcsmm.f base/serial/f77/dcsnmi.f base/serial/f77/dcsrp.f base/serial/f77/dcsrws.f base/serial/f77/dcssm.f base/serial/f77/dgelp.f base/serial/f77/dlpupd.f base/serial/f77/dswmm.f base/serial/f77/dswsm.f base/serial/f77/smmp.f base/serial/f77/zaxpby.f base/serial/f77/zcsmm.f base/serial/f77/zcsnmi.f base/serial/f77/zcsrws.f base/serial/f77/zcssm.f base/serial/f77/zgelp.f base/serial/f77/zlpupd.f base/serial/f77/zswmm.f base/serial/f77/zswsm.f base/serial/jad/djadmm.f base/serial/jad/djadmv.f base/serial/jad/djadmv2.f base/serial/jad/djadmv3.f base/serial/jad/djadmv4.f base/serial/jad/djadnr.f base/serial/jad/djadrws.f base/serial/jad/djadsm.f base/serial/jad/djadsv.f base/serial/jad/djdnrmi.f base/serial/jad/djdrws.f base/serial/psb_dcoins.f90 base/serial/psb_dcsmm.f90 base/serial/psb_dcsmv.f90 base/serial/psb_dcsnmi.f90 base/serial/psb_dcsrp.f90 base/serial/psb_dcsrws.f90 base/serial/psb_dcssm.f90 base/serial/psb_dcssv.f90 base/serial/psb_dgelp.f90 base/serial/psb_dneigh.f90 base/serial/psb_dnumbmm.f90 base/serial/psb_dspcnv.f90 base/serial/psb_dspgetrow.f90 base/serial/psb_dspgtdiag.f90 base/serial/psb_dspscal.f90 base/serial/psb_dsymbmm.f90 base/serial/psb_getrow_mod.f90 base/serial/psb_regen_mod.f90 base/serial/psb_update_mod.f90 base/serial/psb_zcoins.f90 base/serial/psb_zcsmm.f90 base/serial/psb_zcsmv.f90 base/serial/psb_zcsnmi.f90 base/serial/psb_zcsrp.f90 base/serial/psb_zcsrws.f90 base/serial/psb_zcssm.f90 base/serial/psb_zcssv.f90 base/serial/psb_zgelp.f90 base/serial/psb_zneigh.f90 base/serial/psb_znumbmm.f90 base/serial/psb_zspcnv.f90 base/serial/psb_zspgetrow.f90 base/serial/psb_zspgtdiag.f90 base/serial/psb_zspscal.f90 base/serial/psb_zsymbmm.f90 base/tools/psb_dallc.f90 base/tools/psb_dasb.f90 base/tools/psb_dfree.f90 base/tools/psb_dins.f90 base/tools/psb_dsphalo.F90 base/tools/psb_dspins.f90 base/tools/psb_zallc.f90 base/tools/psb_zasb.f90 base/tools/psb_zfree.f90 base/tools/psb_zins.f90 base/tools/psb_zsphalo.F90 base/tools/psb_zspins.f90 docs/pdf/datastruct.tex docs/pdf/penv.tex docs/userguide.pdf krylov/psb_dbicg.f90 krylov/psb_dcg.f90 krylov/psb_dcgs.f90 krylov/psb_dcgstab.F90 krylov/psb_dcgstabl.f90 krylov/psb_drgmres.f90 krylov/psb_krylov_mod.f90 krylov/psb_zbicg.f90 krylov/psb_zcg.f90 krylov/psb_zcgs.f90 krylov/psb_zcgstab.f90 krylov/psb_zcgstabl.f90 krylov/psb_zrgmres.f90 prec/psb_dbjac_aply.f90 prec/psb_dbjac_bld.f90 prec/psb_dgprec_aply.f90 prec/psb_dilu_fct.f90 prec/psb_dprc_aply.f90 prec/psb_dprecset.f90 prec/psb_prec_mod.f90 prec/psb_prec_type.f90 prec/psb_zbjac_aply.f90 prec/psb_zbjac_bld.f90 prec/psb_zgprec_aply.f90 prec/psb_zilu_fct.f90 prec/psb_zprc_aply.f90 prec/psb_zprecset.f90 test/fileread/df_sample.f90 test/fileread/getp.f90 test/fileread/zf_sample.f90 test/pargen/ppde.f90 test/util/Makefile util/psb_hbio_mod.f90 util/psb_mat_dist_mod.f90 util/psb_metispart_mod.F90 util/psb_mmio_mod.f90 util/psb_read_mat_mod.f90 Merged kind type names changes from r:2905:2906 in branches/psblas-2.2-maint.
17 years ago
complex(psb_dpk_), intent(in) :: val(:)
complex(psb_dpk_), intent(inout) :: aspk(:)
integer, intent(out) :: info
integer, intent(in), optional :: ng,gtl(:)
integer :: i,ir,ic
if (present(gtl)) then
if (.not.present(ng)) then
info = -1
return
endif
if ((nza > nzl)) then
do i=1, nz
nza = nza + 1
if (nza>maxsz) then
write(0,*) 'Out of bounds in INNER_UPD ',nza,maxsz
info = -71
return
endif
aspk(nza) = val(i)
end do
else
do i=1, nz
ir = ia(i)
ic = ja(i)
if ((ir >=1).and.(ir<=ng).and.(ic>=1).and.(ic<=ng)) then
ir = gtl(ir)
ic = gtl(ic)
if ((ir >=imin).and.(ir<=imax).and.(ic>=jmin).and.(ic<=jmax)) then
nza = nza + 1
if (nza>maxsz) then
info = -72
return
endif
aspk(nza) = val(i)
end if
end if
end do
end if
else
if ((nza >= nzl)) then
do i=1, nz
nza = nza + 1
if (nza>maxsz) then
info = -73
return
endif
aspk(nza) = val(i)
end do
else
do i=1, nz
ir = ia(i)
ic = ja(i)
if ((ir >=imin).and.(ir<=imax).and.(ic>=jmin).and.(ic<=jmax)) then
nza = nza + 1
if (nza>maxsz) then
info = -74
return
endif
aspk(nza) = val(i)
end if
end do
end if
end if
end subroutine psb_inner_upd
subroutine psb_inner_ins(nz,ia,ja,val,nza,ia1,ia2,aspk,maxsz,&
& imin,imax,jmin,jmax,info,gtl,ng)
implicit none
integer, intent(in) :: nz, imin,imax,jmin,jmax,maxsz
integer, intent(in) :: ia(:),ja(:)
integer, intent(inout) :: nza,ia1(:),ia2(:)
psblas-dev: README base/comm/psb_dgather.f90 base/comm/psb_dhalo.f90 base/comm/psb_dovrl.f90 base/comm/psb_dscatter.F90 base/comm/psb_ihalo.f90 base/comm/psb_zgather.f90 base/comm/psb_zhalo.f90 base/comm/psb_zovrl.f90 base/comm/psb_zscatter.F90 base/internals/psi_dswapdata.F90 base/internals/psi_dswaptran.F90 base/internals/psi_iswapdata.F90 base/internals/psi_iswaptran.F90 base/internals/psi_zswapdata.F90 base/internals/psi_zswaptran.F90 base/modules/Makefile base/modules/cutil.c base/modules/fakempi.c base/modules/psb_comm_mod.f90 base/modules/psb_const_mod.f90 base/modules/psb_desc_type.f90 base/modules/psb_error_mod.F90 base/modules/psb_inter_desc_type.f90 base/modules/psb_penv_mod.F90 base/modules/psb_psblas_mod.f90 base/modules/psb_realloc_mod.F90 base/modules/psb_serial_mod.f90 base/modules/psb_sort_mod.f90 base/modules/psb_spmat_type.f90 base/modules/psb_spsb_mod.f90 base/modules/psb_tools_mod.f90 base/modules/psi_mod.f90 base/modules/psi_serial_mod.f90 base/psblas/psb_damax.f90 base/psblas/psb_dasum.f90 base/psblas/psb_daxpby.f90 base/psblas/psb_ddot.f90 base/psblas/psb_dnrm2.f90 base/psblas/psb_dnrmi.f90 base/psblas/psb_dspmm.f90 base/psblas/psb_dspsm.f90 base/psblas/psb_zamax.f90 base/psblas/psb_zasum.f90 base/psblas/psb_zaxpby.f90 base/psblas/psb_zdot.f90 base/psblas/psb_znrm2.f90 base/psblas/psb_znrmi.f90 base/psblas/psb_zspmm.f90 base/psblas/psb_zspsm.f90 base/serial/aux/dasr.f90 base/serial/aux/dasrx.f90 base/serial/aux/dmsort_dw.f90 base/serial/aux/dmsort_up.f90 base/serial/aux/dmsr.f90 base/serial/aux/dmsrx.f90 base/serial/aux/dsr.f90 base/serial/aux/dsrx.f90 base/serial/aux/zacmp_mod.f90 base/serial/aux/zalcmp_mod.f90 base/serial/aux/zalsr.f90 base/serial/aux/zalsrx.f90 base/serial/aux/zamsort_dw.f90 base/serial/aux/zamsort_up.f90 base/serial/aux/zamsr.f90 base/serial/aux/zamsrx.f90 base/serial/aux/zasr.f90 base/serial/aux/zasrx.f90 base/serial/aux/zlcmp_mod.f90 base/serial/aux/zlsr.f90 base/serial/aux/zlsrx.f90 base/serial/coo/dcoomm.f base/serial/coo/dcoomv.f base/serial/coo/dcoonrmi.f base/serial/coo/dcoorws.f base/serial/coo/dcoosm.f base/serial/coo/dcoosv.f base/serial/coo/zcoomm.f base/serial/coo/zcoomv.f base/serial/coo/zcoonrmi.f base/serial/coo/zcoorws.f base/serial/coo/zcoosm.f base/serial/coo/zcoosv.f base/serial/csr/dcrnrmi.f base/serial/csr/dcsrck.f base/serial/csr/dcsrmm.f base/serial/csr/dcsrmv.f base/serial/csr/dcsrmv2.f base/serial/csr/dcsrmv3.f base/serial/csr/dcsrmv4.f base/serial/csr/dcsrrws.f base/serial/csr/dcsrsm.f base/serial/csr/dcsrsv.f base/serial/csr/zcrnrmi.f base/serial/csr/zcsrck.f base/serial/csr/zcsrmm.f base/serial/csr/zcsrrws.f base/serial/csr/zcsrsm.f base/serial/csr/zsrmv.f base/serial/csr/zsrsv.f base/serial/dp/dcoco.f base/serial/dp/dcocr.f base/serial/dp/dcrco.f base/serial/dp/dcrcr.f base/serial/dp/dcrjd.f base/serial/dp/dcsrp1.f base/serial/dp/dcsrrp.f base/serial/dp/dgind_tri.f base/serial/dp/dgindex.f base/serial/dp/djadrp.f base/serial/dp/djadrp1.f base/serial/dp/djdco.f base/serial/dp/djdcox.f base/serial/dp/dvtfg.f base/serial/dp/reordvn.f base/serial/dp/zcoco.f base/serial/dp/zcocr.f base/serial/dp/zcrco.f base/serial/dp/zcrcr.f base/serial/dp/zcrjd.f base/serial/dp/zgind_tri.f base/serial/dp/zgindex.f base/serial/f77/daxpby.f base/serial/f77/dcsmm.f base/serial/f77/dcsnmi.f base/serial/f77/dcsrp.f base/serial/f77/dcsrws.f base/serial/f77/dcssm.f base/serial/f77/dgelp.f base/serial/f77/dlpupd.f base/serial/f77/dswmm.f base/serial/f77/dswsm.f base/serial/f77/smmp.f base/serial/f77/zaxpby.f base/serial/f77/zcsmm.f base/serial/f77/zcsnmi.f base/serial/f77/zcsrws.f base/serial/f77/zcssm.f base/serial/f77/zgelp.f base/serial/f77/zlpupd.f base/serial/f77/zswmm.f base/serial/f77/zswsm.f base/serial/jad/djadmm.f base/serial/jad/djadmv.f base/serial/jad/djadmv2.f base/serial/jad/djadmv3.f base/serial/jad/djadmv4.f base/serial/jad/djadnr.f base/serial/jad/djadrws.f base/serial/jad/djadsm.f base/serial/jad/djadsv.f base/serial/jad/djdnrmi.f base/serial/jad/djdrws.f base/serial/psb_dcoins.f90 base/serial/psb_dcsmm.f90 base/serial/psb_dcsmv.f90 base/serial/psb_dcsnmi.f90 base/serial/psb_dcsrp.f90 base/serial/psb_dcsrws.f90 base/serial/psb_dcssm.f90 base/serial/psb_dcssv.f90 base/serial/psb_dgelp.f90 base/serial/psb_dneigh.f90 base/serial/psb_dnumbmm.f90 base/serial/psb_dspcnv.f90 base/serial/psb_dspgetrow.f90 base/serial/psb_dspgtdiag.f90 base/serial/psb_dspscal.f90 base/serial/psb_dsymbmm.f90 base/serial/psb_getrow_mod.f90 base/serial/psb_regen_mod.f90 base/serial/psb_update_mod.f90 base/serial/psb_zcoins.f90 base/serial/psb_zcsmm.f90 base/serial/psb_zcsmv.f90 base/serial/psb_zcsnmi.f90 base/serial/psb_zcsrp.f90 base/serial/psb_zcsrws.f90 base/serial/psb_zcssm.f90 base/serial/psb_zcssv.f90 base/serial/psb_zgelp.f90 base/serial/psb_zneigh.f90 base/serial/psb_znumbmm.f90 base/serial/psb_zspcnv.f90 base/serial/psb_zspgetrow.f90 base/serial/psb_zspgtdiag.f90 base/serial/psb_zspscal.f90 base/serial/psb_zsymbmm.f90 base/tools/psb_dallc.f90 base/tools/psb_dasb.f90 base/tools/psb_dfree.f90 base/tools/psb_dins.f90 base/tools/psb_dsphalo.F90 base/tools/psb_dspins.f90 base/tools/psb_zallc.f90 base/tools/psb_zasb.f90 base/tools/psb_zfree.f90 base/tools/psb_zins.f90 base/tools/psb_zsphalo.F90 base/tools/psb_zspins.f90 docs/pdf/datastruct.tex docs/pdf/penv.tex docs/userguide.pdf krylov/psb_dbicg.f90 krylov/psb_dcg.f90 krylov/psb_dcgs.f90 krylov/psb_dcgstab.F90 krylov/psb_dcgstabl.f90 krylov/psb_drgmres.f90 krylov/psb_krylov_mod.f90 krylov/psb_zbicg.f90 krylov/psb_zcg.f90 krylov/psb_zcgs.f90 krylov/psb_zcgstab.f90 krylov/psb_zcgstabl.f90 krylov/psb_zrgmres.f90 prec/psb_dbjac_aply.f90 prec/psb_dbjac_bld.f90 prec/psb_dgprec_aply.f90 prec/psb_dilu_fct.f90 prec/psb_dprc_aply.f90 prec/psb_dprecset.f90 prec/psb_prec_mod.f90 prec/psb_prec_type.f90 prec/psb_zbjac_aply.f90 prec/psb_zbjac_bld.f90 prec/psb_zgprec_aply.f90 prec/psb_zilu_fct.f90 prec/psb_zprc_aply.f90 prec/psb_zprecset.f90 test/fileread/df_sample.f90 test/fileread/getp.f90 test/fileread/zf_sample.f90 test/pargen/ppde.f90 test/util/Makefile util/psb_hbio_mod.f90 util/psb_mat_dist_mod.f90 util/psb_metispart_mod.F90 util/psb_mmio_mod.f90 util/psb_read_mat_mod.f90 Merged kind type names changes from r:2905:2906 in branches/psblas-2.2-maint.
17 years ago
complex(psb_dpk_), intent(in) :: val(:)
complex(psb_dpk_), intent(inout) :: aspk(:)
integer, intent(out) :: info
integer, intent(in), optional :: ng,gtl(:)
integer :: i,ir,ic
info = 0
if (present(gtl)) then
if (.not.present(ng)) then
info = -1
return
endif
do i=1, nz
ir = ia(i)
ic = ja(i)
if ((ir >=1).and.(ir<=ng).and.(ic>=1).and.(ic<=ng)) then
ir = gtl(ir)
ic = gtl(ic)
if ((ir >=imin).and.(ir<=imax).and.(ic>=jmin).and.(ic<=jmax)) then
nza = nza + 1
if (nza > maxsz) then
info = -91
return
endif
ia1(nza) = ir
ia2(nza) = ic
aspk(nza) = val(i)
end if
end if
end do
else
do i=1, nz
ir = ia(i)
ic = ja(i)
if ((ir >=imin).and.(ir<=imax).and.(ic>=jmin).and.(ic<=jmax)) then
nza = nza + 1
if (nza > maxsz) then
info = -92
return
endif
ia1(nza) = ir
ia2(nza) = ic
aspk(nza) = val(i)
end if
end do
end if
end subroutine psb_inner_ins
end subroutine psb_zcoins