!!$ !!$ !!$ MLD2P4 version 2.0 !!$ MultiLevel Domain Decomposition Parallel Preconditioners Package !!$ based on PSBLAS (Parallel Sparse BLAS version 3.3) !!$ !!$ (C) Copyright 2008, 2010, 2012, 2015 !!$ !!$ Salvatore Filippone University of Rome Tor Vergata !!$ Alfredo Buttari CNRS-IRIT, Toulouse !!$ Pasqua D'Ambra ICAR-CNR, Naples !!$ Daniela di Serafino Second University of Naples !!$ !!$ Redistribution and use in source and binary forms, with or without !!$ modification, are permitted provided that the following conditions !!$ are met: !!$ 1. Redistributions of source code must retain the above copyright !!$ notice, this list of conditions and the following disclaimer. !!$ 2. Redistributions in binary form must reproduce the above copyright !!$ notice, this list of conditions, and the following disclaimer in the !!$ documentation and/or other materials provided with the distribution. !!$ 3. The name of the MLD2P4 group or the names of its contributors may !!$ not be used to endorse or promote products derived from this !!$ software without specific written permission. !!$ !!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS !!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED !!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR !!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS !!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR !!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF !!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS !!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN !!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) !!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ ! module mld_d_base_aggregator_mod use mld_base_prec_type use psb_base_mod, only : psb_dspmat_type, psb_d_vect_type, & & psb_d_base_vect_type, psb_dlinmap_type, psb_dpk_, & & psb_ipk_, psb_long_int_k_, psb_desc_type, psb_i_base_vect_type, & & psb_erractionsave, psb_error_handler ! ! sm - class(mld_T_base_smoother_type), allocatable ! The current level preconditioner (aka smoother). ! parms - type(mld_RTml_parms) ! The parameters defining the multilevel strategy. ! ac - The local part of the current-level matrix, built by ! coarsening the previous-level matrix. ! desc_ac - type(psb_desc_type). ! The communication descriptor associated to the matrix ! stored in ac. ! base_a - type(psb_Tspmat_type), pointer. ! Pointer (really a pointer!) to the local part of the current ! matrix (so we have a unified treatment of residuals). ! We need this to avoid passing explicitly the current matrix ! to the routine which applies the preconditioner. ! base_desc - type(psb_desc_type), pointer. ! Pointer to the communication descriptor associated to the ! matrix pointed by base_a. ! map - Stores the maps (restriction and prolongation) between the ! vector spaces associated to the index spaces of the previous ! and current levels. ! ! Methods: ! Most methods follow the encapsulation hierarchy: they take whatever action ! is appropriate for the current object, then call the corresponding method for ! the contained object. ! As an example: the descr() method prints out a description of the ! level. It starts by invoking the descr() method of the parms object, ! then calls the descr() method of the smoother object. ! ! descr - Prints a description of the object. ! default - Set default values ! dump - Dump to file object contents ! set - Sets various parameters; when a request is unknown ! it is passed to the smoother object for further processing. ! check - Sanity checks. ! sizeof - Total memory occupation in bytes ! get_nzeros - Number of nonzeros ! ! type mld_d_base_aggregator_type type(mld_dml_parms) :: parms contains procedure, pass(ag) :: bld => mld_d_base_aggregation_build end type mld_d_onelev_type private :: d_base_onelev_default, d_base_onelev_sizeof, & & d_base_onelev_nullify, d_base_onelev_get_nzeros, & & d_base_onelev_clone, d_base_onelev_move_alloc interface subroutine mld_d_base_aggregation_build(ag,info,amold,vmold,imold) import :: psb_d_base_sparse_mat, psb_d_base_vect_type, & & psb_i_base_vect_type, psb_dpk_, mld_d_onelev_type, & & psb_ipk_, psb_long_int_k_, psb_desc_type implicit none class(mld_d_onelev_type), target, intent(inout) :: lv integer(psb_ipk_), intent(out) :: info class(psb_d_base_sparse_mat), intent(in), optional :: amold class(psb_d_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold end subroutine mld_d_base_aggregation_build end interface contains end module mld_d_base_aggregator_mod