psblas-3.99:

First shot at new IMOLD stuff.
This commit is contained in:
Salvatore Filippone
2013-09-02 15:11:26 +00:00
parent 641e933716
commit 64b933ee2c
3 changed files with 14 additions and 7 deletions
+2 -1
View File
@@ -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
+9 -5
View File
@@ -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