From ae3699b09ed0a16a90b9c2dee3c61c8321682109 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 4 Oct 2016 16:02:57 +0000 Subject: [PATCH] mld2p4-2: mlprec/mld_c_as_smoother.f90 mlprec/mld_c_base_smoother_mod.f90 mlprec/mld_c_diag_solver.f90 mlprec/mld_c_gs_solver.f90 mlprec/mld_c_id_solver.f90 mlprec/mld_c_ilu_fact_mod.f90 mlprec/mld_c_ilu_solver.f90 mlprec/mld_c_inner_mod.f90 mlprec/mld_c_jac_smoother.f90 mlprec/mld_c_mumps_solver.F90 mlprec/mld_c_slu_solver.F90 mlprec/mld_c_sludist_solver.F90 mlprec/mld_c_umf_solver.F90 mlprec/mld_d_as_smoother.f90 mlprec/mld_d_base_smoother_mod.f90 mlprec/mld_d_diag_solver.f90 mlprec/mld_d_gs_solver.f90 mlprec/mld_d_id_solver.f90 mlprec/mld_d_ilu_fact_mod.f90 mlprec/mld_d_ilu_solver.f90 mlprec/mld_d_inner_mod.f90 mlprec/mld_d_jac_smoother.f90 mlprec/mld_d_mumps_solver.F90 mlprec/mld_d_slu_solver.F90 mlprec/mld_d_sludist_solver.F90 mlprec/mld_d_umf_solver.F90 mlprec/mld_s_as_smoother.f90 mlprec/mld_s_base_smoother_mod.f90 mlprec/mld_s_diag_solver.f90 mlprec/mld_s_gs_solver.f90 mlprec/mld_s_id_solver.f90 mlprec/mld_s_ilu_fact_mod.f90 mlprec/mld_s_ilu_solver.f90 mlprec/mld_s_inner_mod.f90 mlprec/mld_s_jac_smoother.f90 mlprec/mld_s_mumps_solver.F90 mlprec/mld_s_slu_solver.F90 mlprec/mld_s_sludist_solver.F90 mlprec/mld_s_umf_solver.F90 mlprec/mld_z_as_smoother.f90 mlprec/mld_z_base_smoother_mod.f90 mlprec/mld_z_diag_solver.f90 mlprec/mld_z_gs_solver.f90 mlprec/mld_z_id_solver.f90 mlprec/mld_z_ilu_fact_mod.f90 mlprec/mld_z_ilu_solver.f90 mlprec/mld_z_inner_mod.f90 mlprec/mld_z_jac_smoother.f90 mlprec/mld_z_mumps_solver.F90 mlprec/mld_z_slu_solver.F90 mlprec/mld_z_sludist_solver.F90 mlprec/mld_z_umf_solver.F90 Refined file prologues. --- mlprec/mld_c_as_smoother.f90 | 17 ++++++++++++- mlprec/mld_c_base_smoother_mod.f90 | 11 +++++++-- mlprec/mld_c_diag_solver.f90 | 10 +++++--- mlprec/mld_c_gs_solver.f90 | 10 +++++++- mlprec/mld_c_id_solver.f90 | 1 - mlprec/mld_c_ilu_fact_mod.f90 | 10 ++++++++ mlprec/mld_c_ilu_solver.f90 | 14 ++++++++++- mlprec/mld_c_inner_mod.f90 | 38 +++--------------------------- mlprec/mld_c_jac_smoother.f90 | 14 ++++++++--- mlprec/mld_c_mumps_solver.F90 | 10 +++++--- mlprec/mld_c_slu_solver.F90 | 10 +++++--- mlprec/mld_c_sludist_solver.F90 | 7 +++++- mlprec/mld_c_umf_solver.F90 | 10 +++++--- mlprec/mld_d_as_smoother.f90 | 17 ++++++++++++- mlprec/mld_d_base_smoother_mod.f90 | 11 +++++++-- mlprec/mld_d_diag_solver.f90 | 10 +++++--- mlprec/mld_d_gs_solver.f90 | 10 +++++++- mlprec/mld_d_id_solver.f90 | 1 - mlprec/mld_d_ilu_fact_mod.f90 | 10 ++++++++ mlprec/mld_d_ilu_solver.f90 | 14 ++++++++++- mlprec/mld_d_inner_mod.f90 | 38 +++--------------------------- mlprec/mld_d_jac_smoother.f90 | 14 ++++++++--- mlprec/mld_d_mumps_solver.F90 | 10 +++++--- mlprec/mld_d_slu_solver.F90 | 10 +++++--- mlprec/mld_d_sludist_solver.F90 | 7 +++++- mlprec/mld_d_umf_solver.F90 | 10 +++++--- mlprec/mld_s_as_smoother.f90 | 17 ++++++++++++- mlprec/mld_s_base_smoother_mod.f90 | 11 +++++++-- mlprec/mld_s_diag_solver.f90 | 10 +++++--- mlprec/mld_s_gs_solver.f90 | 10 +++++++- mlprec/mld_s_id_solver.f90 | 1 - mlprec/mld_s_ilu_fact_mod.f90 | 10 ++++++++ mlprec/mld_s_ilu_solver.f90 | 14 ++++++++++- mlprec/mld_s_inner_mod.f90 | 38 +++--------------------------- mlprec/mld_s_jac_smoother.f90 | 14 ++++++++--- mlprec/mld_s_mumps_solver.F90 | 10 +++++--- mlprec/mld_s_slu_solver.F90 | 10 +++++--- mlprec/mld_s_sludist_solver.F90 | 7 +++++- mlprec/mld_s_umf_solver.F90 | 10 +++++--- mlprec/mld_z_as_smoother.f90 | 17 ++++++++++++- mlprec/mld_z_base_smoother_mod.f90 | 11 +++++++-- mlprec/mld_z_diag_solver.f90 | 10 +++++--- mlprec/mld_z_gs_solver.f90 | 10 +++++++- mlprec/mld_z_id_solver.f90 | 1 - mlprec/mld_z_ilu_fact_mod.f90 | 10 ++++++++ mlprec/mld_z_ilu_solver.f90 | 14 ++++++++++- mlprec/mld_z_inner_mod.f90 | 38 +++--------------------------- mlprec/mld_z_jac_smoother.f90 | 14 ++++++++--- mlprec/mld_z_mumps_solver.F90 | 10 +++++--- mlprec/mld_z_slu_solver.F90 | 10 +++++--- mlprec/mld_z_sludist_solver.F90 | 7 +++++- mlprec/mld_z_umf_solver.F90 | 10 +++++--- 52 files changed, 420 insertions(+), 228 deletions(-) diff --git a/mlprec/mld_c_as_smoother.f90 b/mlprec/mld_c_as_smoother.f90 index 9b968a00..85e86098 100644 --- a/mlprec/mld_c_as_smoother.f90 +++ b/mlprec/mld_c_as_smoother.f90 @@ -37,11 +37,26 @@ !!$ !!$ ! +! File: mld_c_as_smoother_mod.f90 ! +! Module: mld_c_as_smoother_mod ! +! This module defines: +! the mld_c_as_smoother_type data structure containing the +! smoother for an Additive Schwarz smoother. ! +! To begin with, the build procedure constructs the extended +! matrix A and its corresponding descriptor (this has multiple +! halo layers duplicated across different processes); it then +! stores in ND the block off-diagonal matrix, and builds the solver +! on the (extended) block diagonal matrix. ! -! +! The code allows for the variations of Additive Schwartz, Restricted +! Additive Schwartz and Additive Schwartz with Harmonic Extensions. +! From an implementation point of view, these are handled by +! combining application/non-application of the prolongator/restrictor +! operators. +! module mld_c_as_smoother use mld_c_base_smoother_mod diff --git a/mlprec/mld_c_base_smoother_mod.f90 b/mlprec/mld_c_base_smoother_mod.f90 index 8e3bfca2..8160ded9 100644 --- a/mlprec/mld_c_base_smoother_mod.f90 +++ b/mlprec/mld_c_base_smoother_mod.f90 @@ -48,9 +48,16 @@ ! - Building and applying; ! - checking if the smoother is correctly defined; ! - printing a description of the preconditioner; -! - deallocating the preconditioner data structure. +! - deallocating the preconditioner data structure. +! +! What is the difference between a smoother and a solver? +! In the mathematics literature the two concepts are treated +! essentially as synonymous, but here we are using them in a more +! computer-science oriented fashion. In particular, a SMOOTHER object +! contains a SOLVER object: the SOLVER operates locally within the +! current process, whereas the SMOOTHER object accounts for (possible) +! interactions between processes. ! - module mld_c_base_smoother_mod use mld_c_base_solver_mod diff --git a/mlprec/mld_c_diag_solver.f90 b/mlprec/mld_c_diag_solver.f90 index 8332784a..0e72703d 100644 --- a/mlprec/mld_c_diag_solver.f90 +++ b/mlprec/mld_c_diag_solver.f90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_c_diag_solver_mod.f90 ! +! Module: mld_c_diag_solver_mod ! +! This module defines: +! - the mld_c_diag_solver_type data structure containing the +! simple diagonal solver. This extracts the main diagonal of a matrix +! and precomputes its inverse. Combined with a Jacobi "smoother" generates +! what are commonly known as the classic Jacobi iterations ! -! -! - module mld_c_diag_solver use mld_c_base_solver_mod diff --git a/mlprec/mld_c_gs_solver.f90 b/mlprec/mld_c_gs_solver.f90 index bbd8a5d3..340cd718 100644 --- a/mlprec/mld_c_gs_solver.f90 +++ b/mlprec/mld_c_gs_solver.f90 @@ -38,11 +38,19 @@ !!$ ! ! +! File: mld_c_gs_solver_mod.f90 ! +! Module: mld_c_gs_solver_mod ! +! This module defines: +! - the mld_c_gs_solver_type data structure containing the ingredients +! for a local Gauss-Seidel iteration. We provide Forward GS (FWGS) and +! backward GS (BWGS). The iterations are local to a process (they operate +! on the block diagonal). Combined with a Jacobi smoother will generate a +! hybrid-Gauss-Seidel solver, i.e. Gauss-Seidel within each process, Jacobi +! among the processes. ! ! - module mld_c_gs_solver use mld_c_base_solver_mod diff --git a/mlprec/mld_c_id_solver.f90 b/mlprec/mld_c_id_solver.f90 index ef675ea3..f0861fb6 100644 --- a/mlprec/mld_c_id_solver.f90 +++ b/mlprec/mld_c_id_solver.f90 @@ -42,7 +42,6 @@ ! Identity solver. Reference for nullprec. ! ! - module mld_c_id_solver use mld_c_base_solver_mod diff --git a/mlprec/mld_c_ilu_fact_mod.f90 b/mlprec/mld_c_ilu_fact_mod.f90 index b66728b0..80aa3428 100644 --- a/mlprec/mld_c_ilu_fact_mod.f90 +++ b/mlprec/mld_c_ilu_fact_mod.f90 @@ -36,6 +36,16 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ +! +! +! File: mld_c_ilu_fact_mod.f90 +! +! Module: mld_c_ilu_fact_mod +! +! This module defines some interfaces used internally by the implementation if +! mld_c_ilu_solver, but not visible to the end user. +! +! module mld_c_ilu_fact_mod use mld_c_base_solver_mod diff --git a/mlprec/mld_c_ilu_solver.f90 b/mlprec/mld_c_ilu_solver.f90 index c2392851..3ec2f242 100644 --- a/mlprec/mld_c_ilu_solver.f90 +++ b/mlprec/mld_c_ilu_solver.f90 @@ -38,11 +38,23 @@ !!$ ! ! +! File: mld_c_ilu_solver_mod.f90 ! +! Module: mld_c_ilu_solver_mod ! +! This module defines: +! - the mld_c_ilu_solver_type data structure containing the ingredients +! for a local Incomplete LU factorization. +! 1. The factorization is always restricted to the diagonal block of the +! current image (coherently with the definition of a SOLVER as a local +! object) +! 2. The code provides support for both pattern-based ILU(K) and +! threshold base ILU(T,L) +! 3. The diagonal is stored separately, so strictly speaking this is +! an incomplete LDU factorization; +! 4. The application phase is shared; ! ! - module mld_c_ilu_solver use mld_base_prec_type, only : mld_fact_names diff --git a/mlprec/mld_c_inner_mod.f90 b/mlprec/mld_c_inner_mod.f90 index bf447a14..c13d9e1b 100644 --- a/mlprec/mld_c_inner_mod.f90 +++ b/mlprec/mld_c_inner_mod.f90 @@ -41,8 +41,8 @@ ! Module: mld_inner_mod ! ! This module defines the interfaces to the real/complex, single/double -! precision versions of the MLD2P4 routines, except those of the user level, -! whose interfaces are defined in mld_prec_mod.f90. +! precision versions of inner MLD2P4 routines. +! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_c_inner_mod use mld_c_prec_type @@ -93,35 +93,7 @@ module mld_c_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_cmlprec_aply_vect end interface mld_mlprec_aply - - interface mld_bld_mlhier_aggsize - subroutine mld_c_bld_mlhier_aggsize(casize,mxplevs,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_cspmat_type, psb_desc_type,psb_spk_ - use mld_c_prec_type, only : mld_c_onelev_type - implicit none - integer(psb_ipk_), intent(in) :: casize,mxplevs - real(psb_spk_) :: mnaggratio - type(psb_cspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_c_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_c_bld_mlhier_aggsize - end interface mld_bld_mlhier_aggsize - - interface mld_bld_mlhier_array - subroutine mld_c_bld_mlhier_array(nplevs,casize,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_cspmat_type, psb_desc_type, psb_spk_ - use mld_c_prec_type, only : mld_c_onelev_type - implicit none - integer(psb_ipk_), intent(inout) :: nplevs, casize - real(psb_spk_) :: mnaggratio - type(psb_cspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_c_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_c_bld_mlhier_array - end interface mld_bld_mlhier_array - + interface mld_aggrmap_bld subroutine mld_c_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ @@ -191,8 +163,6 @@ module mld_c_inner_mod end subroutine mld_caggrmat_asb end interface mld_aggrmat_asb - - abstract interface subroutine mld_caggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ @@ -207,10 +177,8 @@ module mld_c_inner_mod end subroutine mld_caggrmat_var_asb end interface - procedure(mld_caggrmat_var_asb) :: mld_caggrmat_nosmth_asb, & & mld_caggrmat_smth_asb, mld_caggrmat_minnrg_asb, & & mld_caggrmat_biz_asb - end module mld_c_inner_mod diff --git a/mlprec/mld_c_jac_smoother.f90 b/mlprec/mld_c_jac_smoother.f90 index 9611722d..36930e9a 100644 --- a/mlprec/mld_c_jac_smoother.f90 +++ b/mlprec/mld_c_jac_smoother.f90 @@ -37,11 +37,19 @@ !!$ !!$ ! +! File: mld_c_jac_smoother_mod.f90 ! +! Module: mld_c_jac_smoother_mod ! -! -! -! +! This module defines: +! the mld_c_jac_smoother_type data structure containing the +! smoother for a Jacobi/block Jacobi smoother. +! The smoother stores in ND the block off-diagonal matrix. +! One special case is treated separately, when the solver is DIAG +! then the ND is the entire off-diagonal part of the matrix (including the +! main diagonal block), so that it becomes possible to implement +! pure Jacobi global solver. +! module mld_c_jac_smoother use mld_c_base_smoother_mod diff --git a/mlprec/mld_c_mumps_solver.F90 b/mlprec/mld_c_mumps_solver.F90 index 17e2749a..e2db2ea2 100644 --- a/mlprec/mld_c_mumps_solver.F90 +++ b/mlprec/mld_c_mumps_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_c_mumps_solver_mod.f90 ! +! Module: mld_c_mumps_solver_mod ! +! This module defines: +! - the mld_c_mumps_solver_type data structure containing the ingredients +! to interface with the MUMPS package. +! 1. The factorization can be either restricted to the diagonal block of the +! current image or distributed (and thus exact) ! -! -! - module mld_c_mumps_solver #if defined(HAVE_MUMPS_) use cmumps_struc_def diff --git a/mlprec/mld_c_slu_solver.F90 b/mlprec/mld_c_slu_solver.F90 index bbe10364..a7155078 100644 --- a/mlprec/mld_c_slu_solver.F90 +++ b/mlprec/mld_c_slu_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_c_slu_solver_mod.f90 ! +! Module: mld_c_slu_solver_mod ! +! This module defines: +! - the mld_c_slu_solver_type data structure containing the ingredients +! to interface with the SuperLU package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_c_slu_solver use iso_c_binding diff --git a/mlprec/mld_c_sludist_solver.F90 b/mlprec/mld_c_sludist_solver.F90 index d4941020..5f18d49a 100644 --- a/mlprec/mld_c_sludist_solver.F90 +++ b/mlprec/mld_c_sludist_solver.F90 @@ -37,12 +37,17 @@ !!$ !!$ ! +! File: mld_c_sludist_solver_mod.f90 ! +! Module: mld_c_sludist_solver_mod ! +! This module defines: +! - the mld_c_sludist_solver_type data structure containing the ingredients +! to interface with the SuperLU_Dist package. +! 1. The factorization is distributed (and thus exact) ! ! ! - module mld_c_sludist_solver use iso_c_binding diff --git a/mlprec/mld_c_umf_solver.F90 b/mlprec/mld_c_umf_solver.F90 index 67d6e0a1..3dd72673 100644 --- a/mlprec/mld_c_umf_solver.F90 +++ b/mlprec/mld_c_umf_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_c_umf_solver_mod.f90 ! +! Module: mld_c_umf_solver_mod ! +! This module defines: +! - the mld_c_umf_solver_type data structure containing the ingredients +! to interface with the UMFPACK package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_c_umf_solver use iso_c_binding diff --git a/mlprec/mld_d_as_smoother.f90 b/mlprec/mld_d_as_smoother.f90 index b6282334..305f8c96 100644 --- a/mlprec/mld_d_as_smoother.f90 +++ b/mlprec/mld_d_as_smoother.f90 @@ -37,11 +37,26 @@ !!$ !!$ ! +! File: mld_d_as_smoother_mod.f90 ! +! Module: mld_d_as_smoother_mod ! +! This module defines: +! the mld_d_as_smoother_type data structure containing the +! smoother for an Additive Schwarz smoother. ! +! To begin with, the build procedure constructs the extended +! matrix A and its corresponding descriptor (this has multiple +! halo layers duplicated across different processes); it then +! stores in ND the block off-diagonal matrix, and builds the solver +! on the (extended) block diagonal matrix. ! -! +! The code allows for the variations of Additive Schwartz, Restricted +! Additive Schwartz and Additive Schwartz with Harmonic Extensions. +! From an implementation point of view, these are handled by +! combining application/non-application of the prolongator/restrictor +! operators. +! module mld_d_as_smoother use mld_d_base_smoother_mod diff --git a/mlprec/mld_d_base_smoother_mod.f90 b/mlprec/mld_d_base_smoother_mod.f90 index d5cf0bda..547e5657 100644 --- a/mlprec/mld_d_base_smoother_mod.f90 +++ b/mlprec/mld_d_base_smoother_mod.f90 @@ -48,9 +48,16 @@ ! - Building and applying; ! - checking if the smoother is correctly defined; ! - printing a description of the preconditioner; -! - deallocating the preconditioner data structure. +! - deallocating the preconditioner data structure. +! +! What is the difference between a smoother and a solver? +! In the mathematics literature the two concepts are treated +! essentially as synonymous, but here we are using them in a more +! computer-science oriented fashion. In particular, a SMOOTHER object +! contains a SOLVER object: the SOLVER operates locally within the +! current process, whereas the SMOOTHER object accounts for (possible) +! interactions between processes. ! - module mld_d_base_smoother_mod use mld_d_base_solver_mod diff --git a/mlprec/mld_d_diag_solver.f90 b/mlprec/mld_d_diag_solver.f90 index c4139e05..04051340 100644 --- a/mlprec/mld_d_diag_solver.f90 +++ b/mlprec/mld_d_diag_solver.f90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_d_diag_solver_mod.f90 ! +! Module: mld_d_diag_solver_mod ! +! This module defines: +! - the mld_d_diag_solver_type data structure containing the +! simple diagonal solver. This extracts the main diagonal of a matrix +! and precomputes its inverse. Combined with a Jacobi "smoother" generates +! what are commonly known as the classic Jacobi iterations ! -! -! - module mld_d_diag_solver use mld_d_base_solver_mod diff --git a/mlprec/mld_d_gs_solver.f90 b/mlprec/mld_d_gs_solver.f90 index c8b2f8a0..5508a46f 100644 --- a/mlprec/mld_d_gs_solver.f90 +++ b/mlprec/mld_d_gs_solver.f90 @@ -38,11 +38,19 @@ !!$ ! ! +! File: mld_d_gs_solver_mod.f90 ! +! Module: mld_d_gs_solver_mod ! +! This module defines: +! - the mld_d_gs_solver_type data structure containing the ingredients +! for a local Gauss-Seidel iteration. We provide Forward GS (FWGS) and +! backward GS (BWGS). The iterations are local to a process (they operate +! on the block diagonal). Combined with a Jacobi smoother will generate a +! hybrid-Gauss-Seidel solver, i.e. Gauss-Seidel within each process, Jacobi +! among the processes. ! ! - module mld_d_gs_solver use mld_d_base_solver_mod diff --git a/mlprec/mld_d_id_solver.f90 b/mlprec/mld_d_id_solver.f90 index 55a22365..22318780 100644 --- a/mlprec/mld_d_id_solver.f90 +++ b/mlprec/mld_d_id_solver.f90 @@ -42,7 +42,6 @@ ! Identity solver. Reference for nullprec. ! ! - module mld_d_id_solver use mld_d_base_solver_mod diff --git a/mlprec/mld_d_ilu_fact_mod.f90 b/mlprec/mld_d_ilu_fact_mod.f90 index 7da73657..3977ec07 100644 --- a/mlprec/mld_d_ilu_fact_mod.f90 +++ b/mlprec/mld_d_ilu_fact_mod.f90 @@ -36,6 +36,16 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ +! +! +! File: mld_d_ilu_fact_mod.f90 +! +! Module: mld_d_ilu_fact_mod +! +! This module defines some interfaces used internally by the implementation if +! mld_d_ilu_solver, but not visible to the end user. +! +! module mld_d_ilu_fact_mod use mld_d_base_solver_mod diff --git a/mlprec/mld_d_ilu_solver.f90 b/mlprec/mld_d_ilu_solver.f90 index 83288d24..2566c473 100644 --- a/mlprec/mld_d_ilu_solver.f90 +++ b/mlprec/mld_d_ilu_solver.f90 @@ -38,11 +38,23 @@ !!$ ! ! +! File: mld_d_ilu_solver_mod.f90 ! +! Module: mld_d_ilu_solver_mod ! +! This module defines: +! - the mld_d_ilu_solver_type data structure containing the ingredients +! for a local Incomplete LU factorization. +! 1. The factorization is always restricted to the diagonal block of the +! current image (coherently with the definition of a SOLVER as a local +! object) +! 2. The code provides support for both pattern-based ILU(K) and +! threshold base ILU(T,L) +! 3. The diagonal is stored separately, so strictly speaking this is +! an incomplete LDU factorization; +! 4. The application phase is shared; ! ! - module mld_d_ilu_solver use mld_base_prec_type, only : mld_fact_names diff --git a/mlprec/mld_d_inner_mod.f90 b/mlprec/mld_d_inner_mod.f90 index cd4dd596..b30526f6 100644 --- a/mlprec/mld_d_inner_mod.f90 +++ b/mlprec/mld_d_inner_mod.f90 @@ -41,8 +41,8 @@ ! Module: mld_inner_mod ! ! This module defines the interfaces to the real/complex, single/double -! precision versions of the MLD2P4 routines, except those of the user level, -! whose interfaces are defined in mld_prec_mod.f90. +! precision versions of inner MLD2P4 routines. +! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_d_inner_mod use mld_d_prec_type @@ -93,35 +93,7 @@ module mld_d_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_dmlprec_aply_vect end interface mld_mlprec_aply - - interface mld_bld_mlhier_aggsize - subroutine mld_d_bld_mlhier_aggsize(casize,mxplevs,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_dspmat_type, psb_desc_type,psb_dpk_ - use mld_d_prec_type, only : mld_d_onelev_type - implicit none - integer(psb_ipk_), intent(in) :: casize,mxplevs - real(psb_dpk_) :: mnaggratio - type(psb_dspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_d_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_d_bld_mlhier_aggsize - end interface mld_bld_mlhier_aggsize - - interface mld_bld_mlhier_array - subroutine mld_d_bld_mlhier_array(nplevs,casize,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_dspmat_type, psb_desc_type, psb_dpk_ - use mld_d_prec_type, only : mld_d_onelev_type - implicit none - integer(psb_ipk_), intent(inout) :: nplevs, casize - real(psb_dpk_) :: mnaggratio - type(psb_dspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_d_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_d_bld_mlhier_array - end interface mld_bld_mlhier_array - + interface mld_aggrmap_bld subroutine mld_d_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ @@ -191,8 +163,6 @@ module mld_d_inner_mod end subroutine mld_daggrmat_asb end interface mld_aggrmat_asb - - abstract interface subroutine mld_daggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ @@ -207,10 +177,8 @@ module mld_d_inner_mod end subroutine mld_daggrmat_var_asb end interface - procedure(mld_daggrmat_var_asb) :: mld_daggrmat_nosmth_asb, & & mld_daggrmat_smth_asb, mld_daggrmat_minnrg_asb, & & mld_daggrmat_biz_asb - end module mld_d_inner_mod diff --git a/mlprec/mld_d_jac_smoother.f90 b/mlprec/mld_d_jac_smoother.f90 index 54a8bd11..dc3a6ab8 100644 --- a/mlprec/mld_d_jac_smoother.f90 +++ b/mlprec/mld_d_jac_smoother.f90 @@ -37,11 +37,19 @@ !!$ !!$ ! +! File: mld_d_jac_smoother_mod.f90 ! +! Module: mld_d_jac_smoother_mod ! -! -! -! +! This module defines: +! the mld_d_jac_smoother_type data structure containing the +! smoother for a Jacobi/block Jacobi smoother. +! The smoother stores in ND the block off-diagonal matrix. +! One special case is treated separately, when the solver is DIAG +! then the ND is the entire off-diagonal part of the matrix (including the +! main diagonal block), so that it becomes possible to implement +! pure Jacobi global solver. +! module mld_d_jac_smoother use mld_d_base_smoother_mod diff --git a/mlprec/mld_d_mumps_solver.F90 b/mlprec/mld_d_mumps_solver.F90 index 79c3bd8b..5b1aa093 100644 --- a/mlprec/mld_d_mumps_solver.F90 +++ b/mlprec/mld_d_mumps_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_d_mumps_solver_mod.f90 ! +! Module: mld_d_mumps_solver_mod ! +! This module defines: +! - the mld_d_mumps_solver_type data structure containing the ingredients +! to interface with the MUMPS package. +! 1. The factorization can be either restricted to the diagonal block of the +! current image or distributed (and thus exact) ! -! -! - module mld_d_mumps_solver #if defined(HAVE_MUMPS_) use dmumps_struc_def diff --git a/mlprec/mld_d_slu_solver.F90 b/mlprec/mld_d_slu_solver.F90 index 90449763..e0932dbf 100644 --- a/mlprec/mld_d_slu_solver.F90 +++ b/mlprec/mld_d_slu_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_d_slu_solver_mod.f90 ! +! Module: mld_d_slu_solver_mod ! +! This module defines: +! - the mld_d_slu_solver_type data structure containing the ingredients +! to interface with the SuperLU package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_d_slu_solver use iso_c_binding diff --git a/mlprec/mld_d_sludist_solver.F90 b/mlprec/mld_d_sludist_solver.F90 index 70785f3e..d11b5072 100644 --- a/mlprec/mld_d_sludist_solver.F90 +++ b/mlprec/mld_d_sludist_solver.F90 @@ -37,12 +37,17 @@ !!$ !!$ ! +! File: mld_d_sludist_solver_mod.f90 ! +! Module: mld_d_sludist_solver_mod ! +! This module defines: +! - the mld_d_sludist_solver_type data structure containing the ingredients +! to interface with the SuperLU_Dist package. +! 1. The factorization is distributed (and thus exact) ! ! ! - module mld_d_sludist_solver use iso_c_binding diff --git a/mlprec/mld_d_umf_solver.F90 b/mlprec/mld_d_umf_solver.F90 index 3725df9c..4ed06375 100644 --- a/mlprec/mld_d_umf_solver.F90 +++ b/mlprec/mld_d_umf_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_d_umf_solver_mod.f90 ! +! Module: mld_d_umf_solver_mod ! +! This module defines: +! - the mld_d_umf_solver_type data structure containing the ingredients +! to interface with the UMFPACK package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_d_umf_solver use iso_c_binding diff --git a/mlprec/mld_s_as_smoother.f90 b/mlprec/mld_s_as_smoother.f90 index 17b010e8..97d1f8a9 100644 --- a/mlprec/mld_s_as_smoother.f90 +++ b/mlprec/mld_s_as_smoother.f90 @@ -37,11 +37,26 @@ !!$ !!$ ! +! File: mld_s_as_smoother_mod.f90 ! +! Module: mld_s_as_smoother_mod ! +! This module defines: +! the mld_s_as_smoother_type data structure containing the +! smoother for an Additive Schwarz smoother. ! +! To begin with, the build procedure constructs the extended +! matrix A and its corresponding descriptor (this has multiple +! halo layers duplicated across different processes); it then +! stores in ND the block off-diagonal matrix, and builds the solver +! on the (extended) block diagonal matrix. ! -! +! The code allows for the variations of Additive Schwartz, Restricted +! Additive Schwartz and Additive Schwartz with Harmonic Extensions. +! From an implementation point of view, these are handled by +! combining application/non-application of the prolongator/restrictor +! operators. +! module mld_s_as_smoother use mld_s_base_smoother_mod diff --git a/mlprec/mld_s_base_smoother_mod.f90 b/mlprec/mld_s_base_smoother_mod.f90 index bee9d644..377c513b 100644 --- a/mlprec/mld_s_base_smoother_mod.f90 +++ b/mlprec/mld_s_base_smoother_mod.f90 @@ -48,9 +48,16 @@ ! - Building and applying; ! - checking if the smoother is correctly defined; ! - printing a description of the preconditioner; -! - deallocating the preconditioner data structure. +! - deallocating the preconditioner data structure. +! +! What is the difference between a smoother and a solver? +! In the mathematics literature the two concepts are treated +! essentially as synonymous, but here we are using them in a more +! computer-science oriented fashion. In particular, a SMOOTHER object +! contains a SOLVER object: the SOLVER operates locally within the +! current process, whereas the SMOOTHER object accounts for (possible) +! interactions between processes. ! - module mld_s_base_smoother_mod use mld_s_base_solver_mod diff --git a/mlprec/mld_s_diag_solver.f90 b/mlprec/mld_s_diag_solver.f90 index 1fc6c48e..111d4810 100644 --- a/mlprec/mld_s_diag_solver.f90 +++ b/mlprec/mld_s_diag_solver.f90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_s_diag_solver_mod.f90 ! +! Module: mld_s_diag_solver_mod ! +! This module defines: +! - the mld_s_diag_solver_type data structure containing the +! simple diagonal solver. This extracts the main diagonal of a matrix +! and precomputes its inverse. Combined with a Jacobi "smoother" generates +! what are commonly known as the classic Jacobi iterations ! -! -! - module mld_s_diag_solver use mld_s_base_solver_mod diff --git a/mlprec/mld_s_gs_solver.f90 b/mlprec/mld_s_gs_solver.f90 index 3a55fd32..8b25af98 100644 --- a/mlprec/mld_s_gs_solver.f90 +++ b/mlprec/mld_s_gs_solver.f90 @@ -38,11 +38,19 @@ !!$ ! ! +! File: mld_s_gs_solver_mod.f90 ! +! Module: mld_s_gs_solver_mod ! +! This module defines: +! - the mld_s_gs_solver_type data structure containing the ingredients +! for a local Gauss-Seidel iteration. We provide Forward GS (FWGS) and +! backward GS (BWGS). The iterations are local to a process (they operate +! on the block diagonal). Combined with a Jacobi smoother will generate a +! hybrid-Gauss-Seidel solver, i.e. Gauss-Seidel within each process, Jacobi +! among the processes. ! ! - module mld_s_gs_solver use mld_s_base_solver_mod diff --git a/mlprec/mld_s_id_solver.f90 b/mlprec/mld_s_id_solver.f90 index 4e8c71af..f2ca5869 100644 --- a/mlprec/mld_s_id_solver.f90 +++ b/mlprec/mld_s_id_solver.f90 @@ -42,7 +42,6 @@ ! Identity solver. Reference for nullprec. ! ! - module mld_s_id_solver use mld_s_base_solver_mod diff --git a/mlprec/mld_s_ilu_fact_mod.f90 b/mlprec/mld_s_ilu_fact_mod.f90 index ce05d037..083e1b5f 100644 --- a/mlprec/mld_s_ilu_fact_mod.f90 +++ b/mlprec/mld_s_ilu_fact_mod.f90 @@ -36,6 +36,16 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ +! +! +! File: mld_s_ilu_fact_mod.f90 +! +! Module: mld_s_ilu_fact_mod +! +! This module defines some interfaces used internally by the implementation if +! mld_s_ilu_solver, but not visible to the end user. +! +! module mld_s_ilu_fact_mod use mld_s_base_solver_mod diff --git a/mlprec/mld_s_ilu_solver.f90 b/mlprec/mld_s_ilu_solver.f90 index 0fb61fe6..331420b0 100644 --- a/mlprec/mld_s_ilu_solver.f90 +++ b/mlprec/mld_s_ilu_solver.f90 @@ -38,11 +38,23 @@ !!$ ! ! +! File: mld_s_ilu_solver_mod.f90 ! +! Module: mld_s_ilu_solver_mod ! +! This module defines: +! - the mld_s_ilu_solver_type data structure containing the ingredients +! for a local Incomplete LU factorization. +! 1. The factorization is always restricted to the diagonal block of the +! current image (coherently with the definition of a SOLVER as a local +! object) +! 2. The code provides support for both pattern-based ILU(K) and +! threshold base ILU(T,L) +! 3. The diagonal is stored separately, so strictly speaking this is +! an incomplete LDU factorization; +! 4. The application phase is shared; ! ! - module mld_s_ilu_solver use mld_base_prec_type, only : mld_fact_names diff --git a/mlprec/mld_s_inner_mod.f90 b/mlprec/mld_s_inner_mod.f90 index ae4398ed..6f795746 100644 --- a/mlprec/mld_s_inner_mod.f90 +++ b/mlprec/mld_s_inner_mod.f90 @@ -41,8 +41,8 @@ ! Module: mld_inner_mod ! ! This module defines the interfaces to the real/complex, single/double -! precision versions of the MLD2P4 routines, except those of the user level, -! whose interfaces are defined in mld_prec_mod.f90. +! precision versions of inner MLD2P4 routines. +! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_s_inner_mod use mld_s_prec_type @@ -93,35 +93,7 @@ module mld_s_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_smlprec_aply_vect end interface mld_mlprec_aply - - interface mld_bld_mlhier_aggsize - subroutine mld_s_bld_mlhier_aggsize(casize,mxplevs,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_sspmat_type, psb_desc_type,psb_spk_ - use mld_s_prec_type, only : mld_s_onelev_type - implicit none - integer(psb_ipk_), intent(in) :: casize,mxplevs - real(psb_spk_) :: mnaggratio - type(psb_sspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_s_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_s_bld_mlhier_aggsize - end interface mld_bld_mlhier_aggsize - - interface mld_bld_mlhier_array - subroutine mld_s_bld_mlhier_array(nplevs,casize,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_sspmat_type, psb_desc_type, psb_spk_ - use mld_s_prec_type, only : mld_s_onelev_type - implicit none - integer(psb_ipk_), intent(inout) :: nplevs, casize - real(psb_spk_) :: mnaggratio - type(psb_sspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_s_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_s_bld_mlhier_array - end interface mld_bld_mlhier_array - + interface mld_aggrmap_bld subroutine mld_s_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ @@ -191,8 +163,6 @@ module mld_s_inner_mod end subroutine mld_saggrmat_asb end interface mld_aggrmat_asb - - abstract interface subroutine mld_saggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ @@ -207,10 +177,8 @@ module mld_s_inner_mod end subroutine mld_saggrmat_var_asb end interface - procedure(mld_saggrmat_var_asb) :: mld_saggrmat_nosmth_asb, & & mld_saggrmat_smth_asb, mld_saggrmat_minnrg_asb, & & mld_saggrmat_biz_asb - end module mld_s_inner_mod diff --git a/mlprec/mld_s_jac_smoother.f90 b/mlprec/mld_s_jac_smoother.f90 index 6648e062..1510b2dd 100644 --- a/mlprec/mld_s_jac_smoother.f90 +++ b/mlprec/mld_s_jac_smoother.f90 @@ -37,11 +37,19 @@ !!$ !!$ ! +! File: mld_s_jac_smoother_mod.f90 ! +! Module: mld_s_jac_smoother_mod ! -! -! -! +! This module defines: +! the mld_s_jac_smoother_type data structure containing the +! smoother for a Jacobi/block Jacobi smoother. +! The smoother stores in ND the block off-diagonal matrix. +! One special case is treated separately, when the solver is DIAG +! then the ND is the entire off-diagonal part of the matrix (including the +! main diagonal block), so that it becomes possible to implement +! pure Jacobi global solver. +! module mld_s_jac_smoother use mld_s_base_smoother_mod diff --git a/mlprec/mld_s_mumps_solver.F90 b/mlprec/mld_s_mumps_solver.F90 index a73fd262..ac7bfdb2 100644 --- a/mlprec/mld_s_mumps_solver.F90 +++ b/mlprec/mld_s_mumps_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_s_mumps_solver_mod.f90 ! +! Module: mld_s_mumps_solver_mod ! +! This module defines: +! - the mld_s_mumps_solver_type data structure containing the ingredients +! to interface with the MUMPS package. +! 1. The factorization can be either restricted to the diagonal block of the +! current image or distributed (and thus exact) ! -! -! - module mld_s_mumps_solver #if defined(HAVE_MUMPS_) use smumps_struc_def diff --git a/mlprec/mld_s_slu_solver.F90 b/mlprec/mld_s_slu_solver.F90 index 5c4a148e..8a1003a4 100644 --- a/mlprec/mld_s_slu_solver.F90 +++ b/mlprec/mld_s_slu_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_s_slu_solver_mod.f90 ! +! Module: mld_s_slu_solver_mod ! +! This module defines: +! - the mld_s_slu_solver_type data structure containing the ingredients +! to interface with the SuperLU package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_s_slu_solver use iso_c_binding diff --git a/mlprec/mld_s_sludist_solver.F90 b/mlprec/mld_s_sludist_solver.F90 index 19128c42..96f3eaa4 100644 --- a/mlprec/mld_s_sludist_solver.F90 +++ b/mlprec/mld_s_sludist_solver.F90 @@ -37,12 +37,17 @@ !!$ !!$ ! +! File: mld_s_sludist_solver_mod.f90 ! +! Module: mld_s_sludist_solver_mod ! +! This module defines: +! - the mld_s_sludist_solver_type data structure containing the ingredients +! to interface with the SuperLU_Dist package. +! 1. The factorization is distributed (and thus exact) ! ! ! - module mld_s_sludist_solver use iso_c_binding diff --git a/mlprec/mld_s_umf_solver.F90 b/mlprec/mld_s_umf_solver.F90 index 4933b4ac..3cbbb6cb 100644 --- a/mlprec/mld_s_umf_solver.F90 +++ b/mlprec/mld_s_umf_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_s_umf_solver_mod.f90 ! +! Module: mld_s_umf_solver_mod ! +! This module defines: +! - the mld_s_umf_solver_type data structure containing the ingredients +! to interface with the UMFPACK package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_s_umf_solver use iso_c_binding diff --git a/mlprec/mld_z_as_smoother.f90 b/mlprec/mld_z_as_smoother.f90 index cfe6ee78..d82a45c1 100644 --- a/mlprec/mld_z_as_smoother.f90 +++ b/mlprec/mld_z_as_smoother.f90 @@ -37,11 +37,26 @@ !!$ !!$ ! +! File: mld_z_as_smoother_mod.f90 ! +! Module: mld_z_as_smoother_mod ! +! This module defines: +! the mld_z_as_smoother_type data structure containing the +! smoother for an Additive Schwarz smoother. ! +! To begin with, the build procedure constructs the extended +! matrix A and its corresponding descriptor (this has multiple +! halo layers duplicated across different processes); it then +! stores in ND the block off-diagonal matrix, and builds the solver +! on the (extended) block diagonal matrix. ! -! +! The code allows for the variations of Additive Schwartz, Restricted +! Additive Schwartz and Additive Schwartz with Harmonic Extensions. +! From an implementation point of view, these are handled by +! combining application/non-application of the prolongator/restrictor +! operators. +! module mld_z_as_smoother use mld_z_base_smoother_mod diff --git a/mlprec/mld_z_base_smoother_mod.f90 b/mlprec/mld_z_base_smoother_mod.f90 index ea597d34..6e6ff841 100644 --- a/mlprec/mld_z_base_smoother_mod.f90 +++ b/mlprec/mld_z_base_smoother_mod.f90 @@ -48,9 +48,16 @@ ! - Building and applying; ! - checking if the smoother is correctly defined; ! - printing a description of the preconditioner; -! - deallocating the preconditioner data structure. +! - deallocating the preconditioner data structure. +! +! What is the difference between a smoother and a solver? +! In the mathematics literature the two concepts are treated +! essentially as synonymous, but here we are using them in a more +! computer-science oriented fashion. In particular, a SMOOTHER object +! contains a SOLVER object: the SOLVER operates locally within the +! current process, whereas the SMOOTHER object accounts for (possible) +! interactions between processes. ! - module mld_z_base_smoother_mod use mld_z_base_solver_mod diff --git a/mlprec/mld_z_diag_solver.f90 b/mlprec/mld_z_diag_solver.f90 index 0baf0c57..626d7ab0 100644 --- a/mlprec/mld_z_diag_solver.f90 +++ b/mlprec/mld_z_diag_solver.f90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_z_diag_solver_mod.f90 ! +! Module: mld_z_diag_solver_mod ! +! This module defines: +! - the mld_z_diag_solver_type data structure containing the +! simple diagonal solver. This extracts the main diagonal of a matrix +! and precomputes its inverse. Combined with a Jacobi "smoother" generates +! what are commonly known as the classic Jacobi iterations ! -! -! - module mld_z_diag_solver use mld_z_base_solver_mod diff --git a/mlprec/mld_z_gs_solver.f90 b/mlprec/mld_z_gs_solver.f90 index d0256465..52fcf7d4 100644 --- a/mlprec/mld_z_gs_solver.f90 +++ b/mlprec/mld_z_gs_solver.f90 @@ -38,11 +38,19 @@ !!$ ! ! +! File: mld_z_gs_solver_mod.f90 ! +! Module: mld_z_gs_solver_mod ! +! This module defines: +! - the mld_z_gs_solver_type data structure containing the ingredients +! for a local Gauss-Seidel iteration. We provide Forward GS (FWGS) and +! backward GS (BWGS). The iterations are local to a process (they operate +! on the block diagonal). Combined with a Jacobi smoother will generate a +! hybrid-Gauss-Seidel solver, i.e. Gauss-Seidel within each process, Jacobi +! among the processes. ! ! - module mld_z_gs_solver use mld_z_base_solver_mod diff --git a/mlprec/mld_z_id_solver.f90 b/mlprec/mld_z_id_solver.f90 index 11c7d1bf..9cc9dddb 100644 --- a/mlprec/mld_z_id_solver.f90 +++ b/mlprec/mld_z_id_solver.f90 @@ -42,7 +42,6 @@ ! Identity solver. Reference for nullprec. ! ! - module mld_z_id_solver use mld_z_base_solver_mod diff --git a/mlprec/mld_z_ilu_fact_mod.f90 b/mlprec/mld_z_ilu_fact_mod.f90 index 65015899..c33751a4 100644 --- a/mlprec/mld_z_ilu_fact_mod.f90 +++ b/mlprec/mld_z_ilu_fact_mod.f90 @@ -36,6 +36,16 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ +! +! +! File: mld_z_ilu_fact_mod.f90 +! +! Module: mld_z_ilu_fact_mod +! +! This module defines some interfaces used internally by the implementation if +! mld_z_ilu_solver, but not visible to the end user. +! +! module mld_z_ilu_fact_mod use mld_z_base_solver_mod diff --git a/mlprec/mld_z_ilu_solver.f90 b/mlprec/mld_z_ilu_solver.f90 index fa57e8f4..cf5aa23c 100644 --- a/mlprec/mld_z_ilu_solver.f90 +++ b/mlprec/mld_z_ilu_solver.f90 @@ -38,11 +38,23 @@ !!$ ! ! +! File: mld_z_ilu_solver_mod.f90 ! +! Module: mld_z_ilu_solver_mod ! +! This module defines: +! - the mld_z_ilu_solver_type data structure containing the ingredients +! for a local Incomplete LU factorization. +! 1. The factorization is always restricted to the diagonal block of the +! current image (coherently with the definition of a SOLVER as a local +! object) +! 2. The code provides support for both pattern-based ILU(K) and +! threshold base ILU(T,L) +! 3. The diagonal is stored separately, so strictly speaking this is +! an incomplete LDU factorization; +! 4. The application phase is shared; ! ! - module mld_z_ilu_solver use mld_base_prec_type, only : mld_fact_names diff --git a/mlprec/mld_z_inner_mod.f90 b/mlprec/mld_z_inner_mod.f90 index d9b1c549..cc98000d 100644 --- a/mlprec/mld_z_inner_mod.f90 +++ b/mlprec/mld_z_inner_mod.f90 @@ -41,8 +41,8 @@ ! Module: mld_inner_mod ! ! This module defines the interfaces to the real/complex, single/double -! precision versions of the MLD2P4 routines, except those of the user level, -! whose interfaces are defined in mld_prec_mod.f90. +! precision versions of inner MLD2P4 routines. +! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_z_inner_mod use mld_z_prec_type @@ -93,35 +93,7 @@ module mld_z_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_zmlprec_aply_vect end interface mld_mlprec_aply - - interface mld_bld_mlhier_aggsize - subroutine mld_z_bld_mlhier_aggsize(casize,mxplevs,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_zspmat_type, psb_desc_type,psb_dpk_ - use mld_z_prec_type, only : mld_z_onelev_type - implicit none - integer(psb_ipk_), intent(in) :: casize,mxplevs - real(psb_dpk_) :: mnaggratio - type(psb_zspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_z_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_z_bld_mlhier_aggsize - end interface mld_bld_mlhier_aggsize - - interface mld_bld_mlhier_array - subroutine mld_z_bld_mlhier_array(nplevs,casize,mnaggratio,a,desc_a,precv,info) - use psb_base_mod, only : psb_ipk_, psb_zspmat_type, psb_desc_type, psb_dpk_ - use mld_z_prec_type, only : mld_z_onelev_type - implicit none - integer(psb_ipk_), intent(inout) :: nplevs, casize - real(psb_dpk_) :: mnaggratio - type(psb_zspmat_type),intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_z_onelev_type), allocatable, target, intent(inout) :: precv(:) - integer(psb_ipk_), intent(out) :: info - end subroutine mld_z_bld_mlhier_array - end interface mld_bld_mlhier_array - + interface mld_aggrmap_bld subroutine mld_z_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ @@ -191,8 +163,6 @@ module mld_z_inner_mod end subroutine mld_zaggrmat_asb end interface mld_aggrmat_asb - - abstract interface subroutine mld_zaggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ @@ -207,10 +177,8 @@ module mld_z_inner_mod end subroutine mld_zaggrmat_var_asb end interface - procedure(mld_zaggrmat_var_asb) :: mld_zaggrmat_nosmth_asb, & & mld_zaggrmat_smth_asb, mld_zaggrmat_minnrg_asb, & & mld_zaggrmat_biz_asb - end module mld_z_inner_mod diff --git a/mlprec/mld_z_jac_smoother.f90 b/mlprec/mld_z_jac_smoother.f90 index 88664b2f..9c0467a6 100644 --- a/mlprec/mld_z_jac_smoother.f90 +++ b/mlprec/mld_z_jac_smoother.f90 @@ -37,11 +37,19 @@ !!$ !!$ ! +! File: mld_z_jac_smoother_mod.f90 ! +! Module: mld_z_jac_smoother_mod ! -! -! -! +! This module defines: +! the mld_z_jac_smoother_type data structure containing the +! smoother for a Jacobi/block Jacobi smoother. +! The smoother stores in ND the block off-diagonal matrix. +! One special case is treated separately, when the solver is DIAG +! then the ND is the entire off-diagonal part of the matrix (including the +! main diagonal block), so that it becomes possible to implement +! pure Jacobi global solver. +! module mld_z_jac_smoother use mld_z_base_smoother_mod diff --git a/mlprec/mld_z_mumps_solver.F90 b/mlprec/mld_z_mumps_solver.F90 index 00310bc5..7a941bba 100644 --- a/mlprec/mld_z_mumps_solver.F90 +++ b/mlprec/mld_z_mumps_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_z_mumps_solver_mod.f90 ! +! Module: mld_z_mumps_solver_mod ! +! This module defines: +! - the mld_z_mumps_solver_type data structure containing the ingredients +! to interface with the MUMPS package. +! 1. The factorization can be either restricted to the diagonal block of the +! current image or distributed (and thus exact) ! -! -! - module mld_z_mumps_solver #if defined(HAVE_MUMPS_) use zmumps_struc_def diff --git a/mlprec/mld_z_slu_solver.F90 b/mlprec/mld_z_slu_solver.F90 index 3fff7c5e..656ac5c2 100644 --- a/mlprec/mld_z_slu_solver.F90 +++ b/mlprec/mld_z_slu_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_z_slu_solver_mod.f90 ! +! Module: mld_z_slu_solver_mod ! +! This module defines: +! - the mld_z_slu_solver_type data structure containing the ingredients +! to interface with the SuperLU package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_z_slu_solver use iso_c_binding diff --git a/mlprec/mld_z_sludist_solver.F90 b/mlprec/mld_z_sludist_solver.F90 index a6a71848..d4abf8d8 100644 --- a/mlprec/mld_z_sludist_solver.F90 +++ b/mlprec/mld_z_sludist_solver.F90 @@ -37,12 +37,17 @@ !!$ !!$ ! +! File: mld_z_sludist_solver_mod.f90 ! +! Module: mld_z_sludist_solver_mod ! +! This module defines: +! - the mld_z_sludist_solver_type data structure containing the ingredients +! to interface with the SuperLU_Dist package. +! 1. The factorization is distributed (and thus exact) ! ! ! - module mld_z_sludist_solver use iso_c_binding diff --git a/mlprec/mld_z_umf_solver.F90 b/mlprec/mld_z_umf_solver.F90 index 362ffe2f..25de9ed2 100644 --- a/mlprec/mld_z_umf_solver.F90 +++ b/mlprec/mld_z_umf_solver.F90 @@ -37,12 +37,16 @@ !!$ !!$ ! +! File: mld_z_umf_solver_mod.f90 ! +! Module: mld_z_umf_solver_mod ! +! This module defines: +! - the mld_z_umf_solver_type data structure containing the ingredients +! to interface with the UMFPACK package. +! 1. The factorization is restricted to the diagonal block of the +! current image. ! -! -! - module mld_z_umf_solver use iso_c_binding