mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
Multiple fixes, plus samples matrix generation
This commit is contained in:
@@ -636,6 +636,11 @@ contains
|
||||
if (allocated(prec%precv)) then
|
||||
do i=1,size(prec%precv)
|
||||
call prec%precv(i)%free(info)
|
||||
if (psb_errstatus_fatal()) then
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
end do
|
||||
deallocate(prec%precv,stat=info)
|
||||
end if
|
||||
|
||||
@@ -636,6 +636,11 @@ contains
|
||||
if (allocated(prec%precv)) then
|
||||
do i=1,size(prec%precv)
|
||||
call prec%precv(i)%free(info)
|
||||
if (psb_errstatus_fatal()) then
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
end do
|
||||
deallocate(prec%precv,stat=info)
|
||||
end if
|
||||
|
||||
@@ -636,6 +636,11 @@ contains
|
||||
if (allocated(prec%precv)) then
|
||||
do i=1,size(prec%precv)
|
||||
call prec%precv(i)%free(info)
|
||||
if (psb_errstatus_fatal()) then
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
end do
|
||||
deallocate(prec%precv,stat=info)
|
||||
end if
|
||||
|
||||
@@ -636,6 +636,11 @@ contains
|
||||
if (allocated(prec%precv)) then
|
||||
do i=1,size(prec%precv)
|
||||
call prec%precv(i)%free(info)
|
||||
if (psb_errstatus_fatal()) then
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
end do
|
||||
deallocate(prec%precv,stat=info)
|
||||
end if
|
||||
|
||||
@@ -100,6 +100,10 @@ subroutine amg_c_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = cone/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -103,6 +103,10 @@ subroutine amg_c_l1_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = cone/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -100,6 +100,10 @@ subroutine amg_d_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = done/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -103,6 +103,10 @@ subroutine amg_d_l1_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = done/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -100,6 +100,10 @@ subroutine amg_s_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = sone/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -103,6 +103,10 @@ subroutine amg_s_l1_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = sone/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -100,6 +100,10 @@ subroutine amg_z_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = zone/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -103,6 +103,10 @@ subroutine amg_z_l1_jac_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
||||
sv%d(i) = zone/sv%d(i)
|
||||
end if
|
||||
end do
|
||||
if (allocated(sv%dv)) then
|
||||
call sv%dv%free(info)
|
||||
deallocate(sv%dv)
|
||||
end if
|
||||
allocate(sv%dv,stat=info)
|
||||
if (info == psb_success_) then
|
||||
call sv%dv%bld(sv%d)
|
||||
|
||||
@@ -412,9 +412,9 @@ contains
|
||||
! compute gridpoint coordinates
|
||||
call idx2ijk(ix,iy,iz,glob_row,idim,idim,idim)
|
||||
! x, y, z coordinates
|
||||
x = (ix-1)*deltah
|
||||
y = (iy-1)*deltah
|
||||
z = (iz-1)*deltah
|
||||
x = (ix)*deltah
|
||||
y = (iy)*deltah
|
||||
z = (iz)*deltah
|
||||
zt(k) = f_(x,y,z)
|
||||
! internal point: build discretization
|
||||
!
|
||||
@@ -875,8 +875,8 @@ contains
|
||||
! compute gridpoint coordinates
|
||||
call idx2ijk(ix,iy,glob_row,idim,idim)
|
||||
! x, y coordinates
|
||||
x = (ix-1)*deltah
|
||||
y = (iy-1)*deltah
|
||||
x = (ix)*deltah
|
||||
y = (iy)*deltah
|
||||
|
||||
zt(k) = f_(x,y)
|
||||
! internal point: build discretization
|
||||
|
||||
@@ -412,9 +412,9 @@ contains
|
||||
! compute gridpoint coordinates
|
||||
call idx2ijk(ix,iy,iz,glob_row,idim,idim,idim)
|
||||
! x, y, z coordinates
|
||||
x = (ix-1)*deltah
|
||||
y = (iy-1)*deltah
|
||||
z = (iz-1)*deltah
|
||||
x = (ix)*deltah
|
||||
y = (iy)*deltah
|
||||
z = (iz)*deltah
|
||||
zt(k) = f_(x,y,z)
|
||||
! internal point: build discretization
|
||||
!
|
||||
@@ -875,8 +875,8 @@ contains
|
||||
! compute gridpoint coordinates
|
||||
call idx2ijk(ix,iy,glob_row,idim,idim)
|
||||
! x, y coordinates
|
||||
x = (ix-1)*deltah
|
||||
y = (iy-1)*deltah
|
||||
x = (ix)*deltah
|
||||
y = (iy)*deltah
|
||||
|
||||
zt(k) = f_(x,y)
|
||||
! internal point: build discretization
|
||||
|
||||
@@ -144,7 +144,7 @@ contains
|
||||
f_ => d_null_func_3d
|
||||
end if
|
||||
|
||||
deltah = 1.d0/(idim+1)
|
||||
deltah = 1.d0/(idim+2)
|
||||
sqdeltah = deltah*deltah
|
||||
deltah2 = 2.0_psb_dpk_* deltah
|
||||
|
||||
@@ -369,9 +369,9 @@ contains
|
||||
! compute gridpoint coordinates
|
||||
call idx2ijk(ix,iy,iz,glob_row,idim,idim,idim)
|
||||
! x, y, z coordinates
|
||||
x = (ix-1)*deltah
|
||||
y = (iy-1)*deltah
|
||||
z = (iz-1)*deltah
|
||||
x = (ix)*deltah
|
||||
y = (iy)*deltah
|
||||
z = (iz)*deltah
|
||||
zt(k) = f_(x,y,z)
|
||||
! internal point: build discretization
|
||||
!
|
||||
|
||||
@@ -144,7 +144,7 @@ contains
|
||||
f_ => s_null_func_3d
|
||||
end if
|
||||
|
||||
deltah = 1.d0/(idim+1)
|
||||
deltah = 1.d0/(idim+2)
|
||||
sqdeltah = deltah*deltah
|
||||
deltah2 = 2.0_psb_spk_* deltah
|
||||
|
||||
@@ -369,9 +369,9 @@ contains
|
||||
! compute gridpoint coordinates
|
||||
call idx2ijk(ix,iy,iz,glob_row,idim,idim,idim)
|
||||
! x, y, z coordinates
|
||||
x = (ix-1)*deltah
|
||||
y = (iy-1)*deltah
|
||||
z = (iz-1)*deltah
|
||||
x = (ix)*deltah
|
||||
y = (iy)*deltah
|
||||
z = (iz)*deltah
|
||||
zt(k) = f_(x,y,z)
|
||||
! internal point: build discretization
|
||||
!
|
||||
|
||||
Reference in New Issue
Block a user