|
|
|
@ -296,10 +296,8 @@ contains
|
|
|
|
|
integer :: x,y,z,ia,indx_owner
|
|
|
|
|
integer :: np, iam
|
|
|
|
|
integer :: element
|
|
|
|
|
integer :: nv, inv
|
|
|
|
|
integer, allocatable :: irow(:),icol(:)
|
|
|
|
|
real(psb_dpk_), allocatable :: val(:)
|
|
|
|
|
integer, allocatable :: prv(:)
|
|
|
|
|
! deltah dimension of each grid cell
|
|
|
|
|
! deltat discretization time
|
|
|
|
|
real(psb_dpk_) :: deltah
|
|
|
|
@ -329,10 +327,10 @@ contains
|
|
|
|
|
if(iam == psb_root_) write(0,'("Generating Matrix (size=",i0x,")...")')n
|
|
|
|
|
|
|
|
|
|
call psb_cdall(ictxt,desc_a,info,mg=n,parts=parts)
|
|
|
|
|
call psb_spall(a,desc_a,info,nnz=nnz)
|
|
|
|
|
if (info == 0) call psb_spall(a,desc_a,info,nnz=nnz)
|
|
|
|
|
! define rhs from boundary conditions; also build initial guess
|
|
|
|
|
call psb_geall(b,desc_a,info)
|
|
|
|
|
call psb_geall(xv,desc_a,info)
|
|
|
|
|
if (info == 0) call psb_geall(b,desc_a,info)
|
|
|
|
|
if (info == 0) call psb_geall(xv,desc_a,info)
|
|
|
|
|
if (info /= 0) then
|
|
|
|
|
info=4010
|
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
@ -344,7 +342,7 @@ contains
|
|
|
|
|
! a bunch of rows per call.
|
|
|
|
|
!
|
|
|
|
|
allocate(val(20*nbmax),irow(20*nbmax),&
|
|
|
|
|
&icol(20*nbmax),prv(np),stat=info)
|
|
|
|
|
&icol(20*nbmax),stat=info)
|
|
|
|
|
if (info /= 0 ) then
|
|
|
|
|
info=4000
|
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
@ -359,10 +357,8 @@ contains
|
|
|
|
|
! distribution.
|
|
|
|
|
|
|
|
|
|
do glob_row = 1, n
|
|
|
|
|
call parts(glob_row,n,np,prv,nv)
|
|
|
|
|
do inv = 1, nv
|
|
|
|
|
indx_owner = prv(inv)
|
|
|
|
|
if (indx_owner == iam) then
|
|
|
|
|
! Figure out which rows are local to the current process:
|
|
|
|
|
if (psb_is_owned(glob_row,desc_a)) then
|
|
|
|
|
! local matrix pointer
|
|
|
|
|
element=1
|
|
|
|
|
! compute gridpoint coordinates
|
|
|
|
@ -496,7 +492,6 @@ contains
|
|
|
|
|
if(info /= 0) exit
|
|
|
|
|
end if
|
|
|
|
|
end do
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
call psb_barrier(ictxt)
|
|
|
|
|
t2 = psb_wtime()-t1
|
|
|
|
@ -525,7 +520,7 @@ contains
|
|
|
|
|
call psb_amx(ictxt,tasb)
|
|
|
|
|
|
|
|
|
|
if(iam == psb_root_) then
|
|
|
|
|
write(*,'("The matrix has been generated and assembeld in ",a3," format.")')&
|
|
|
|
|
write(*,'("The matrix has been generated and assembled in ",a3," format.")')&
|
|
|
|
|
& a%fida(1:3)
|
|
|
|
|
write(*,'("-pspins time : ",es10.4)')tins
|
|
|
|
|
write(*,'("-insert time : ",es10.4)')t2
|
|
|
|
|