DOUG 0.2

controls.F90

Go to the documentation of this file.
00001 ! DOUG - Domain decomposition On Unstructured Grids
00002 ! Copyright (C) 1998-2006 Faculty of Computer Science, University of Tartu and
00003 ! Department of Mathematics, University of Bath
00004 !
00005 ! This library is free software; you can redistribute it and/or
00006 ! modify it under the terms of the GNU Lesser General Public
00007 ! License as published by the Free Software Foundation; either
00008 ! version 2.1 of the License, or (at your option) any later version.
00009 !
00010 ! This library is distributed in the hope that it will be useful,
00011 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 ! Lesser General Public License for more details.
00014 !
00015 ! You should have received a copy of the GNU Lesser General Public
00016 ! License along with this library; if not, write to the Free Software
00017 ! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 ! or contact the authors (University of Tartu, Faculty of Computer Science, Chair
00019 ! of Distributed Systems, Liivi 2, 50409 Tartu, Estonia, http://dougdevel.org,
00020 ! mailto:info(at)dougdevel.org)
00021 
00023 module controls
00024 
00026   integer, parameter :: DCTL_NWORDS = 51
00027 
00028   character*(51)     :: ctl_words(DCTL_NWORDS)
00029 
00032   integer, parameter ::  
00033        DCTL_solver = 1,  !< solver for outer loop: (2) PCG
00034        DCTL_levels               =  3,  !< Preconditioning levels: 1, 2
00035        DCTL_input_type           =  6,  !< (1) Elemental input files, (2) assembled matrix or (3) structured mesh (generated locally on the fly)
00036        DCTL_fine_method          = 49,  !< fine preconditioner: (1) complete, (2) SGS
00037        DCTL_coarse_method        = 47  !< coarse preconditer: (1) smoothed, (2) robust
00038   !! @}
00039 
00042   integer, parameter ::  
00043        DCTL_solution_format      = 19,  !< solution file format
00044        DCTL_solution_file        = 20,  !< solution file name
00045        DCTL_debug                = 27, 
00046        DCTL_verbose              = 28,  !< verbose level: 1-3 info, 4-6 debug, 7-. trace
00047        DCTL_plotting             = 29
00048 
00049 
00052   integer, parameter ::  
00053        DCTL_assembled_mtx_file   =  8,  !< Matrix file for assembled input
00054        DCTL_assembled_mtx_format = 46,  !< assembled matrix format
00055        DCTL_assembled_rhs_file   = 42,  !< assembled rhs file name
00056        DCTL_assembled_rhs_format = 43 !< assembled rhs file format
00057 
00058 
00061   integer, parameter ::  
00062        DCTL_info_file            =  9,  
00063        DCTL_freedom_lists_file   = 10,  !< Freedom list file for elemental input
00064        DCTL_elemmat_rhs_file     = 11,  !< Elemental matrix file for elemental input
00065        DCTL_coords_file          = 12,  !< Coordinates file for elemental input
00066        DCTL_freemap_file         = 13, 
00067        DCTL_freedom_mask_file    = 14
00068   
00070 
00072   integer, parameter ::  
00073        DCTL_grid_size            = 51    !< grid size for structured mesh input type
00074 
00075 
00078   integer, parameter ::  
00079        DCTL_strong1              = 16,  !< threshold for fine aggregate smoothing
00080        DCTL_strong2              = 17,  !< threshold for coarse aggregate smoothing  
00081        DCTL_radius1              = 21,  !< fine aggregates radius
00082        DCTL_radius2              = 22,  !< coarse aggregates radius
00083        DCTL_minasize1            = 23,  !< minimum size of a fine aggregate
00084        DCTL_minasize2            = 24,  !< minimum size of a coarse aggregate
00085        DCTL_maxasize1            = 25,  !< maximum size of a fine aggregate
00086        DCTL_maxasize2            = 26 !< maximum size of a coarse aggregate
00087 
00088 
00091   integer, parameter ::  
00092        DCTL_solve_tolerance      = 18, 
00093        DCTL_initial_guess        = 30,  !< not used
00094        DCTL_solve_maxiters       = 35
00095 
00096 
00099   integer, parameter ::  
00100        DCTL_method               =  2,  !< Schwarz method: additive (1), multiplicative (not implemented)
00101        DCTL_overlap              =  4,  !< Schwarz method overlap
00102        DCTL_num_subdomains       = 48,  !< number of subdomains on each process for Schwarz preconditioner
00103        DCTL_num_iters            = 50 !< number of Gauss-Seidel iterations
00104 
00106 
00109   integer, parameter ::  
00110        DCTL_smoothers            =  5 !< Smoothing steps in smoothed aggregation
00111 
00112 
00115   integer, parameter ::  
00116        DCTL_maxcie               = 36, 
00117        DCTL_maxnd                = 37, 
00118        DCTL_cutbal               = 38, 
00119        DCTL_center_type          = 39, 
00120        DCTL_hanging_nodes        = 40, 
00121        DCTL_interpolation_type   = 41, 
00122        DCTL_dump_matrix_only     = 44, 
00123        DCTL_dump_matrix_file     = 45
00124 
00125 
00128   integer, parameter ::  
00129        DCTL_matrix_type          =  7,  !< Not used
00130        DCTL_number_of_blocks     = 15,  !< Not really used, set to 1
00131        DCTL_start_vec_type       = 31,  !< Not used
00132        DCTL_start_vec_file       = 32,  !< Not used
00133        DCTL_symmstruct           = 33,  !< Used only in matrix (un)scaling routines
00134        DCTL_symmnumeric          = 34 !< Used only in matrix (un)scaling routines
00135 
00136 
00137 !!$DCTL_matrix_file           =
00138 !!$DCTL_rhs_file              =
00139 !!$DCTL_xyz_file              =
00140 
00141 !!$DCTL_submeth          =
00142 
00143 !!$DCTL_matrix_type      =
00144 !!$DCTL_sigma            =
00145 !!$DCTL_theta            =
00146 
00147 !!$DCTL_subsolve_tolerance =
00148 !!$DCTL_eigen_tolerance    =
00149 
00150 !!$DCTL_mass_matrix_file      = 
00151 !!$DCTL_skew_symm_matrix_file =
00152 
00153 
00154 !!$DCTL_gmres_max_it          =
00155 !!$DCTL_gmrestarts            =
00156 
00157 contains
00158 
00159   subroutine controls_init()
00160     ! MASTER:
00161     ctl_words(DCTL_assembled_mtx_file)    = 'assembled_mtx_file' ! assembled case
00162     ctl_words(DCTL_assembled_mtx_format)  = 'assembled_mtx_format'
00163     ctl_words(DCTL_assembled_rhs_file)    = 'assembled_rhs_file' ! assembled case
00164     ctl_words(DCTL_assembled_rhs_format)  = 'assembled_rhs_format' 
00165     ctl_words(DCTL_info_file)             = 'info_file'         
00166     ctl_words(DCTL_elemmat_rhs_file)      = 'elemmat_rhs_file'
00167     ctl_words(DCTL_freedom_lists_file)    = 'freedom_lists_file'
00168     ctl_words(DCTL_coords_file)           = 'coords_file'   
00169     ctl_words(DCTL_freemap_file)          = 'freemap_file' 
00170     ctl_words(DCTL_solution_format)       = 'solution_format'
00171     ctl_words(DCTL_solution_file)         = 'solution_file'
00172     ctl_words(DCTL_freedom_mask_file)     = 'freedom_mask_file'  ! block system
00173     ctl_words(DCTL_start_vec_type)        = 'start_vec_type'
00174     ctl_words(DCTL_start_vec_file)        = 'start_vec_file'     ! initial estimate
00175     ctl_words(DCTL_dump_matrix_only)      = 'dump_matrix_only'
00176     ctl_words(DCTL_dump_matrix_file)      = 'dump_matrix_file'
00177 
00178     ! Coarse grid things - value types given in CoarseGrid.f90
00179     ctl_words(DCTL_maxcie)                = 'maxcie'   ! Max num of initial coarse els
00180     ctl_words(DCTL_maxnd)                 = 'maxnd'    ! Max num of coarse nodes
00181     ctl_words(DCTL_cutbal)                = 'cutbal'   ! Max num of nodes per coarse el
00182     ctl_words(DCTL_center_type)           = 'center_type' ! Center choosing algorithm
00183     ctl_words(DCTL_hanging_nodes)         = 'hanging_nodes' !Do we create hanging nodes
00184 
00185 !!$ctl_words(DCTL_mass_matrix_file)      = 'mass_matrix_file'
00186 !!$ctl_words(DCTL_skew_symm_matrix_file) = 'skew-symm_matrix_file'
00187 !!$ctl_words(DCTL_matrix_file)           = 'matrix_file' ! fdata ! assembled
00188 !!$ctl_words(DCTL_rhs_file)              = 'rhs_file'    ! freef ! assembled
00189 !!$ctl_words(DCTL_xyz_file)              = 'xyz_file'    ! xyzf  ! assembled
00190 
00191     ! SHARED:
00192     ctl_words(DCTL_solver)           = 'solver'
00193     ctl_words(DCTL_method)           = 'method'
00194     ctl_words(DCTL_fine_method)      = 'fine_method'
00195     ctl_words(DCTL_num_iters)        = 'num_iters'
00196     ctl_words(DCTL_grid_size)        = 'grid_size'
00197     ctl_words(DCTL_coarse_method)    = 'coarse_method'
00198     ctl_words(DCTL_levels)           = 'levels'
00199     ctl_words(DCTL_num_subdomains)   = 'num_subdomains'
00200     ctl_words(DCTL_overlap)          = 'overlap'
00201     ctl_words(DCTL_smoothers)        = 'smoothers'
00202     ctl_words(DCTL_radius1)          = 'radius1'
00203     ctl_words(DCTL_radius2)          = 'radius2'
00204     ctl_words(DCTL_minasize1)        = 'minasize1'
00205     ctl_words(DCTL_minasize2)        = 'minasize2'
00206     ctl_words(DCTL_maxasize1)        = 'maxasize1'
00207     ctl_words(DCTL_maxasize2)        = 'maxasize2'
00208     ctl_words(DCTL_debug)            = 'debug'
00209     ctl_words(DCTL_verbose)          = 'verbose'
00210     ctl_words(DCTL_plotting)         = 'plotting'
00211     ctl_words(DCTL_strong1)          = 'strong1'
00212     ctl_words(DCTL_strong2)          = 'strong2'
00213     ctl_words(DCTL_solve_tolerance)  = 'solve_tolerance'
00214     ctl_words(DCTL_input_type)       = 'input_type'  ! type : assembled, elemental
00215     ctl_words(DCTL_number_of_blocks) = 'number_of_blocks'   ! block system
00216     ctl_words(DCTL_matrix_type)      = 'matrix_type'
00217     ctl_words(DCTL_initial_guess)    = 'initial_guess'
00218     ctl_words(DCTL_symmstruct)       = 'symmstruct'
00219     ctl_words(DCTL_symmnumeric)      = 'symmnumeric'
00220     ctl_words(DCTL_solve_maxiters)   = 'solve_maxiters'
00221 
00222     ctl_words(DCTL_interpolation_type) = 'interpolation_type'
00223 
00224 !!$ctl_words(23)='sigma'
00225 !!$ctl_words(24)='theta'
00226 !!$ctl_words(42)='subsolve_tolerance'
00227 !!$ctl_words(DCTL_submeth) = 'submeth'
00228 !!$ctl_words(20)='eigen_tolerance'
00229 
00230     ! ????:
00231 !!$ctl_words(26)='rho_r'
00232 !!$ctl_words(27)='rho_i'
00233 !!$ctl_words(28)='epsilon'
00234 !!$ctl_words(29)='eigensolver'
00235 !!$ctl_words(31)='inpint'
00236 !!$ctl_words(DCTL_gmres_max_it)   = 'gmres_max_it'
00237 !!$ctl_words(DCTL_gmrestarts)     = 'gmrestarts'
00238 !!$ctl_words(38)='coarse_size'
00239 !!$ctl_words(41)='nsubpart'
00240 !!$ctl_words(43)='parpack_nev'
00241 !!$ctl_words(44)='parpack_ncv'
00242 !!$ctl_words(45)='parpack_bmat'
00243 !!$ctl_words(46)='parpack_which'
00244 !!$ctl_words(47)='block_prec'
00245 !!$ctl_words(48)='nsubits'
00246   end subroutine controls_init
00247 
00248 end module controls