From 0814492adc068c211801ce70e8eff4e5056e6655 Mon Sep 17 00:00:00 2001 From: sfilippone Date: Tue, 5 May 2026 15:33:45 +0200 Subject: [PATCH] Mods jac solver --- amgprec/impl/solver/amg_c_jac_solver_bld.f90 | 4 ++++ amgprec/impl/solver/amg_c_l1_jac_solver_bld.f90 | 4 ++++ amgprec/impl/solver/amg_d_jac_solver_bld.f90 | 4 ++++ amgprec/impl/solver/amg_d_l1_jac_solver_bld.f90 | 4 ++++ amgprec/impl/solver/amg_s_jac_solver_bld.f90 | 4 ++++ amgprec/impl/solver/amg_s_l1_jac_solver_bld.f90 | 4 ++++ amgprec/impl/solver/amg_z_jac_solver_bld.f90 | 4 ++++ amgprec/impl/solver/amg_z_l1_jac_solver_bld.f90 | 4 ++++ 8 files changed, 32 insertions(+) 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)