|
|
|
@ -99,6 +99,7 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
|
|
|
|
|
use mld_z_mumps_solver
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
! Arguments
|
|
|
|
@ -154,9 +155,10 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
|
|
|
|
|
call onelev_set_smoother(p%precv(ilev_),val,info)
|
|
|
|
|
case('SUB_SOLVE')
|
|
|
|
|
call onelev_set_solver(p%precv(ilev_),val,info)
|
|
|
|
|
case('SMOOTHER_SWEEPS','ML_TYPE','AGGR_ALG','AGGR_KIND',&
|
|
|
|
|
& 'SMOOTHER_POS','AGGR_OMEGA_ALG','AGGR_EIG',&
|
|
|
|
|
& 'SMOOTHER_SWEEPS_PRE','SMOOTHER_SWEEPS_POST',&
|
|
|
|
|
case('SMOOTHER_SWEEPS','ML_TYPE','AGGR_ALG','AGGR_ORD',&
|
|
|
|
|
& 'AGGR_KIND','SMOOTHER_POS','AGGR_OMEGA_ALG',&
|
|
|
|
|
& 'AGGR_EIG','SMOOTHER_SWEEPS_PRE',&
|
|
|
|
|
& 'SMOOTHER_SWEEPS_POST',&
|
|
|
|
|
& 'SUB_RESTR','SUB_PROL', &
|
|
|
|
|
& 'SUB_REN','SUB_OVR','SUB_FILLIN')
|
|
|
|
|
call p%precv(ilev_)%set(what,val,info)
|
|
|
|
@ -172,9 +174,10 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
|
|
|
|
|
call onelev_set_smoother(p%precv(ilev_),val,info)
|
|
|
|
|
case('SUB_SOLVE')
|
|
|
|
|
call onelev_set_solver(p%precv(ilev_),val,info)
|
|
|
|
|
case('SMOOTHER_SWEEPS','ML_TYPE','AGGR_ALG','AGGR_KIND',&
|
|
|
|
|
& 'SMOOTHER_POS','AGGR_OMEGA_ALG','AGGR_EIG',&
|
|
|
|
|
& 'SMOOTHER_SWEEPS_PRE','SMOOTHER_SWEEPS_POST',&
|
|
|
|
|
case('SMOOTHER_SWEEPS','ML_TYPE','AGGR_ALG','AGGR_ORD',&
|
|
|
|
|
& 'AGGR_KIND','SMOOTHER_POS','AGGR_OMEGA_ALG',&
|
|
|
|
|
& 'AGGR_EIG','SMOOTHER_SWEEPS_PRE',&
|
|
|
|
|
& 'SMOOTHER_SWEEPS_POST',&
|
|
|
|
|
& 'SUB_RESTR','SUB_PROL', &
|
|
|
|
|
& 'SUB_REN','SUB_OVR','SUB_FILLIN',&
|
|
|
|
|
& 'COARSE_MAT')
|
|
|
|
@ -288,7 +291,7 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
|
|
|
|
|
call onelev_set_smoother(p%precv(ilev_),val,info)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
case('ML_TYPE','AGGR_ALG','AGGR_KIND',&
|
|
|
|
|
case('ML_TYPE','AGGR_ALG','AGGR_ORD','AGGR_KIND',&
|
|
|
|
|
& 'SMOOTHER_SWEEPS_PRE','SMOOTHER_SWEEPS_POST',&
|
|
|
|
|
& 'SMOOTHER_POS','AGGR_OMEGA_ALG',&
|
|
|
|
|
& 'AGGR_EIG','AGGR_FILTER')
|
|
|
|
@ -330,7 +333,6 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
|
|
|
|
|
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
|
|
|
|
|
call onelev_set_solver(p%precv(nlev_),val,info)
|
|
|
|
|
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
|
|
|
|
|
|
|
|
|
|
case(mld_jac_)
|
|
|
|
|
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
|
|
|
|
|
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
|
|
|
|
@ -594,46 +596,42 @@ contains
|
|
|
|
|
info = -5
|
|
|
|
|
end if
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_UMF_
|
|
|
|
|
case (mld_umf_)
|
|
|
|
|
if (allocated(level%sm)) then
|
|
|
|
|
#ifdef HAVE_MUMPS_
|
|
|
|
|
case (mld_mumps_)
|
|
|
|
|
if (allocated(level%sm%sv)) then
|
|
|
|
|
select type (sv => level%sm%sv)
|
|
|
|
|
class is (mld_z_umf_solver_type)
|
|
|
|
|
class is (mld_z_mumps_solver_type)
|
|
|
|
|
! do nothing
|
|
|
|
|
class default
|
|
|
|
|
call level%sm%sv%free(info)
|
|
|
|
|
if (info == 0) deallocate(level%sm%sv)
|
|
|
|
|
if (info == 0) allocate(mld_z_umf_solver_type ::&
|
|
|
|
|
if (info == 0) allocate(mld_z_mumps_solver_type ::&
|
|
|
|
|
& level%sm%sv, stat=info)
|
|
|
|
|
end select
|
|
|
|
|
else
|
|
|
|
|
allocate(mld_z_umf_solver_type :: level%sm%sv, stat=info)
|
|
|
|
|
allocate(mld_z_mumps_solver_type :: level%sm%sv, stat=info)
|
|
|
|
|
endif
|
|
|
|
|
if (allocated(level%sm)) then
|
|
|
|
|
if (allocated(level%sm%sv)) &
|
|
|
|
|
& call level%sm%sv%default()
|
|
|
|
|
end if
|
|
|
|
|
else
|
|
|
|
|
write(0,*) 'Calling set_solver without a smoother?'
|
|
|
|
|
info = -5
|
|
|
|
|
end if
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SLUDIST_
|
|
|
|
|
case (mld_sludist_)
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_UMF_
|
|
|
|
|
case (mld_umf_)
|
|
|
|
|
if (allocated(level%sm)) then
|
|
|
|
|
if (allocated(level%sm%sv)) then
|
|
|
|
|
select type (sv => level%sm%sv)
|
|
|
|
|
class is (mld_z_sludist_solver_type)
|
|
|
|
|
class is (mld_z_umf_solver_type)
|
|
|
|
|
! do nothing
|
|
|
|
|
class default
|
|
|
|
|
call level%sm%sv%free(info)
|
|
|
|
|
if (info == 0) deallocate(level%sm%sv)
|
|
|
|
|
if (info == 0) allocate(mld_z_sludist_solver_type ::&
|
|
|
|
|
if (info == 0) allocate(mld_z_umf_solver_type ::&
|
|
|
|
|
& level%sm%sv, stat=info)
|
|
|
|
|
end select
|
|
|
|
|
else
|
|
|
|
|
allocate(mld_z_sludist_solver_type :: level%sm%sv, stat=info)
|
|
|
|
|
allocate(mld_z_umf_solver_type :: level%sm%sv, stat=info)
|
|
|
|
|
endif
|
|
|
|
|
if (allocated(level%sm)) then
|
|
|
|
|
if (allocated(level%sm%sv)) &
|
|
|
|
@ -644,28 +642,31 @@ contains
|
|
|
|
|
info = -5
|
|
|
|
|
end if
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_MUMPS_
|
|
|
|
|
case (mld_mumps_)
|
|
|
|
|
#ifdef HAVE_SLUDIST_
|
|
|
|
|
case (mld_sludist_)
|
|
|
|
|
if (allocated(level%sm)) then
|
|
|
|
|
if (allocated(level%sm%sv)) then
|
|
|
|
|
select type (sv => level%sm%sv)
|
|
|
|
|
class is (mld_z_mumps_solver_type)
|
|
|
|
|
class is (mld_z_sludist_solver_type)
|
|
|
|
|
! do nothing
|
|
|
|
|
class default
|
|
|
|
|
call level%sm%sv%free(info)
|
|
|
|
|
if (info == 0) deallocate(level%sm%sv)
|
|
|
|
|
if (info == 0) allocate(mld_z_mumps_solver_type ::&
|
|
|
|
|
if (info == 0) allocate(mld_z_sludist_solver_type ::&
|
|
|
|
|
& level%sm%sv, stat=info)
|
|
|
|
|
end select
|
|
|
|
|
else
|
|
|
|
|
allocate(mld_z_mumps_solver_type :: level%sm%sv, stat=info)
|
|
|
|
|
allocate(mld_z_sludist_solver_type :: level%sm%sv, stat=info)
|
|
|
|
|
endif
|
|
|
|
|
if (allocated(level%sm)) then
|
|
|
|
|
if (allocated(level%sm%sv)) &
|
|
|
|
|
& call level%sm%sv%default()
|
|
|
|
|
end if
|
|
|
|
|
else
|
|
|
|
|
write(0,*) 'Calling set_solver without a smoother?'
|
|
|
|
|
info = -5
|
|
|
|
|
end if
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
case default
|
|
|
|
|
!
|
|
|
|
|
! Do nothing and hope for the best :)
|
|
|
|
|