mld2p4-2:

mld_cprecset.F90
 mld_dprecset.F90
 mld_sprecset.F90
 mld_zprecset.F90

Fixed handling of set sub_solve for ILU variants.
This commit is contained in:
Salvatore Filippone
2011-05-20 12:48:31 +00:00
parent 338dda1762
commit 10e48562a4
4 changed files with 96 additions and 20 deletions
+21 -4
View File
@@ -454,6 +454,12 @@ contains
else
allocate(mld_c_id_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
case (mld_diag_scale_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
@@ -468,6 +474,11 @@ contains
else
allocate(mld_c_diag_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
case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_)
if (allocated(level%sm%sv)) then
@@ -483,6 +494,12 @@ contains
else
allocate(mld_c_ilu_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
call level%sm%sv%set(mld_sub_solve_,val,info)
#ifdef HAVE_SLU_
case (mld_slu_)
if (allocated(level%sm%sv)) then
@@ -498,16 +515,16 @@ contains
else
allocate(mld_c_slu_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
#endif
case default
!
! Do nothing and hope for the best :)
!
end select
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) &
& call level%sm%sv%default()
end if
end subroutine onelev_set_solver
+28 -7
View File
@@ -461,6 +461,12 @@ contains
else
allocate(mld_d_id_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
case (mld_diag_scale_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
@@ -475,13 +481,18 @@ contains
else
allocate(mld_d_diag_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
case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_d_ilu_solver_type)
! do nothing
class default
class is (mld_d_ilu_solver_type)
! do nothing
class default
call level%sm%sv%free(info)
if (info == 0) deallocate(level%sm%sv)
if (info == 0) allocate(mld_d_ilu_solver_type ::&
@@ -490,6 +501,12 @@ contains
else
allocate(mld_d_ilu_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
call level%sm%sv%set(mld_sub_solve_,val,info)
#ifdef HAVE_UMF_
case (mld_umf_)
if (allocated(level%sm%sv)) then
@@ -505,6 +522,10 @@ contains
else
allocate(mld_d_umf_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
#endif
#ifdef HAVE_SLU_
case (mld_slu_)
@@ -521,16 +542,16 @@ contains
else
allocate(mld_d_slu_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
#endif
case default
!
! Do nothing and hope for the best :)
!
end select
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) &
& call level%sm%sv%default()
end if
end subroutine onelev_set_solver
+21 -4
View File
@@ -455,6 +455,12 @@ contains
else
allocate(mld_s_id_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
case (mld_diag_scale_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
@@ -469,6 +475,11 @@ contains
else
allocate(mld_s_diag_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
case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_)
if (allocated(level%sm%sv)) then
@@ -484,6 +495,12 @@ contains
else
allocate(mld_s_ilu_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
call level%sm%sv%set(mld_sub_solve_,val,info)
#ifdef HAVE_SLU_
case (mld_slu_)
if (allocated(level%sm%sv)) then
@@ -499,16 +516,16 @@ contains
else
allocate(mld_s_slu_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
#endif
case default
!
! Do nothing and hope for the best :)
!
end select
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) &
& call level%sm%sv%default()
end if
end subroutine onelev_set_solver
+26 -5
View File
@@ -462,6 +462,12 @@ contains
else
allocate(mld_z_id_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
case (mld_diag_scale_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
@@ -476,7 +482,12 @@ contains
else
allocate(mld_z_diag_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
case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
@@ -491,6 +502,12 @@ contains
else
allocate(mld_z_ilu_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
call level%sm%sv%set(mld_sub_solve_,val,info)
#ifdef HAVE_UMF_
case (mld_umf_)
if (allocated(level%sm%sv)) then
@@ -506,6 +523,10 @@ contains
else
allocate(mld_z_umf_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
#endif
#ifdef HAVE_SLU_
case (mld_slu_)
@@ -522,16 +543,16 @@ contains
else
allocate(mld_z_slu_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
#endif
case default
!
! Do nothing and hope for the best :)
!
end select
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) &
& call level%sm%sv%default()
end if
end subroutine onelev_set_solver