|
|
@ -36,9 +36,9 @@
|
|
|
|
!!$ POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
!!$ POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
!!$
|
|
|
|
!!$
|
|
|
|
!!$
|
|
|
|
!!$
|
|
|
|
! File: mld_prec_mod.f90
|
|
|
|
! File: mld_c_prec_mod.f90
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Module: mld_prec_mod
|
|
|
|
! Module: mld_c_prec_mod
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! This module defines the interfaces to the real/complex, single/double
|
|
|
|
! This module defines the interfaces to the real/complex, single/double
|
|
|
|
! precision versions of the user-level MLD2P4 routines.
|
|
|
|
! precision versions of the user-level MLD2P4 routines.
|
|
|
@ -50,8 +50,7 @@ module mld_c_prec_mod
|
|
|
|
|
|
|
|
|
|
|
|
interface mld_precinit
|
|
|
|
interface mld_precinit
|
|
|
|
subroutine mld_cprecinit(p,ptype,info,nlev)
|
|
|
|
subroutine mld_cprecinit(p,ptype,info,nlev)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, mld_cprec_type
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
character(len=*), intent(in) :: ptype
|
|
|
|
character(len=*), intent(in) :: ptype
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -60,30 +59,30 @@ module mld_c_prec_mod
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
interface mld_precset
|
|
|
|
interface mld_precset
|
|
|
|
module procedure mld_i_zprecsetsm, mld_i_zprecsetsv, &
|
|
|
|
module procedure mld_c_iprecsetsm, mld_c_iprecsetsv, &
|
|
|
|
& mld_i_zprecseti, mld_i_zprecsetc, mld_i_zprecsetr
|
|
|
|
& mld_c_iprecseti, mld_c_iprecsetc, mld_c_iprecsetr
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
interface mld_inner_precset
|
|
|
|
interface mld_inner_precset
|
|
|
|
subroutine mld_cprecsetsm(p,val,info,ilev)
|
|
|
|
subroutine mld_cprecsetsm(p,val,info,ilev)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, &
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type, mld_c_base_smoother_type
|
|
|
|
& mld_cprec_type, mld_c_base_smoother_type
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
class(mld_c_base_smoother_type), intent(in) :: val
|
|
|
|
class(mld_c_base_smoother_type), intent(in) :: val
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
end subroutine mld_cprecsetsm
|
|
|
|
end subroutine mld_cprecsetsm
|
|
|
|
subroutine mld_cprecsetsv(p,val,info,ilev)
|
|
|
|
subroutine mld_cprecsetsv(p,val,info,ilev)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, &
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type, mld_c_base_solver_type
|
|
|
|
& mld_cprec_type, mld_c_base_solver_type
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
class(mld_c_base_solver_type), intent(in) :: val
|
|
|
|
class(mld_c_base_solver_type), intent(in) :: val
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
end subroutine mld_cprecsetsv
|
|
|
|
end subroutine mld_cprecsetsv
|
|
|
|
subroutine mld_cprecseti(p,what,val,info,ilev)
|
|
|
|
subroutine mld_cprecseti(p,what,val,info,ilev)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, &
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
& mld_cprec_type
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: val
|
|
|
|
integer, intent(in) :: val
|
|
|
@ -91,8 +90,8 @@ module mld_c_prec_mod
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
end subroutine mld_cprecseti
|
|
|
|
end subroutine mld_cprecseti
|
|
|
|
subroutine mld_cprecsetr(p,what,val,info,ilev)
|
|
|
|
subroutine mld_cprecsetr(p,what,val,info,ilev)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, &
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
& mld_cprec_type
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: what
|
|
|
|
real(psb_spk_), intent(in) :: val
|
|
|
|
real(psb_spk_), intent(in) :: val
|
|
|
@ -100,8 +99,8 @@ module mld_c_prec_mod
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
integer, optional, intent(in) :: ilev
|
|
|
|
end subroutine mld_cprecsetr
|
|
|
|
end subroutine mld_cprecsetr
|
|
|
|
subroutine mld_cprecsetc(p,what,string,info,ilev)
|
|
|
|
subroutine mld_cprecsetc(p,what,string,info,ilev)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, &
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
& mld_cprec_type
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: what
|
|
|
|
character(len=*), intent(in) :: string
|
|
|
|
character(len=*), intent(in) :: string
|
|
|
@ -112,9 +111,9 @@ module mld_c_prec_mod
|
|
|
|
|
|
|
|
|
|
|
|
interface mld_precbld
|
|
|
|
interface mld_precbld
|
|
|
|
subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold)
|
|
|
|
subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, &
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, &
|
|
|
|
& psb_spk_, psb_c_base_sparse_mat, psb_c_base_vect_type
|
|
|
|
& psb_c_base_sparse_mat, psb_c_base_vect_type, &
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
& mld_cprec_type
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
type(psb_cspmat_type), intent(in), target :: a
|
|
|
|
type(psb_cspmat_type), intent(in), target :: a
|
|
|
|
type(psb_desc_type), intent(in), target :: desc_a
|
|
|
|
type(psb_desc_type), intent(in), target :: desc_a
|
|
|
@ -128,58 +127,47 @@ module mld_c_prec_mod
|
|
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
subroutine mld_i_zprecsetsm(p,val,info)
|
|
|
|
subroutine mld_c_iprecsetsm(p,val,info)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type, mld_c_base_smoother_type
|
|
|
|
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
class(mld_c_base_smoother_type), intent(in) :: val
|
|
|
|
class(mld_c_base_smoother_type), intent(in) :: val
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
call mld_inner_precset(p,val,info)
|
|
|
|
call mld_inner_precset(p,val,info)
|
|
|
|
end subroutine mld_i_zprecsetsm
|
|
|
|
end subroutine mld_c_iprecsetsm
|
|
|
|
|
|
|
|
|
|
|
|
subroutine mld_i_zprecsetsv(p,val,info)
|
|
|
|
subroutine mld_c_iprecsetsv(p,val,info)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type, mld_c_base_solver_type
|
|
|
|
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
class(mld_c_base_solver_type), intent(in) :: val
|
|
|
|
class(mld_c_base_solver_type), intent(in) :: val
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
call mld_inner_precset(p,val,info)
|
|
|
|
call mld_inner_precset(p,val,info)
|
|
|
|
end subroutine mld_i_zprecsetsv
|
|
|
|
end subroutine mld_c_iprecsetsv
|
|
|
|
|
|
|
|
|
|
|
|
subroutine mld_i_zprecseti(p,what,val,info)
|
|
|
|
subroutine mld_c_iprecseti(p,what,val,info)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: val
|
|
|
|
integer, intent(in) :: val
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
call mld_inner_precset(p,what,val,info)
|
|
|
|
call mld_inner_precset(p,what,val,info)
|
|
|
|
end subroutine mld_i_zprecseti
|
|
|
|
end subroutine mld_c_iprecseti
|
|
|
|
|
|
|
|
|
|
|
|
subroutine mld_i_zprecsetr(p,what,val,info)
|
|
|
|
subroutine mld_c_iprecsetr(p,what,val,info)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: what
|
|
|
|
real(psb_spk_), intent(in) :: val
|
|
|
|
real(psb_spk_), intent(in) :: val
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
call mld_inner_precset(p,what,val,info)
|
|
|
|
call mld_inner_precset(p,what,val,info)
|
|
|
|
end subroutine mld_i_zprecsetr
|
|
|
|
end subroutine mld_c_iprecsetr
|
|
|
|
|
|
|
|
|
|
|
|
subroutine mld_i_zprecsetc(p,what,val,info)
|
|
|
|
subroutine mld_c_iprecsetc(p,what,val,info)
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
|
|
|
|
|
|
|
use mld_c_prec_type, only : mld_cprec_type
|
|
|
|
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
type(mld_cprec_type), intent(inout) :: p
|
|
|
|
integer, intent(in) :: what
|
|
|
|
integer, intent(in) :: what
|
|
|
|
character(len=*), intent(in) :: val
|
|
|
|
character(len=*), intent(in) :: val
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
call mld_inner_precset(p,what,val,info)
|
|
|
|
call mld_inner_precset(p,what,val,info)
|
|
|
|
end subroutine mld_i_zprecsetc
|
|
|
|
end subroutine mld_c_iprecsetc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end module mld_c_prec_mod
|
|
|
|
end module mld_c_prec_mod
|
|
|
|