diff --git a/amgprec/amg_c_prec_type.f90 b/amgprec/amg_c_prec_type.f90 index 6cb59939..0359efdd 100644 --- a/amgprec/amg_c_prec_type.f90 +++ b/amgprec/amg_c_prec_type.f90 @@ -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 diff --git a/amgprec/amg_d_prec_type.f90 b/amgprec/amg_d_prec_type.f90 index 4ff41d15..1a9a932e 100644 --- a/amgprec/amg_d_prec_type.f90 +++ b/amgprec/amg_d_prec_type.f90 @@ -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 diff --git a/amgprec/amg_s_prec_type.f90 b/amgprec/amg_s_prec_type.f90 index 68ff409b..ea87bbf3 100644 --- a/amgprec/amg_s_prec_type.f90 +++ b/amgprec/amg_s_prec_type.f90 @@ -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 diff --git a/amgprec/amg_z_prec_type.f90 b/amgprec/amg_z_prec_type.f90 index 7bc73992..9d44ca06 100644 --- a/amgprec/amg_z_prec_type.f90 +++ b/amgprec/amg_z_prec_type.f90 @@ -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 diff --git a/amgprec/impl/solver/amg_c_jac_solver_bld.f90 b/amgprec/impl/solver/amg_c_jac_solver_bld.f90 index d6ab3f0b..9fbcd717 100644 --- a/amgprec/impl/solver/amg_c_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_c_jac_solver_bld.f90 @@ -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) diff --git a/amgprec/impl/solver/amg_c_l1_jac_solver_bld.f90 b/amgprec/impl/solver/amg_c_l1_jac_solver_bld.f90 index b5665ef4..1d0d2cf1 100644 --- a/amgprec/impl/solver/amg_c_l1_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_c_l1_jac_solver_bld.f90 @@ -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) diff --git a/amgprec/impl/solver/amg_d_jac_solver_bld.f90 b/amgprec/impl/solver/amg_d_jac_solver_bld.f90 index 3e5e5b38..23a0b190 100644 --- a/amgprec/impl/solver/amg_d_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_d_jac_solver_bld.f90 @@ -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) diff --git a/amgprec/impl/solver/amg_d_l1_jac_solver_bld.f90 b/amgprec/impl/solver/amg_d_l1_jac_solver_bld.f90 index cbe0adf3..411501ec 100644 --- a/amgprec/impl/solver/amg_d_l1_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_d_l1_jac_solver_bld.f90 @@ -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) diff --git a/amgprec/impl/solver/amg_s_jac_solver_bld.f90 b/amgprec/impl/solver/amg_s_jac_solver_bld.f90 index 1ffd0f53..1afadf09 100644 --- a/amgprec/impl/solver/amg_s_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_s_jac_solver_bld.f90 @@ -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) diff --git a/amgprec/impl/solver/amg_s_l1_jac_solver_bld.f90 b/amgprec/impl/solver/amg_s_l1_jac_solver_bld.f90 index d87da5fd..ad82fb3b 100644 --- a/amgprec/impl/solver/amg_s_l1_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_s_l1_jac_solver_bld.f90 @@ -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) diff --git a/amgprec/impl/solver/amg_z_jac_solver_bld.f90 b/amgprec/impl/solver/amg_z_jac_solver_bld.f90 index 172200ac..e84a019b 100644 --- a/amgprec/impl/solver/amg_z_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_z_jac_solver_bld.f90 @@ -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) diff --git a/amgprec/impl/solver/amg_z_l1_jac_solver_bld.f90 b/amgprec/impl/solver/amg_z_l1_jac_solver_bld.f90 index e9d7955c..391cee83 100644 --- a/amgprec/impl/solver/amg_z_l1_jac_solver_bld.f90 +++ b/amgprec/impl/solver/amg_z_l1_jac_solver_bld.f90 @@ -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) diff --git a/samples/advanced/pdegen/amg_d_genpde_mod.F90 b/samples/advanced/pdegen/amg_d_genpde_mod.F90 index 604d4974..7bf4b128 100644 --- a/samples/advanced/pdegen/amg_d_genpde_mod.F90 +++ b/samples/advanced/pdegen/amg_d_genpde_mod.F90 @@ -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 diff --git a/samples/advanced/pdegen/amg_s_genpde_mod.F90 b/samples/advanced/pdegen/amg_s_genpde_mod.F90 index c481fc07..bc99530d 100644 --- a/samples/advanced/pdegen/amg_s_genpde_mod.F90 +++ b/samples/advanced/pdegen/amg_s_genpde_mod.F90 @@ -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 diff --git a/samples/simple/pdegen/amg_dpde_mod.f90 b/samples/simple/pdegen/amg_dpde_mod.f90 index 5bfe79aa..e6883248 100644 --- a/samples/simple/pdegen/amg_dpde_mod.f90 +++ b/samples/simple/pdegen/amg_dpde_mod.f90 @@ -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 ! diff --git a/samples/simple/pdegen/amg_spde_mod.f90 b/samples/simple/pdegen/amg_spde_mod.f90 index 78907603..d2d55447 100644 --- a/samples/simple/pdegen/amg_spde_mod.f90 +++ b/samples/simple/pdegen/amg_spde_mod.f90 @@ -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 !