New linmap method

new-context
Salvatore Filippone 4 years ago
parent 9178d63ebd
commit ecb2e80732

@ -50,6 +50,7 @@ module psb_base_linmap_mod
procedure, pass(map) :: sizeof => base_map_sizeof procedure, pass(map) :: sizeof => base_map_sizeof
procedure, pass(map) :: is_ok => base_is_ok procedure, pass(map) :: is_ok => base_is_ok
procedure, pass(map) :: is_asb => base_is_asb procedure, pass(map) :: is_asb => base_is_asb
procedure, pass(map) :: is_v_repl => base_is_v_repl
procedure, pass(map) :: get_kind => base_get_kind procedure, pass(map) :: get_kind => base_get_kind
procedure, pass(map) :: set_kind => base_set_kind procedure, pass(map) :: set_kind => base_set_kind
procedure, pass(map) :: free => base_free procedure, pass(map) :: free => base_free
@ -61,7 +62,7 @@ module psb_base_linmap_mod
module procedure psb_base_linmap_transfer module procedure psb_base_linmap_transfer
end interface end interface
private :: base_map_sizeof, base_is_ok, base_is_asb,& private :: base_map_sizeof, base_is_ok, base_is_asb, base_is_v_repl, &
& base_get_kind, base_set_kind, base_free, base_clone & base_get_kind, base_set_kind, base_free, base_clone
contains contains
@ -84,7 +85,6 @@ contains
end subroutine base_set_kind end subroutine base_set_kind
function base_is_ok(map) result(res) function base_is_ok(map) result(res)
use psb_desc_mod use psb_desc_mod
implicit none implicit none
@ -103,6 +103,23 @@ contains
end function base_is_ok end function base_is_ok
function base_is_v_repl(map) result(res)
use psb_desc_mod
implicit none
class(psb_base_linmap_type), intent(in) :: map
logical :: res
res = .false.
select case(map%get_kind())
case (psb_map_aggr_)
if (.not.associated(map%p_desc_V)) return
res = map%p_desc_V%is_repl()
case(psb_map_gen_linear_)
res = map%desc_V%is_repl()
end select
end function base_is_v_repl
function base_is_asb(map) result(res) function base_is_asb(map) result(res)
use psb_desc_mod use psb_desc_mod
implicit none implicit none

Loading…
Cancel
Save