mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-17 03:12:15 +00:00
psblas-3.99:
base/modules/psb_c_linmap_mod.f90 base/modules/psb_c_vect_mod.F90 base/modules/psb_d_vect_mod.F90 base/modules/psb_s_linmap_mod.f90 base/modules/psb_s_vect_mod.F90 base/modules/psb_z_linmap_mod.f90 base/modules/psb_z_vect_mod.F90 Adjustments for IMOLD and CNV methods.
This commit is contained in:
@@ -50,6 +50,7 @@ module psb_c_linmap_mod
|
||||
procedure, pass(map) :: is_asb => c_is_asb
|
||||
procedure, pass(map) :: free => c_free
|
||||
procedure, pass(map) :: clone => c_clone
|
||||
procedure, pass(map) :: cnv => psb_c_map_cscnv
|
||||
end type psb_clinmap_type
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ contains
|
||||
use psb_i_vect_mod
|
||||
use psb_c_mat_mod
|
||||
implicit none
|
||||
type(psb_clinmap_type), intent(inout) :: map
|
||||
class(psb_clinmap_type), intent(inout) :: map
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character(len=*), intent(in), optional :: type
|
||||
class(psb_c_base_sparse_mat), intent(in), optional :: mold
|
||||
|
||||
@@ -562,20 +562,23 @@ contains
|
||||
|
||||
subroutine c_vect_cnv(x,mold)
|
||||
class(psb_c_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(in) :: mold
|
||||
class(psb_c_base_vect_type), intent(in), optional :: mold
|
||||
class(psb_c_base_vect_type), allocatable :: tmp
|
||||
integer(psb_ipk_) :: info
|
||||
|
||||
if (present(mold)) then
|
||||
#ifdef HAVE_MOLD
|
||||
allocate(tmp,stat=info,mold=mold)
|
||||
#else
|
||||
call mold%mold(tmp,info)
|
||||
#endif
|
||||
call x%v%sync()
|
||||
if (info == psb_success_) call tmp%bld(x%v%v)
|
||||
call x%v%free(info)
|
||||
call move_alloc(tmp,x%v)
|
||||
|
||||
if (allocated(x%v)) then
|
||||
call x%v%sync()
|
||||
if (info == psb_success_) call tmp%bld(x%v%v)
|
||||
call x%v%free(info)
|
||||
end if
|
||||
call move_alloc(tmp,x%v)
|
||||
end if
|
||||
end subroutine c_vect_cnv
|
||||
|
||||
end module psb_c_vect_mod
|
||||
|
||||
@@ -579,7 +579,6 @@ contains
|
||||
end if
|
||||
call move_alloc(tmp,x%v)
|
||||
end if
|
||||
|
||||
end subroutine d_vect_cnv
|
||||
|
||||
end module psb_d_vect_mod
|
||||
|
||||
@@ -50,6 +50,7 @@ module psb_s_linmap_mod
|
||||
procedure, pass(map) :: is_asb => s_is_asb
|
||||
procedure, pass(map) :: free => s_free
|
||||
procedure, pass(map) :: clone => s_clone
|
||||
procedure, pass(map) :: cnv => psb_s_map_cscnv
|
||||
end type psb_slinmap_type
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ contains
|
||||
use psb_i_vect_mod
|
||||
use psb_s_mat_mod
|
||||
implicit none
|
||||
type(psb_slinmap_type), intent(inout) :: map
|
||||
class(psb_slinmap_type), intent(inout) :: map
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character(len=*), intent(in), optional :: type
|
||||
class(psb_s_base_sparse_mat), intent(in), optional :: mold
|
||||
|
||||
@@ -562,20 +562,23 @@ contains
|
||||
|
||||
subroutine s_vect_cnv(x,mold)
|
||||
class(psb_s_vect_type), intent(inout) :: x
|
||||
class(psb_s_base_vect_type), intent(in) :: mold
|
||||
class(psb_s_base_vect_type), intent(in), optional :: mold
|
||||
class(psb_s_base_vect_type), allocatable :: tmp
|
||||
integer(psb_ipk_) :: info
|
||||
|
||||
if (present(mold)) then
|
||||
#ifdef HAVE_MOLD
|
||||
allocate(tmp,stat=info,mold=mold)
|
||||
#else
|
||||
call mold%mold(tmp,info)
|
||||
#endif
|
||||
call x%v%sync()
|
||||
if (info == psb_success_) call tmp%bld(x%v%v)
|
||||
call x%v%free(info)
|
||||
call move_alloc(tmp,x%v)
|
||||
|
||||
if (allocated(x%v)) then
|
||||
call x%v%sync()
|
||||
if (info == psb_success_) call tmp%bld(x%v%v)
|
||||
call x%v%free(info)
|
||||
end if
|
||||
call move_alloc(tmp,x%v)
|
||||
end if
|
||||
end subroutine s_vect_cnv
|
||||
|
||||
end module psb_s_vect_mod
|
||||
|
||||
@@ -50,6 +50,7 @@ module psb_z_linmap_mod
|
||||
procedure, pass(map) :: is_asb => z_is_asb
|
||||
procedure, pass(map) :: free => z_free
|
||||
procedure, pass(map) :: clone => z_clone
|
||||
procedure, pass(map) :: cnv => psb_z_map_cscnv
|
||||
end type psb_zlinmap_type
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ contains
|
||||
use psb_i_vect_mod
|
||||
use psb_z_mat_mod
|
||||
implicit none
|
||||
type(psb_zlinmap_type), intent(inout) :: map
|
||||
class(psb_zlinmap_type), intent(inout) :: map
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character(len=*), intent(in), optional :: type
|
||||
class(psb_z_base_sparse_mat), intent(in), optional :: mold
|
||||
|
||||
@@ -562,20 +562,23 @@ contains
|
||||
|
||||
subroutine z_vect_cnv(x,mold)
|
||||
class(psb_z_vect_type), intent(inout) :: x
|
||||
class(psb_z_base_vect_type), intent(in) :: mold
|
||||
class(psb_z_base_vect_type), intent(in), optional :: mold
|
||||
class(psb_z_base_vect_type), allocatable :: tmp
|
||||
integer(psb_ipk_) :: info
|
||||
|
||||
if (present(mold)) then
|
||||
#ifdef HAVE_MOLD
|
||||
allocate(tmp,stat=info,mold=mold)
|
||||
#else
|
||||
call mold%mold(tmp,info)
|
||||
#endif
|
||||
call x%v%sync()
|
||||
if (info == psb_success_) call tmp%bld(x%v%v)
|
||||
call x%v%free(info)
|
||||
call move_alloc(tmp,x%v)
|
||||
|
||||
if (allocated(x%v)) then
|
||||
call x%v%sync()
|
||||
if (info == psb_success_) call tmp%bld(x%v%v)
|
||||
call x%v%free(info)
|
||||
end if
|
||||
call move_alloc(tmp,x%v)
|
||||
end if
|
||||
end subroutine z_vect_cnv
|
||||
|
||||
end module psb_z_vect_mod
|
||||
|
||||
Reference in New Issue
Block a user