diff --git a/mlprec/impl/solver/mld_c_base_solver_bld.f90 b/mlprec/impl/solver/mld_c_base_solver_bld.f90 index 3cd33de6..6f68f361 100644 --- a/mlprec/impl/solver/mld_c_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_base_solver_bld.f90 @@ -42,7 +42,7 @@ subroutine mld_c_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_c_diag_solver_bld.f90 b/mlprec/impl/solver/mld_c_diag_solver_bld.f90 index d0e5c19f..d17d125b 100644 --- a/mlprec/impl/solver/mld_c_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_diag_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_c_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_c_gs_solver_bld.f90 b/mlprec/impl/solver/mld_c_gs_solver_bld.f90 index 2103ab0f..37117275 100644 --- a/mlprec/impl/solver/mld_c_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_gs_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_c_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 index 1d1f2de8..7a4c7936 100644 --- a/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_c_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 index b4693191..028ed32c 100644 --- a/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 @@ -48,7 +48,7 @@ ! Arguments type(psb_cspmat_type) :: c type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_d_base_solver_bld.f90 b/mlprec/impl/solver/mld_d_base_solver_bld.f90 index b511aec7..ac8b1231 100644 --- a/mlprec/impl/solver/mld_d_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_base_solver_bld.f90 @@ -42,7 +42,7 @@ subroutine mld_d_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_d_diag_solver_bld.f90 b/mlprec/impl/solver/mld_d_diag_solver_bld.f90 index 8b7378bb..c0be2077 100644 --- a/mlprec/impl/solver/mld_d_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_diag_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_d_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_d_gs_solver_bld.f90 b/mlprec/impl/solver/mld_d_gs_solver_bld.f90 index c2329e9c..5357d294 100644 --- a/mlprec/impl/solver/mld_d_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_gs_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_d_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 index ba28539f..c620dee0 100644 --- a/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_d_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 index b0877e84..41a4f480 100644 --- a/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 @@ -48,7 +48,7 @@ ! Arguments type(psb_dspmat_type) :: c type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_s_base_solver_bld.f90 b/mlprec/impl/solver/mld_s_base_solver_bld.f90 index 8bf11961..b8d8999f 100644 --- a/mlprec/impl/solver/mld_s_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_base_solver_bld.f90 @@ -42,7 +42,7 @@ subroutine mld_s_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_s_diag_solver_bld.f90 b/mlprec/impl/solver/mld_s_diag_solver_bld.f90 index 7c1a8fa6..ade06ea9 100644 --- a/mlprec/impl/solver/mld_s_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_diag_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_s_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_s_gs_solver_bld.f90 b/mlprec/impl/solver/mld_s_gs_solver_bld.f90 index 3d5f7c84..d6e07ac0 100644 --- a/mlprec/impl/solver/mld_s_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_gs_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_s_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 index 2701a851..24da41b3 100644 --- a/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_s_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 index ae91cfa6..924ae89a 100644 --- a/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 @@ -48,7 +48,7 @@ ! Arguments type(psb_sspmat_type) :: c type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_z_base_solver_bld.f90 b/mlprec/impl/solver/mld_z_base_solver_bld.f90 index 9fbd81d1..15736925 100644 --- a/mlprec/impl/solver/mld_z_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_base_solver_bld.f90 @@ -42,7 +42,7 @@ subroutine mld_z_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_z_diag_solver_bld.f90 b/mlprec/impl/solver/mld_z_diag_solver_bld.f90 index 59eb6fa4..3c570663 100644 --- a/mlprec/impl/solver/mld_z_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_diag_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_z_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_z_gs_solver_bld.f90 b/mlprec/impl/solver/mld_z_gs_solver_bld.f90 index c6a316ed..dad76c87 100644 --- a/mlprec/impl/solver/mld_z_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_gs_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_z_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 index 18c069fb..74635364 100644 --- a/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 @@ -44,7 +44,7 @@ subroutine mld_z_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 index c96502e1..db728857 100644 --- a/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 @@ -48,7 +48,7 @@ ! Arguments type(psb_zspmat_type) :: c type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_c_base_solver_mod.f90 b/mlprec/mld_c_base_solver_mod.f90 index a58ea371..8d10cc39 100644 --- a/mlprec/mld_c_base_solver_mod.f90 +++ b/mlprec/mld_c_base_solver_mod.f90 @@ -168,7 +168,7 @@ module mld_c_base_solver_mod ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_c_diag_solver.f90 b/mlprec/mld_c_diag_solver.f90 index a935c6e0..f6fb8323 100644 --- a/mlprec/mld_c_diag_solver.f90 +++ b/mlprec/mld_c_diag_solver.f90 @@ -119,7 +119,7 @@ module mld_c_diag_solver & psb_c_vect_type, psb_c_base_vect_type, psb_spk_, & & mld_c_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_c_gs_solver.f90 b/mlprec/mld_c_gs_solver.f90 index b43dbabc..28f14ec6 100644 --- a/mlprec/mld_c_gs_solver.f90 +++ b/mlprec/mld_c_gs_solver.f90 @@ -179,7 +179,7 @@ module mld_c_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b @@ -193,7 +193,7 @@ module mld_c_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_bwgs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_c_id_solver.f90 b/mlprec/mld_c_id_solver.f90 index 4bcba672..010604ae 100644 --- a/mlprec/mld_c_id_solver.f90 +++ b/mlprec/mld_c_id_solver.f90 @@ -124,7 +124,7 @@ contains ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_id_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_c_ilu_solver.f90 b/mlprec/mld_c_ilu_solver.f90 index f20fbfeb..9c291fca 100644 --- a/mlprec/mld_c_ilu_solver.f90 +++ b/mlprec/mld_c_ilu_solver.f90 @@ -143,7 +143,7 @@ module mld_c_ilu_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_c_mumps_solver.F90 b/mlprec/mld_c_mumps_solver.F90 index a12f2526..7342d514 100644 --- a/mlprec/mld_c_mumps_solver.F90 +++ b/mlprec/mld_c_mumps_solver.F90 @@ -161,7 +161,7 @@ module mld_c_mumps_solver ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_c_prec_type.f90 b/mlprec/mld_c_prec_type.f90 index 66a8d749..686defd5 100644 --- a/mlprec/mld_c_prec_type.f90 +++ b/mlprec/mld_c_prec_type.f90 @@ -118,6 +118,7 @@ module mld_c_prec_type procedure, pass(prec) :: psb_c_apply2v => mld_c_apply2v procedure, pass(prec) :: psb_c_apply1v => mld_c_apply1v procedure, pass(prec) :: dump => mld_c_dump + procedure, pass(prec) :: cnv => mld_c_cnv procedure, pass(prec) :: clone => mld_c_clone procedure, pass(prec) :: free => mld_c_prec_free procedure, pass(prec) :: allocate_wrk => mld_c_allocate_wrk @@ -754,6 +755,26 @@ contains end subroutine mld_c_dump + subroutine mld_c_cnv(prec,info,amold,vmold,imold) + + implicit none + class(mld_cprec_type), intent(inout) :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_c_base_sparse_mat), intent(in), optional :: amold + class(psb_c_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + + integer(psb_ipk_) :: i + + info = psb_success_ + if (allocated(prec%precv)) then + do i=1,size(prec%precv) + if (info == psb_success_ ) & + & call prec%precv(i)%cnv(info,amold=amold,vmold=vmold,imold=imold) + end do + end if + + end subroutine mld_c_cnv subroutine mld_c_clone(prec,precout,info) diff --git a/mlprec/mld_c_slu_solver.F90 b/mlprec/mld_c_slu_solver.F90 index 9d95eddd..8ac58e90 100644 --- a/mlprec/mld_c_slu_solver.F90 +++ b/mlprec/mld_c_slu_solver.F90 @@ -258,7 +258,7 @@ contains ! Arguments type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_slu_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_base_solver_mod.f90 b/mlprec/mld_d_base_solver_mod.f90 index d0477ea4..bb674c49 100644 --- a/mlprec/mld_d_base_solver_mod.f90 +++ b/mlprec/mld_d_base_solver_mod.f90 @@ -168,7 +168,7 @@ module mld_d_base_solver_mod ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_diag_solver.f90 b/mlprec/mld_d_diag_solver.f90 index 2b20e4f3..2d713cca 100644 --- a/mlprec/mld_d_diag_solver.f90 +++ b/mlprec/mld_d_diag_solver.f90 @@ -119,7 +119,7 @@ module mld_d_diag_solver & psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, & & mld_d_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_gs_solver.f90 b/mlprec/mld_d_gs_solver.f90 index 1e004e7f..bf37c548 100644 --- a/mlprec/mld_d_gs_solver.f90 +++ b/mlprec/mld_d_gs_solver.f90 @@ -179,7 +179,7 @@ module mld_d_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b @@ -193,7 +193,7 @@ module mld_d_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_bwgs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_id_solver.f90 b/mlprec/mld_d_id_solver.f90 index 50aaf2bd..10505233 100644 --- a/mlprec/mld_d_id_solver.f90 +++ b/mlprec/mld_d_id_solver.f90 @@ -124,7 +124,7 @@ contains ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_id_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_ilu_solver.f90 b/mlprec/mld_d_ilu_solver.f90 index 413130ef..e7a9d75c 100644 --- a/mlprec/mld_d_ilu_solver.f90 +++ b/mlprec/mld_d_ilu_solver.f90 @@ -143,7 +143,7 @@ module mld_d_ilu_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_mumps_solver.F90 b/mlprec/mld_d_mumps_solver.F90 index c6fcf992..e6a6d2d2 100644 --- a/mlprec/mld_d_mumps_solver.F90 +++ b/mlprec/mld_d_mumps_solver.F90 @@ -161,7 +161,7 @@ module mld_d_mumps_solver ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_prec_type.f90 b/mlprec/mld_d_prec_type.f90 index 236a9ae6..4ce187f9 100644 --- a/mlprec/mld_d_prec_type.f90 +++ b/mlprec/mld_d_prec_type.f90 @@ -118,6 +118,7 @@ module mld_d_prec_type procedure, pass(prec) :: psb_d_apply2v => mld_d_apply2v procedure, pass(prec) :: psb_d_apply1v => mld_d_apply1v procedure, pass(prec) :: dump => mld_d_dump + procedure, pass(prec) :: cnv => mld_d_cnv procedure, pass(prec) :: clone => mld_d_clone procedure, pass(prec) :: free => mld_d_prec_free procedure, pass(prec) :: allocate_wrk => mld_d_allocate_wrk @@ -754,6 +755,26 @@ contains end subroutine mld_d_dump + subroutine mld_d_cnv(prec,info,amold,vmold,imold) + + implicit none + class(mld_dprec_type), intent(inout) :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_d_base_sparse_mat), intent(in), optional :: amold + class(psb_d_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + + integer(psb_ipk_) :: i + + info = psb_success_ + if (allocated(prec%precv)) then + do i=1,size(prec%precv) + if (info == psb_success_ ) & + & call prec%precv(i)%cnv(info,amold=amold,vmold=vmold,imold=imold) + end do + end if + + end subroutine mld_d_cnv subroutine mld_d_clone(prec,precout,info) diff --git a/mlprec/mld_d_slu_solver.F90 b/mlprec/mld_d_slu_solver.F90 index 0e1825bf..f25272c0 100644 --- a/mlprec/mld_d_slu_solver.F90 +++ b/mlprec/mld_d_slu_solver.F90 @@ -258,7 +258,7 @@ contains ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_slu_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_sludist_solver.F90 b/mlprec/mld_d_sludist_solver.F90 index 0f4a4e97..727a3620 100644 --- a/mlprec/mld_d_sludist_solver.F90 +++ b/mlprec/mld_d_sludist_solver.F90 @@ -260,7 +260,7 @@ contains ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_sludist_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_d_umf_solver.F90 b/mlprec/mld_d_umf_solver.F90 index dc67dcc2..cbe842bc 100644 --- a/mlprec/mld_d_umf_solver.F90 +++ b/mlprec/mld_d_umf_solver.F90 @@ -262,7 +262,7 @@ contains ! Arguments type(psb_dspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_umf_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_s_base_solver_mod.f90 b/mlprec/mld_s_base_solver_mod.f90 index da311959..cea9b4c2 100644 --- a/mlprec/mld_s_base_solver_mod.f90 +++ b/mlprec/mld_s_base_solver_mod.f90 @@ -168,7 +168,7 @@ module mld_s_base_solver_mod ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_s_diag_solver.f90 b/mlprec/mld_s_diag_solver.f90 index 8ad4eb8c..5b36d49e 100644 --- a/mlprec/mld_s_diag_solver.f90 +++ b/mlprec/mld_s_diag_solver.f90 @@ -119,7 +119,7 @@ module mld_s_diag_solver & psb_s_vect_type, psb_s_base_vect_type, psb_spk_, & & mld_s_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_s_gs_solver.f90 b/mlprec/mld_s_gs_solver.f90 index 831f67c6..a106d95a 100644 --- a/mlprec/mld_s_gs_solver.f90 +++ b/mlprec/mld_s_gs_solver.f90 @@ -179,7 +179,7 @@ module mld_s_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b @@ -193,7 +193,7 @@ module mld_s_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_bwgs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_s_id_solver.f90 b/mlprec/mld_s_id_solver.f90 index f483935a..b4a87e66 100644 --- a/mlprec/mld_s_id_solver.f90 +++ b/mlprec/mld_s_id_solver.f90 @@ -124,7 +124,7 @@ contains ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_id_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_s_ilu_solver.f90 b/mlprec/mld_s_ilu_solver.f90 index 8e6d01e9..24e311b3 100644 --- a/mlprec/mld_s_ilu_solver.f90 +++ b/mlprec/mld_s_ilu_solver.f90 @@ -143,7 +143,7 @@ module mld_s_ilu_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_s_mumps_solver.F90 b/mlprec/mld_s_mumps_solver.F90 index 25d42ffb..8c507377 100644 --- a/mlprec/mld_s_mumps_solver.F90 +++ b/mlprec/mld_s_mumps_solver.F90 @@ -161,7 +161,7 @@ module mld_s_mumps_solver ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_s_prec_type.f90 b/mlprec/mld_s_prec_type.f90 index 76b107d5..b685433e 100644 --- a/mlprec/mld_s_prec_type.f90 +++ b/mlprec/mld_s_prec_type.f90 @@ -118,6 +118,7 @@ module mld_s_prec_type procedure, pass(prec) :: psb_s_apply2v => mld_s_apply2v procedure, pass(prec) :: psb_s_apply1v => mld_s_apply1v procedure, pass(prec) :: dump => mld_s_dump + procedure, pass(prec) :: cnv => mld_s_cnv procedure, pass(prec) :: clone => mld_s_clone procedure, pass(prec) :: free => mld_s_prec_free procedure, pass(prec) :: allocate_wrk => mld_s_allocate_wrk @@ -754,6 +755,26 @@ contains end subroutine mld_s_dump + subroutine mld_s_cnv(prec,info,amold,vmold,imold) + + implicit none + class(mld_sprec_type), intent(inout) :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_s_base_sparse_mat), intent(in), optional :: amold + class(psb_s_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + + integer(psb_ipk_) :: i + + info = psb_success_ + if (allocated(prec%precv)) then + do i=1,size(prec%precv) + if (info == psb_success_ ) & + & call prec%precv(i)%cnv(info,amold=amold,vmold=vmold,imold=imold) + end do + end if + + end subroutine mld_s_cnv subroutine mld_s_clone(prec,precout,info) diff --git a/mlprec/mld_s_slu_solver.F90 b/mlprec/mld_s_slu_solver.F90 index 7c173ce1..3a0936e8 100644 --- a/mlprec/mld_s_slu_solver.F90 +++ b/mlprec/mld_s_slu_solver.F90 @@ -258,7 +258,7 @@ contains ! Arguments type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_slu_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_base_solver_mod.f90 b/mlprec/mld_z_base_solver_mod.f90 index de22baf6..a118bf68 100644 --- a/mlprec/mld_z_base_solver_mod.f90 +++ b/mlprec/mld_z_base_solver_mod.f90 @@ -168,7 +168,7 @@ module mld_z_base_solver_mod ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_base_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_diag_solver.f90 b/mlprec/mld_z_diag_solver.f90 index 74ada7f2..6adbd5d7 100644 --- a/mlprec/mld_z_diag_solver.f90 +++ b/mlprec/mld_z_diag_solver.f90 @@ -119,7 +119,7 @@ module mld_z_diag_solver & psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, & & mld_z_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_diag_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_gs_solver.f90 b/mlprec/mld_z_gs_solver.f90 index 5f6305ca..0cb257d2 100644 --- a/mlprec/mld_z_gs_solver.f90 +++ b/mlprec/mld_z_gs_solver.f90 @@ -179,7 +179,7 @@ module mld_z_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b @@ -193,7 +193,7 @@ module mld_z_gs_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_bwgs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_id_solver.f90 b/mlprec/mld_z_id_solver.f90 index 8775c5a4..3b85a4df 100644 --- a/mlprec/mld_z_id_solver.f90 +++ b/mlprec/mld_z_id_solver.f90 @@ -124,7 +124,7 @@ contains ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_id_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_ilu_solver.f90 b/mlprec/mld_z_ilu_solver.f90 index c97af285..b0cf6196 100644 --- a/mlprec/mld_z_ilu_solver.f90 +++ b/mlprec/mld_z_ilu_solver.f90 @@ -143,7 +143,7 @@ module mld_z_ilu_solver & psb_ipk_, psb_i_base_vect_type implicit none type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_ilu_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_mumps_solver.F90 b/mlprec/mld_z_mumps_solver.F90 index 14f670f7..c8d02df6 100644 --- a/mlprec/mld_z_mumps_solver.F90 +++ b/mlprec/mld_z_mumps_solver.F90 @@ -161,7 +161,7 @@ module mld_z_mumps_solver ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_mumps_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_prec_type.f90 b/mlprec/mld_z_prec_type.f90 index 0db5531b..714d6db3 100644 --- a/mlprec/mld_z_prec_type.f90 +++ b/mlprec/mld_z_prec_type.f90 @@ -118,6 +118,7 @@ module mld_z_prec_type procedure, pass(prec) :: psb_z_apply2v => mld_z_apply2v procedure, pass(prec) :: psb_z_apply1v => mld_z_apply1v procedure, pass(prec) :: dump => mld_z_dump + procedure, pass(prec) :: cnv => mld_z_cnv procedure, pass(prec) :: clone => mld_z_clone procedure, pass(prec) :: free => mld_z_prec_free procedure, pass(prec) :: allocate_wrk => mld_z_allocate_wrk @@ -754,6 +755,26 @@ contains end subroutine mld_z_dump + subroutine mld_z_cnv(prec,info,amold,vmold,imold) + + implicit none + class(mld_zprec_type), intent(inout) :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_z_base_sparse_mat), intent(in), optional :: amold + class(psb_z_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + + integer(psb_ipk_) :: i + + info = psb_success_ + if (allocated(prec%precv)) then + do i=1,size(prec%precv) + if (info == psb_success_ ) & + & call prec%precv(i)%cnv(info,amold=amold,vmold=vmold,imold=imold) + end do + end if + + end subroutine mld_z_cnv subroutine mld_z_clone(prec,precout,info) diff --git a/mlprec/mld_z_slu_solver.F90 b/mlprec/mld_z_slu_solver.F90 index b7fdb807..8d490276 100644 --- a/mlprec/mld_z_slu_solver.F90 +++ b/mlprec/mld_z_slu_solver.F90 @@ -258,7 +258,7 @@ contains ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_slu_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_sludist_solver.F90 b/mlprec/mld_z_sludist_solver.F90 index 03f1c489..64053fa7 100644 --- a/mlprec/mld_z_sludist_solver.F90 +++ b/mlprec/mld_z_sludist_solver.F90 @@ -260,7 +260,7 @@ contains ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_sludist_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b diff --git a/mlprec/mld_z_umf_solver.F90 b/mlprec/mld_z_umf_solver.F90 index 2847e51f..6f41ebe5 100644 --- a/mlprec/mld_z_umf_solver.F90 +++ b/mlprec/mld_z_umf_solver.F90 @@ -262,7 +262,7 @@ contains ! Arguments type(psb_zspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a + Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_umf_solver_type), intent(inout) :: sv integer, intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b