base/modules/psb_base_mat_mod.f03
 base/modules/psb_d_base_mat_mod.f03
 base/modules/psb_linmap_mod.f90
 base/modules/psb_linmap_type_mod.f90
 base/modules/psb_serial_mod.f90
 base/modules/psb_spmat_type.f03
 base/serial/f03/psbn_d_coo_impl.f03
 base/serial/f03/psbn_d_csr_impl.f03
 prec/psb_dbjac_bld.f90
 prec/psb_dilu_fct.f90
 prec/psb_dprecbld.f90
 prec/psb_prec_mod.f90
 prec/psb_prec_type.f90
 test/fileread/df_sample.f90
 util/psb_metispart_mod.F90

1. Taken out psb_dspmat_type from definition modules.
2. Commented out compilation of all old serial stuff; 
3. Fixed (for the time being, but needs more exploration) CP_FROM and
   MV_FROM. 
4. BEWARE: new serial stuff is still incomplete.
This commit is contained in:
Salvatore Filippone
2009-09-22 16:15:42 +00:00
parent adb51fddc5
commit 720fbd161a
15 changed files with 1269 additions and 1196 deletions
+82 -51
View File
@@ -3,9 +3,14 @@ module psb_base_mat_mod
use psb_const_mod
type :: psb_base_sparse_mat
integer, private :: m, n
integer, private :: state, duplicate
logical, private :: triangle, unitd, upper, sorted
integer :: m, n
integer :: state, duplicate
logical :: triangle, unitd, upper, sorted
! This is a different animal: it's a kitchen sink for
! any additional parameters that may be needed
! when converting to/from COO. Why here?
! Will tell you one day...
integer, allocatable :: aux(:)
contains
! ====================================
@@ -22,6 +27,7 @@ module psb_base_mat_mod
procedure, pass(a) :: get_state
procedure, pass(a) :: get_dupl
procedure, pass(a) :: get_fmt
procedure, pass(a) :: get_aux
procedure, pass(a) :: is_null
procedure, pass(a) :: is_bld
procedure, pass(a) :: is_upd
@@ -50,7 +56,7 @@ module psb_base_mat_mod
procedure, pass(a) :: set_lower
procedure, pass(a) :: set_triangle
procedure, pass(a) :: set_unit
procedure, pass(a) :: set_aux
! ====================================
@@ -58,6 +64,7 @@ module psb_base_mat_mod
! Data management
!
! ====================================
procedure, pass(a) :: get_neigh
procedure, pass(a) :: allocate_mnnz
procedure, pass(a) :: reallocate_nz
@@ -69,7 +76,9 @@ module psb_base_mat_mod
procedure, pass(a) :: csgetptn
generic, public :: csget => csgetptn
procedure, pass(a) :: print => sparse_print
procedure, pass(a) :: sizeof
procedure, pass(a) :: sizeof
!!$ procedure, pass(a) :: base_cp_from
!!$ procedure, pass(a) :: base_mv_from
end type psb_base_sparse_mat
@@ -80,7 +89,14 @@ module psb_base_mat_mod
& is_upd, is_asb, is_sorted, is_upper, is_lower, is_triangle, &
& is_unit, get_neigh, allocate_mn, allocate_mnnz, reallocate_nz, &
& free, sparse_print, get_fmt, trim, sizeof, reinit, csgetptn, &
& get_nz_row
& get_nz_row, get_aux, set_aux
!!$, base_mv_from, base_cp_from
interface cp_from
module procedure base_cp_from
end interface
interface mv_from
module procedure base_mv_from
end interface
contains
@@ -130,6 +146,22 @@ contains
end function get_ncols
subroutine set_aux(v,a)
implicit none
class(psb_base_sparse_mat), intent(inout) :: a
integer, intent(in) :: v(:)
! TBD
write(0,*) 'SET_AUX is empty right now '
end subroutine set_aux
subroutine get_aux(v,a)
implicit none
class(psb_base_sparse_mat), intent(in) :: a
integer, intent(out), allocatable :: v(:)
! TBD
write(0,*) 'GET_AUX is empty right now '
end subroutine get_aux
subroutine set_nrows(m,a)
implicit none
class(psb_base_sparse_mat), intent(inout) :: a
@@ -410,51 +442,50 @@ contains
end subroutine reinit
!!$
!!$ !
!!$ ! Since at this level we have only simple components,
!!$ ! mv_from is identical to cp_from.
!!$ !
!!$ subroutine mv_from(a,b)
!!$ use psb_error_mod
!!$ implicit none
!!$
!!$ class(psb_base_sparse_mat), intent(out) :: a
!!$ type(psb_base_sparse_mat), intent(inout) :: b
!!$
!!$ a%m = b%m
!!$ a%n = b%n
!!$ a%state = b%state
!!$ a%duplicate = b%duplicate
!!$ a%triangle = b%triangle
!!$ a%unitd = b%unitd
!!$ a%upper = b%upper
!!$ a%sorted = b%sorted
!!$
!!$ return
!!$
!!$ end subroutine mv_from
!!$
!!$ subroutine cp_from(a,b)
!!$ use psb_error_mod
!!$ implicit none
!!$
!!$ class(psb_base_sparse_mat), intent(out) :: a
!!$ type(psb_base_sparse_mat), intent(in) :: b
!!$
!!$ a%m = b%m
!!$ a%n = b%n
!!$ a%state = b%state
!!$ a%duplicate = b%duplicate
!!$ a%triangle = b%triangle
!!$ a%unitd = b%unitd
!!$ a%upper = b%upper
!!$ a%sorted = b%sorted
!!$
!!$ return
!!$
!!$ end subroutine cp_from
!!$
!
!
subroutine base_mv_from(a,b)
use psb_error_mod
implicit none
type(psb_base_sparse_mat), intent(out) :: a
type(psb_base_sparse_mat), intent(inout) :: b
a%m = b%m
a%n = b%n
a%state = b%state
a%duplicate = b%duplicate
a%triangle = b%triangle
a%unitd = b%unitd
a%upper = b%upper
a%sorted = b%sorted
call move_alloc(b%aux,a%aux)
return
end subroutine base_mv_from
subroutine base_cp_from(a,b)
use psb_error_mod
implicit none
type(psb_base_sparse_mat), intent(out) :: a
type(psb_base_sparse_mat), intent(in) :: b
a%m = b%m
a%n = b%n
a%state = b%state
a%duplicate = b%duplicate
a%triangle = b%triangle
a%unitd = b%unitd
a%upper = b%upper
a%sorted = b%sorted
a%aux = b%aux
return
end subroutine base_cp_from
subroutine sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc)
use psb_error_mod
implicit none
+45
View File
@@ -32,6 +32,8 @@ module psb_d_base_mat_mod
procedure, pass(a) :: mv_from_coo
procedure, pass(a) :: mv_to_fmt
procedure, pass(a) :: mv_from_fmt
!!$ procedure, pass(a) :: base_cp_from => d_base_cp_from
!!$ procedure, pass(a) :: base_mv_from => d_base_mv_from
end type psb_d_base_sparse_mat
private :: d_base_csmv, d_base_csmm, d_base_cssv, d_base_cssm,&
@@ -39,6 +41,16 @@ module psb_d_base_mat_mod
& cp_to_coo, cp_from_coo, cp_to_fmt, cp_from_fmt, &
& mv_to_coo, mv_from_coo, mv_to_fmt, mv_from_fmt, &
& get_diag, csclip, d_cssv, d_cssm
!!$, &
!!$ & d_base_mv_from, d_base_cp_from
interface cp_from
module procedure d_base_cp_from
end interface
interface mv_from
module procedure d_base_mv_from
end interface
type, extends(psb_d_base_sparse_mat) :: psb_d_coo_sparse_mat
@@ -314,6 +326,39 @@ contains
!
!====================================
!
! For the time being we do not have anything beyond
! the base components, but you never know.
!
subroutine d_base_mv_from(a,b)
use psb_error_mod
implicit none
type(psb_d_base_sparse_mat), intent(out) :: a
type(psb_d_base_sparse_mat), intent(inout) :: b
!!$ call a%psb_base_sparse_mat%base_mv_from(b%psb_base_sparse_mat)
call mv_from(a%psb_base_sparse_mat,b%psb_base_sparse_mat)
return
end subroutine d_base_mv_from
subroutine d_base_cp_from(a,b)
use psb_error_mod
implicit none
type(psb_d_base_sparse_mat), intent(out) :: a
type(psb_d_base_sparse_mat), intent(in) :: b
call cp_from(a%psb_base_sparse_mat,b%psb_base_sparse_mat)
return
end subroutine d_base_cp_from
subroutine cp_to_coo(a,b,info)
use psb_error_mod
use psb_realloc_mod
+1 -1
View File
@@ -37,7 +37,7 @@
!
module psb_linmap_mod
use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type, &
use psb_spmat_type, only : psb_sspmat_type, &
& psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_, psb_sizeof
use psb_descriptor_type
use psb_linmap_type_mod
+1 -1
View File
@@ -36,7 +36,7 @@
! to different spaces.
!
module psb_linmap_type_mod
use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type, &
use psb_spmat_type, only : psb_sspmat_type, &
& psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_, psb_sizeof
use psb_d_mat_mod, only: psb_d_sparse_mat
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff