|
|
@ -46,9 +46,10 @@ module psb_c_linmap_mod
|
|
|
|
type, extends(psb_base_linmap_type) :: psb_clinmap_type
|
|
|
|
type, extends(psb_base_linmap_type) :: psb_clinmap_type
|
|
|
|
type(psb_cspmat_type) :: map_X2Y, map_Y2X
|
|
|
|
type(psb_cspmat_type) :: map_X2Y, map_Y2X
|
|
|
|
contains
|
|
|
|
contains
|
|
|
|
procedure, pass(map) :: sizeof => c_map_sizeof
|
|
|
|
procedure, pass(map) :: sizeof => c_map_sizeof
|
|
|
|
procedure, pass(map) :: is_asb => c_is_asb
|
|
|
|
procedure, pass(map) :: is_asb => c_is_asb
|
|
|
|
procedure, pass(map) :: free => c_free
|
|
|
|
procedure, pass(map) :: free => c_free
|
|
|
|
|
|
|
|
procedure, pass(mapin) :: clone => c_clone
|
|
|
|
end type psb_clinmap_type
|
|
|
|
end type psb_clinmap_type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -116,11 +117,11 @@ module psb_c_linmap_mod
|
|
|
|
use psb_c_mat_mod, only : psb_cspmat_type
|
|
|
|
use psb_c_mat_mod, only : psb_cspmat_type
|
|
|
|
import :: psb_ipk_, psb_clinmap_type, psb_desc_type
|
|
|
|
import :: psb_ipk_, psb_clinmap_type, psb_desc_type
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
type(psb_clinmap_type) :: psb_c_linmap
|
|
|
|
type(psb_clinmap_type) :: psb_c_linmap
|
|
|
|
type(psb_desc_type), target :: desc_X, desc_Y
|
|
|
|
type(psb_desc_type), target :: desc_X, desc_Y
|
|
|
|
type(psb_cspmat_type), intent(in) :: map_X2Y, map_Y2X
|
|
|
|
type(psb_cspmat_type), intent(inout) :: map_X2Y, map_Y2X
|
|
|
|
integer(psb_ipk_), intent(in) :: map_kind
|
|
|
|
integer(psb_ipk_), intent(in) :: map_kind
|
|
|
|
integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:)
|
|
|
|
integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:)
|
|
|
|
end function psb_c_linmap
|
|
|
|
end function psb_c_linmap
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
@ -176,11 +177,11 @@ contains
|
|
|
|
& map_X2Y, map_Y2X,iaggr,naggr)
|
|
|
|
& map_X2Y, map_Y2X,iaggr,naggr)
|
|
|
|
use psb_c_mat_mod
|
|
|
|
use psb_c_mat_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
type(psb_clinmap_type), intent(out) :: out_map
|
|
|
|
type(psb_clinmap_type), intent(out) :: out_map
|
|
|
|
type(psb_desc_type), target :: desc_X, desc_Y
|
|
|
|
type(psb_desc_type), target :: desc_X, desc_Y
|
|
|
|
type(psb_cspmat_type), intent(in) :: map_X2Y, map_Y2X
|
|
|
|
type(psb_cspmat_type), intent(inout) :: map_X2Y, map_Y2X
|
|
|
|
integer(psb_ipk_), intent(in) :: map_kind
|
|
|
|
integer(psb_ipk_), intent(in) :: map_kind
|
|
|
|
integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:)
|
|
|
|
integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:)
|
|
|
|
out_map = psb_linmap(map_kind,desc_X,desc_Y,map_X2Y,map_Y2X,iaggr,naggr)
|
|
|
|
out_map = psb_linmap(map_kind,desc_X,desc_Y,map_X2Y,map_Y2X,iaggr,naggr)
|
|
|
|
end subroutine psb_c_linmap_sub
|
|
|
|
end subroutine psb_c_linmap_sub
|
|
|
|
|
|
|
|
|
|
|
@ -213,5 +214,19 @@ contains
|
|
|
|
end subroutine c_free
|
|
|
|
end subroutine c_free
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine c_clone(mapin,mapout)
|
|
|
|
|
|
|
|
use psb_desc_mod
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
class(psb_clinmap_type), intent(inout) :: mapin
|
|
|
|
|
|
|
|
class(psb_clinmap_type), intent(out) :: mapout
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Base clone!
|
|
|
|
|
|
|
|
call mapin%map_X2Y%clone(mapout%map_X2Y,info)
|
|
|
|
|
|
|
|
call mapin%map_Y2X%clone(mapout%map_Y2X,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine c_clone
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end module psb_c_linmap_mod
|
|
|
|
end module psb_c_linmap_mod
|
|
|
|
|
|
|
|
|
|
|
|