00001 /* lsh_mkb_core.h - internal data of the multigrid iterative solver */ 00002 /* or multigrid preconditioned Krylow methods solver (currently GMRES only) */ 00003 /* based on standard iterative methods (Jacobi, Gauss-Seidel, */ 00004 /* additive Schwarz, multiplicative Schwarz) and ILU(0) as solvers, */ 00005 /* smoothers and preconditioners: definition of parameters, */ 00006 /* data types, global variables and internal functions */ 00007 00008 // The core procedures are usually called by some adapter like e.g. 00009 // the ones in lsd_mkb or lsd_ns_supg directories, that implement 00010 // an interface known to FEM code - in particular in ModFEM 00011 // the FEM part of code interacting with the solver is a solver 00012 // interface module with the current practice of one-to-one 00013 // correspondence between interface and adapter modules (e.g. 00014 // sid_mkb for lsd_mkd) 00015 00016 /* PROCEDURES */ 00017 00018 /* in file "lss_mkb_core.c": 00019 00020 - solver management routines 00021 lsr_mkb_core_init - to create a new solver instance, read its control parameters 00022 and initialize its data structure 00023 lsr_mkb_core_solve - to solve a system of equations, given previously constructed 00024 system matrix, preconditioner 00025 lsr_mkb_core_destroy - to delete a solver instance 00026 00027 - preconditioner management routines 00028 lsr_mkb_core_create_precon - to create preconditioner 00029 lsr_mkb_core_fill_precon - to prepare preconditioner by factorizing the stiffness 00030 matrix, either only diagonal blocks or block ILU(0) 00031 lsr_mkb_core_destroy_precon - to free preconditioner data structure 00032 00033 - solver algorithms 00034 lsr_mkb_core_comp_norm_rhs - to compute the norm of the preconditioned rhs 00035 lsr_mkb_core_standard - to solve the problem by standard iterations 00036 lsr_mkb_core_vcycle - to perform one V-cycle of multigrid 00037 lsr_mkb_core_smooth - to perform one smoothing step using different algorithms 00038 lsr_mkb_core_precon - to perform preconditioning using different algorithms 00039 lsr_mkb_core_compreres - to compute the residual of the left preconditioned 00040 system of equations, v = M^-1 * ( b - Ax ) 00041 ( used also to compute the product v = M^-1 * Ax) 00042 lsr_mkb_core_solve_coarse - to launch solver for the coarse grid problem 00044 lsr_mkb_core_gmres - to solve a system of linear equations Ax = b 00045 using the left preconditioned GMRES method 00046 00047 - additional utilities: 00048 lsr_mkb_core_util_dvector - to allocate a double vector: name[0..ncom-1]: 00049 lsr_mkb_core_util_ivector - to allocate an integer vector: name[0..ncom-1]: 00050 lsr_mkb_core_util_imatrix - to allocate an integer matrix name[0..nrow-1][0..ncol-1]: 00051 name=imatrix(nrow,ncol,error_text) 00052 lsr_mkb_core_util_dmatrix - to allocate a double matrix name[0..nrow-1][0..ncol-1]: 00053 name=imatrix(nrow,ncol,error_text) 00054 lsr_mkb_core_util_chk_list - to check whether a number is on the list 00055 lsr_mkb_core_util_put_list - to put Num on the list List with length Ll 00056 lsr_mkb_core_util_d_zero - to zero a double vector 00057 lsr_mkb_core_util_i_zero - to zero an integer vector 00058 lsr_mkb_core_util_sort - to heap-sort an array 00059 lsr_mkb_core_util_dgetrf - quasi-LU decomposition of a matrix 00060 lsr_mkb_core_util_dgetrs - to perform forward reduction and back substitution 00061 of the RHS vector for solving a system of linear equations 00062 00064 lsr_mkb_core_get_pdeg_coarse - to get enforced pdeg for the coarse mesh 00065 ---------------------------------------------------------*/ 00066 00067 00068 #ifndef _lsh_mkb_core_ 00069 #define _lsh_mkb_core_ 00070 00071 #include <stdio.h> 00072 00073 // API for all mkb solvers with some constants... 00074 #include "../lsh_mkb_intf.h" 00075 00076 00077 // API for linear algebra routines supporting MKB solver 00078 #include "../lah_intf.h" 00079 00080 00081 /* Parameters */ 00082 // The module can handle several solvers, each solver can have several subsystems 00083 // and each subsystem can have several levels 00084 #define LSC_MAX_NUM_SUBS 10 00085 00086 00087 /* BLAS and LAPACK names with or without underscore */ 00088 #ifdef WITHOUT_ 00089 #define ddot_ ddot 00090 #define dnrm2_ dnrm2 00091 #define dscal_ dscal 00092 #define dcopy_ dcopy 00093 #define daxpy_ daxpy 00094 #define dgemv_ dgemv 00095 #define dgetrf_ dgetrf 00096 #define dgetrs_ dgetrs 00097 #define drot_ drot 00098 #define drotg_ drotg 00099 #define dtrsv_ dtrsv 00100 #endif 00101 00102 00103 /* GMRES type */ 00104 #define STANDARD_GMRES 0 00105 #define MATRIX_FREE 1 00106 00107 /* preconditioners-smoothers !!! MUST BE THE SAME AS IN LA PACKAGE */ 00108 // definition in lah_intf.h !!! 00109 00110 /* Types of convergence measures */ 00111 #define REL_RES_INI 0 00112 #define ABS_RES 1 00113 #define REL_RES_RHS 2 00114 00115 00116 /*** Data types ***/ 00117 00118 00119 /* definition of type lst_mkb_core_levels - data structure for mesh levels */ 00120 /* and associated solvers */ 00121 typedef struct { 00122 00123 /* control variables */ 00124 int Solver; /* linear equations solver: */ 00125 /* 0 - direct solver */ 00126 /* 1 - GMRES */ 00127 /* 2 - multi-level GMRES */ 00128 int GMRES_type;/* type of GMRES */ 00129 /* 0 - standard */ 00130 /* 1 - matrix free */ 00131 int Krylbas; /* number of Krylov space vectors for GMRES */ 00132 int Pdeg; /* indicator for choosing degree of approximation for coarse */ 00133 /* meshes (if >=0 indicates the actual degree of approximation */ 00134 int Precon; /* preconditioning type */ 00135 /* 0 - block Jacobi */ 00136 /* 1 - block Gauss-Seidel */ 00137 /* 2 - additive Schwarz (BJ with global product) */ 00138 int ILU_k; // number of neighborhood rings for ILU(k) 00139 int Nr_prec; /* number of block iterations for preconditioning */ 00140 int Block_type;/* preconditioner block types: number of nodes in a block */ 00141 /* or some other indicator application dependent */ 00142 int Max_iter; /* maximum number of GMRES iterations to be performed */ 00143 int Conv_type; /* residual convergence criterium: */ 00144 /* 0 - relative to initial residual */ 00145 /* 1 - absolute residual */ 00146 /* 2 - relative to rhs */ 00147 double Conv_meas; /* allowable convergence measure */ 00148 int Monitor; /* monitoring flag: */ 00149 /* 0 - silent run, 1 - warning messages */ 00150 /* 2 - 1+restart data 3 - iteration data */ 00151 00152 int Nrdofgl; /* total number of degrees of freedom */ 00153 int SM_and_LV_id; // identifier assigned by linear algebra package to a triple: 00154 // system matrix, rhs vector, preconditioner data structure 00155 int Storage_type; // type of storage (LSC_STORAGE_ constants defined in lsh_mkb_intf.h) 00156 int Nr_pre_smooth; // number of pre-smooth iterations 00157 int Nr_post_smooth; // number of post-smooth iterations 00158 00159 int Nr_dof_blocks; // USED BY NS_SUPG_EXT ONLY!!! 00160 } lst_mkb_core_levels; 00161 00162 00163 /* definition of lst_mkb_core_solvers - data type for multi-level iterative solver */ 00164 typedef struct { 00165 00166 int nr_level; /* number of levels in multi-level GMRES */ 00167 int cur_level; /* current level number in multi-level GMRES */ 00168 lst_mkb_core_levels level[LSC_MAX_NUM_LEV]; /* array of solver data structures */ 00169 /* corresponding to different levels */ 00170 } lst_mkb_core_subsystems; 00171 00172 /* definition of lst_mkb_core_solvers - data type for multi-level iterative solver */ 00173 typedef struct { 00174 00175 int solver_id; /* solver_id */ 00176 int parallel; /* parameter specifying sequential (LSC_SEQUENTIAL) */ 00177 /* or parallel (LSC_PARALLEL) execution */ 00178 int nr_subsystems; 00179 int cur_subsystem; 00180 lst_mkb_core_subsystems subsystem[LSC_MAX_NUM_SUBS]; 00181 /* array of subsystems handled by a solver */ 00182 } lst_mkb_core_solvers; 00183 00184 00185 /* GLOBAL VARIABLES */ 00186 extern int lsv_mkb_core_cur_solver_id; /* ID of the current solver */ 00187 extern lst_mkb_core_solvers lsv_mkb_core_solver[LSC_MAX_NUM_SOLV]; /* array of solvers */ 00188 00189 00190 /* PROCEDURES */ 00191 00192 /* in file "lss_mkb_core.c": 00193 00194 - solver management routines 00195 lsr_mkb_core_init - to create a new solver instance, read its control parameters 00196 and initialize its data structure 00197 lsr_mkb_core_solve - to solve a system of equations, given previously constructed 00198 system matrix, preconditioner 00199 lsr_mkb_core_destroy - to delete a solver instance 00200 00201 */ 00202 00203 extern int lsr_mkb_core_init( /* returns: >0 - solver ID, <0 - error code */ 00204 int Solver_id, /* in: solver ID (used to identify the subproblem) */ 00205 int Solver_type, // type of solver (as defined in problem input file) 00206 int Parallel, /* parameter specifying sequential (LSC_SEQUENTIAL) */ 00207 /* or parallel (LSC_PARALLEL) execution */ 00208 int* Max_num_levels_p, /* in: number of levels for multigrid: */ 00209 /* 1 - enforce single level solver */ 00210 /* >1 - enforce the number of levels */ 00211 /* out: actual number of levels !!! */ 00212 char* Filename, /* in: name of the file with control parameters */ 00213 int Max_iter, /* maximal number of iterations, -1 for values from Filename */ 00214 int Error_type, /* type of error norm (stopping criterion), -1 for Filename*/ 00215 double Error_tolerance, /* value for stopping criterion, -1.0 for Filename */ 00216 int Monitoring_level /* Level of output, -1 for Filename */ 00217 ); 00218 00219 00220 extern int lsr_mkb_core_solve( /* returns: convergence indicator: */ 00221 /* 1 - convergence */ 00222 /* 0 - noconvergence */ 00223 /* <0 - error code */ 00224 int Solver_id, /* in: solver ID */ 00225 int Comp_type, /* in: indicator for the scope of computations: */ 00226 /* LSC_SOLVE - solve the system */ 00227 /* LSC_RESOLVE - resolve for the new right hand side */ 00228 int* L_matrix_id, /* in: list of identifiers of SM and LV in lad_... module */ 00229 int* L_ndof, /* in: the number of degrees of freedom */ 00230 int Ini_zero, /* in: indicator whether initial guess is zero (0/1) */ 00231 double* X, /* in: the initial guess */ 00232 /* out: the iterated solution */ 00233 double* B, /* in: the rhs vector, if NULL take rhs */ 00234 /* from block data structure */ 00235 int* Nr_iter, /* in: the maximum iterations to be performed */ 00236 /* out: actual number of iterations performed */ 00237 double* Toler, /* in: tolerance level for chosen measure */ 00238 /* out: the final value of convergence measure */ 00239 int Monitor, /* in: flag to determine monitoring level */ 00240 /* 0 - silent run, 1 - warning messages */ 00241 /* 2 - 1+restart data, 3 - 2+iteration data */ 00242 double* Conv_rate /* out: convergence rate */ 00243 ); 00244 00245 extern int lsr_mkb_core_destroy( /* returns: >0 - solver ID, <0 - error code */ 00246 int Solver_id /* in: solver ID (used to identify the subproblem) */ 00247 ); 00248 00249 /* in file "lss_mkb_core.c": 00250 00251 - preconditioner management routines 00252 lsr_mkb_core_create_precon - to create preconditioner 00253 lsr_mkb_core_fill_precon - to prepare preconditioner by factorizing the stiffness 00254 matrix, either only diagonal blocks or block ILU(0) 00255 lsr_mkb_core_destroy_precon - to free preconditioner data structure 00256 00257 */ 00258 00259 extern int lsr_mkb_core_create_precon( /* returns: >0 number of diagonal blocks */ 00260 /* <=0 - error */ 00261 int Solver_id, /* in: solver ID (used to identify the subproblem) */ 00262 int Level_id, /* in: level ID */ 00263 int SM_and_LV_id 00264 ); 00265 00266 extern int lsr_mkb_core_fill_precon( 00267 /* returns: >=0 - success code, <0 - error code */ 00268 int Solver_id, /* in: solver ID (used to identify the subproblem) */ 00269 int Level_id, /* in: level ID */ 00270 int SM_and_LV_id 00271 ); 00272 00273 extern int lsr_mkb_core_destroy_precon( 00274 /* returns: >=0 - success code, <0 - error code */ 00275 int Solver_id, /* in: solver ID (used to identify the subproblem) */ 00276 int Level_id, /* in: level ID */ 00277 int SM_and_LV_id 00278 ); 00279 00280 00282 /* in file "lss_mkb_core.c": 00283 00284 - solver algorithms 00285 lsr_mkb_core_gmres - to solve a system of linear equations Ax = b 00286 using the left preconditioned GMRES method 00287 lsr_mkb_core_comp_norm_rhs - to compute the norm of the preconditioned rhs 00288 lsr_mkb_core_standard - to solve the problem by standard iterations 00289 lsr_mkb_core_vcycle - to perform one V-cycle of multigrid 00290 lsr_mkb_core_smooth - to perform one smoothing step using different algorithms 00291 lsr_mkb_core_precon - to perform preconditioning using different algorithms 00292 lsr_mkb_core_compreres - to compute the residual of the left preconditioned 00293 system of equations, v = M^-1 * ( b - Ax ) 00294 ( used also to compute the product v = M^-1 * Ax) 00295 lsr_mkb_core_solve_coarse - to launch solver for the coarse grid problem 00296 */ 00297 00298 extern int lsr_mkb_core_gmres( /* returns: convergence indicator: */ 00299 /* 1 - convergence */ 00300 /* 0 - noconvergence */ 00301 int Solver_id, /* in: solver ID */ 00302 int Subsystem_id, /* in: subsystem data structure to be used */ 00303 int Level_id, /* in: index of the mesh (level) */ 00304 int Ndof, /* in: the number of degrees of freedom */ 00305 int Ini_zero, /* in: indicator whether initial guess is zero (0/1) */ 00306 double* X, /* in: the initial guess */ 00307 /* out: the iterated solution */ 00308 double* B, /* in: the rhs vector, if NULL take rhs */ 00309 /* from block data structure */ 00310 int Krylbas, /* in: number of Krylov space vectors */ 00311 int* Iter, /* in: the maximum GMRES iterations to be performed */ 00312 /* out: actual number of iterations performed */ 00313 double* Resid, /* in: tolerance level for residual */ 00314 /* out: the final value of residual */ 00315 double* Rel_res, /* in: tolerance level for relative residual */ 00316 /* out: the final value of relative residual */ 00317 double* Rhs_res, /* in: tolerance level for ratio rhs/residual */ 00318 /* out: the final value of the ratio rhs/residual */ 00319 int Monitor, /* in: flag to determine monitoring level */ 00320 /* 0 - silent run, 1 - warning messages */ 00321 /* 2 - 1+restart data, 3 - 2+iteration data */ 00322 double* Pconvr /* out: convergence rate */ 00323 ); 00324 00325 extern double lsr_mkb_core_comp_norm_rhs ( 00326 /* returns: the norm of the rhs vector */ 00327 int Solver_id, /* in: solver ID */ 00328 int Subsystem_id, /* in: subsystem data structure to be used */ 00329 int Level_id /* in: index of the mesh (level) */ 00330 ); 00331 00332 extern int lsr_mkb_core_standard( /* returns: convergence indicator: */ 00333 /* 1 - convergence */ 00334 /* 0 - noconvergence */ 00335 int Solver_id, /* in: solver ID */ 00336 int Subsystem_id, /* in: subsystem data structure to be used */ 00337 int Level_id, /* in: index of the mesh (level) */ 00338 int Ndof, /* in: the number of degrees of freedom */ 00339 int Ini_zero, /* in: indicator whether initial guess is zero (0/1) */ 00340 double* X, /* in: the initial guess */ 00341 /* out: the iterated solution */ 00342 double* B, /* in: the rhs vector, if NULL take rhs */ 00343 /* from block data structure */ 00344 int* Iter, /* in: the maximum iterations to be performed */ 00345 /* out: actual number of iterations performed */ 00346 double* Toler, /* in: tolerance level for max norm of update */ 00347 /* out: the final value of max norm of update */ 00348 int Monitor, /* in: flag to determine monitoring level */ 00349 /* 0 - silent run, 1 - warning messages */ 00350 /* 2 - 1+restart data, 3 - 2+iteration data */ 00351 double* Pconvr /* out: convergence rate */ 00352 ); 00353 00354 extern void lsr_mkb_core_vcycle ( 00355 int Solver_id, /* in: solver ID */ 00356 int Subsystem_id, /* in: subsystem data structure to be used */ 00357 int Level_id, /* in: index of the mesh (level) */ 00358 int Use_rhs, /* in: flag for considering RHS */ 00359 int Ini_zero, /* in: flag for zero initial guess */ 00360 double* X, /* in/out: initial guess vector and solution */ 00361 double* B /* in: the rhs vector, if NULL take rhs */ 00362 /* from block data structure */ 00363 ); 00364 00365 extern void lsr_mkb_vcycle_amg( 00366 int Solver_id, /* in: solver ID */ 00367 int Subsystem_id, /* in: subsystem data structure to be used */ 00368 int Level_id, /* in: index of the mesh (level) */ 00369 int Use_rhs, /* in: flag for considering RHS */ 00370 int Ini_zero, /* in: flag for zero initial guess */ 00371 double* X, /* in/out: initial guess vector and solution */ 00372 double* B, /* in: the rhs vector, if NULL take rhs */ 00373 int nr_pre, /* in: nr of presmoothing iterations */ 00374 int nr_post /* in: nr of postsmoothing iterations */ 00375 ); 00376 00377 extern void lsr_mkb_core_smooth( 00378 int Solver_id, /* in: solver ID */ 00379 int Subsystem_id, /* in: subsystem data structure to be used */ 00380 int Level_id, /* in: index of the mesh (level) */ 00381 int Use_rhs, /* in: flag for considering RHS */ 00382 int Ini_zero, /* in: flag for zero initial guess */ 00383 double* X, /* in/out: initial guess vector and solution */ 00384 double* B /* in: the rhs vector, if NULL take rhs */ 00385 /* from block data structure */ 00386 ); 00387 00388 extern void lsr_mkb_core_multi_precon ( 00389 int Solver_id, /* in: solver ID */ 00390 int Subsystem_id, /* in: subsystem data structure to be used */ 00391 int Level_id, /* in: index of the mesh (level) */ 00392 double* X, /* in/out: initial guess vector and solution */ 00393 double* B /* in: the rhs vector, if NULL take rhs */ 00394 /* from block data structure */ 00395 ); 00396 00397 extern void lsr_mkb_core_precon( 00398 int Solver_id, /* in: solver ID */ 00399 int Subsystem_id, /* in: subsystem data structure to be used */ 00400 int Level_id, /* in: index of the mesh (level) */ 00401 double* X, /* in/out: initial guess vector and solution */ 00402 double* B /* in: the rhs vector, if NULL take rhs */ 00403 /* from block data structure */ 00404 ); 00405 00406 extern void lsr_mkb_core_compreres ( 00407 int Solver_id, /* in: pointer to solver data structure to be passed 00408 to data structure dependent routines */ 00409 int Subsystem_id, /* in: subsystem data structure to be used */ 00410 int Level_id, /* in: index of the mesh (level) */ 00411 int Control, /* in: indicator whether to compute residual (1) 00412 or matrix-vector product (0) */ 00413 int Ini_zero, /* in: flag for zero input vector X */ 00414 int Ndof, /* in: number of unknowns (components of X and V) */ 00415 double* X, /* in: input vector */ 00416 double* B, /* in: the rhs vector, if NULL take rhs */ 00417 /* from block data structure */ 00418 double* V /* out: output vector, V = M^-1 * ( B - A*X ) */ 00419 ); 00420 00421 00422 extern int lsr_mkb_core_solve_coarse( /* returns: 1 - success; <=0 - error code*/ 00423 int Solver_id, /* in: solver ID */ 00424 int Subsystem_id, /* in: subsystem data structure to be used */ 00425 int Level_id, /* in: index of the mesh (level) */ 00426 int Ini_zero, /* in: indicator whether initial guess is zero (0/1) */ 00427 double* X, /* in/out: initial guess and solution vector */ 00428 double* B /* in: rhs vector */ 00429 ); 00430 00431 00432 /* additional utilities: 00433 lsr_mkb_core_util_dvector - to allocate a double vector: name[0..ncom-1]: 00434 lsr_mkb_core_util_ivector - to allocate an integer vector: name[0..ncom-1]: 00435 lsr_mkb_core_util_imatrix - to allocate an integer matrix name[0..nrow-1][0..ncol-1]: 00436 name=imatrix(nrow,ncol,error_text) 00437 lsr_mkb_core_util_dmatrix - to allocate a double matrix name[0..nrow-1][0..ncol-1]: 00438 name=imatrix(nrow,ncol,error_text) 00439 lsr_mkb_core_util_chk_list - to check whether a number is on the list 00440 lsr_mkb_core_util_put_list - to put Num on the list List with length Ll 00441 lsr_mkb_core_util_d_zero - to zero a double vector 00442 lsr_mkb_core_util_i_zero - to zero an integer vector 00443 lsr_mkb_core_util_sort - to heap-sort an array 00444 lsr_mkb_core_util_dgetrf - quasi-LU decomposition of a matrix 00445 lsr_mkb_core_util_dgetrs - to perform forward reduction and back substitution 00446 of the RHS vector for solving a system of linear equations 00447 */ 00448 00449 extern double *lsr_mkb_core_util_dvector( 00450 /* return: pointer to allocated vector */ 00451 int Ncom, /* in: number of components */ 00452 char Error_text[]/* in: error text to be printed */ 00453 ); 00454 00455 extern int *lsr_mkb_core_util_ivector( 00456 /* return: pointer to allocated vector */ 00457 int Ncom, /* in: number of components */ 00458 char Error_text[]/* in: error text to be printed */ 00459 ); 00460 00461 extern int **lsr_mkb_core_util_imatrix( /* returns: pointer to array of pointers to integers */ 00462 int Nrow, /* in: number of rows */ 00463 int Ncol, /* in: number of columns */ 00464 char Error_text[]/* in: text to print in case of error */ 00465 ); 00466 00467 extern double **lsr_mkb_core_util_dmatrix( /* returns: pointer to array of pointers to doubles */ 00468 int Nrow, /* in: number of rows */ 00469 int Ncol, /* in: number of columns */ 00470 char Error_text[]/* in: text to print in case of error */ 00471 ); 00472 00473 extern int lsr_mkb_core_util_chk_list( /* returns: */ 00474 /* >0 - position on the list */ 00475 /* 0 - not found on the list */ 00476 int Num, /* number to be checked */ 00477 int* List, /* list of numbers */ 00478 int Ll /* length of the list */ 00479 ); 00480 00481 extern int lsr_mkb_core_util_put_list( /* returns*/ 00482 /* >0 - position already occupied on the list */ 00483 /* 0 - put on the list */ 00484 /* -1 - list full, not found on the list */ 00485 int Num, /* in: number to put on the list */ 00486 int* List, /* in: list */ 00487 int Ll /* in: total list's lengths */ 00488 ); 00489 00490 extern void lsr_mkb_core_util_d_zero(double *Vec, int Num); 00491 00492 extern void lsr_mkb_core_util_i_zero(int *Vec, int Num); 00493 00494 extern void lsr_mkb_core_util_sort( 00495 int *Ind_array, /* in/out: index array for sorting */ 00496 double *Val_array /* in: array of values used for sorting */ 00497 ); 00498 00499 extern void lsr_mkb_core_util_dgetrf(double* a, int m, int* ips); 00500 00501 extern void lsr_mkb_core_util_dgetrs(double* a, int m, double* b, double* x, int* ips); 00502 00503 00504 00508 extern void lsr_mkb_core_util_skip_rest_of_line( 00509 FILE *Fp /* in: input file */ 00510 ); 00511 00512 00514 00515 /*--------------------------------------------------------- 00516 lsr_mkb_core_get_pdeg_coarse - to get enforced pdeg for the coarse mesh 00517 ---------------------------------------------------------*/ 00518 extern int lsr_mkb_core_get_pdeg_coarse( // returns: enforced pdeg for the coarse mesh 00519 int Solver_id, /* in: solver ID (used to identify the subproblem) */ 00520 int Level_id /* in: level number */ 00521 ); 00522 00523 00524 00525 // kept for sentimental reasons and bleak outlooks for the future - matrix free approach 00526 /* extern void lsr_mkb_core_core_mfaiter( */ 00527 /* lst_mkb_core_levels* level,/\* in: pointer to current level data structure *\/ */ 00528 /* int Use_rhs, /\* in: 0 - no rhs, 1 - with rhs *\/ */ 00529 /* int Ini_zero, /\* in: flag for zero initial guess *\/ */ 00530 // int Nr_prec, /* in: number of preconditioner iterations */ 00531 /* int Ndof, /\* in: number of unknowns (components of v*) *\/ */ 00532 /* double* V, /\* in,out: vector of unknowns updated *\/ */ 00533 /* /\* during the loop over subdomains *\/ */ 00534 /* double* B /\* in: the rhs vector, if NULL take rhs *\/ */ 00535 /* /\* from block data structure *\/ */ 00536 /* ); */ 00537 00538 /* extern void lsr_mkb_core_core_mfmiter( */ 00539 /* lst_mkb_core_levels* level,/\* in: pointer to current level data structure *\/ */ 00540 /* int Use_rhs, /\* in: 0 - no rhs, 1 - with rhs *\/ */ 00541 /* int Ini_zero, /\* in: flag for zero initial guess *\/ */ 00542 // int Nr_prec, /* in: number of preconditioner iterations */ 00543 /* int Ndof, /\* in: number of unknowns (components of v*) *\/ */ 00544 /* double* V, /\* in,out: vector of unknowns updated *\/ */ 00545 /* /\* during the loop over subdomains *\/ */ 00546 /* double* B /\* in: the rhs vector, if NULL take rhs *\/ */ 00547 /* /\* from block data structure *\/ */ 00548 /* ); */ 00549 00550 00551 00552 #endif