mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
psblas-3.99:
First shot at new IMOLD stuff.
This commit is contained in:
@@ -50,6 +50,7 @@ module psb_d_linmap_mod
|
||||
procedure, pass(map) :: is_asb => d_is_asb
|
||||
procedure, pass(map) :: free => d_free
|
||||
procedure, pass(map) :: clone => d_clone
|
||||
procedure, pass(map) :: cnv => psb_d_map_cscnv
|
||||
end type psb_dlinmap_type
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ contains
|
||||
use psb_i_vect_mod
|
||||
use psb_d_mat_mod
|
||||
implicit none
|
||||
type(psb_dlinmap_type), intent(inout) :: map
|
||||
class(psb_dlinmap_type), intent(inout) :: map
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character(len=*), intent(in), optional :: type
|
||||
class(psb_d_base_sparse_mat), intent(in), optional :: mold
|
||||
|
||||
@@ -562,19 +562,23 @@ contains
|
||||
|
||||
subroutine d_vect_cnv(x,mold)
|
||||
class(psb_d_vect_type), intent(inout) :: x
|
||||
class(psb_d_base_vect_type), intent(in) :: mold
|
||||
class(psb_d_base_vect_type), intent(in), optional :: mold
|
||||
class(psb_d_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 d_vect_cnv
|
||||
|
||||
|
||||
Reference in New Issue
Block a user