Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
PreAMGSetupUA.c
Go to the documentation of this file.
1
22#include <math.h>
23#include <time.h>
24
25#include "fasp.h"
26#include "fasp_functs.h"
27
28/*---------------------------------*/
29/*-- Declare Private Functions --*/
30/*---------------------------------*/
31
32#include "PreAMGAggregation.inl"
33#include "PreAMGAggregationCSR.inl"
34#include "PreAMGAggregationUA.inl"
35
36static SHORT amg_setup_unsmoothP_unsmoothR(AMG_data*, AMG_param*);
37
38/*---------------------------------*/
39/*-- Public Functions --*/
40/*---------------------------------*/
41
56{
57 const SHORT prtlvl = param->print_level;
58
59 // Output some info for debuging
60 if (prtlvl > PRINT_NONE) printf("\nSetting up UA AMG ...\n");
61
62#if DEBUG_MODE > 0
63 printf("### DEBUG: [-Begin-] %s ...\n", __FUNCTION__);
64 printf("### DEBUG: nr=%d, nc=%d, nnz=%d\n", mgl[0].A.row, mgl[0].A.col,
65 mgl[0].A.nnz);
66#endif
67
68 SHORT status = amg_setup_unsmoothP_unsmoothR(mgl, param);
69
70#if DEBUG_MODE > 0
71 printf("### DEBUG: [--End--] %s ...\n", __FUNCTION__);
72#endif
73
74 return status;
75}
76
77/*---------------------------------*/
78/*-- Private Functions --*/
79/*---------------------------------*/
80
101static SHORT amg_setup_unsmoothP_unsmoothR(AMG_data* mgl, AMG_param* param)
102{
103 const SHORT prtlvl = param->print_level;
104 const SHORT cycle_type = param->cycle_type;
105 const SHORT csolver = param->coarse_solver;
106 const SHORT min_cdof = MAX(param->coarse_dof, 50);
107 const INT m = mgl[0].A.row;
108
109 // empiric value
110 const REAL cplxmax = 3.0;
111 const REAL xsi = 0.6;
112 INT icum = 1;
113 REAL eta, fracratio;
114
115 // local variables
116 SHORT max_levels = param->max_levels, lvl = 0, status = FASP_SUCCESS;
117 INT i;
118 REAL setup_start, setup_end;
119 ILU_param iluparam;
120 SWZ_param swzparam;
121
122#if DEBUG_MODE > 0
123 printf("### DEBUG: [-Begin-] %s ...\n", __FUNCTION__);
124 printf("### DEBUG: nr=%d, nc=%d, nnz=%d\n", mgl[0].A.row, mgl[0].A.col,
125 mgl[0].A.nnz);
126#endif
127
128 fasp_gettime(&setup_start);
129
130 // level info (fine: 0; coarse: 1)
131 ivector* vertices = (ivector*)fasp_mem_calloc(max_levels, sizeof(ivector));
132
133 // each level stores the information of the number of aggregations
134 INT* num_aggs = (INT*)fasp_mem_calloc(max_levels, sizeof(INT));
135
136 // each level stores the information of the strongly coupled neighborhoods
137 dCSRmat* Neighbor = (dCSRmat*)fasp_mem_calloc(max_levels, sizeof(dCSRmat));
138
139 // Initialize level information
140 for (i = 0; i < max_levels; ++i) num_aggs[i] = 0;
141
142 mgl[0].near_kernel_dim = 1;
143 mgl[0].near_kernel_basis =
144 (REAL**)fasp_mem_calloc(mgl->near_kernel_dim, sizeof(REAL*));
145
146 for (i = 0; i < mgl->near_kernel_dim; ++i) {
147 mgl[0].near_kernel_basis[i] = (REAL*)fasp_mem_calloc(m, sizeof(REAL));
148 fasp_darray_set(m, mgl[0].near_kernel_basis[i], 1.0);
149 }
150
151 // Initialize ILU parameters
152 mgl->ILU_levels = param->ILU_levels;
153 if (param->ILU_levels > 0) {
154 iluparam.print_level = param->print_level;
155 iluparam.ILU_lfil = param->ILU_lfil;
156 iluparam.ILU_droptol = param->ILU_droptol;
157 iluparam.ILU_relax = param->ILU_relax;
158 iluparam.ILU_type = param->ILU_type;
159 }
160
161 // Initialize Schwarz parameters
162 mgl->SWZ_levels = param->SWZ_levels;
163 if (param->SWZ_levels > 0) {
164 swzparam.SWZ_mmsize = param->SWZ_mmsize;
165 swzparam.SWZ_maxlvl = param->SWZ_maxlvl;
166 swzparam.SWZ_type = param->SWZ_type;
167 swzparam.SWZ_blksolver = param->SWZ_blksolver;
168 }
169
170 // Initialize AMLI coefficients
171 if (cycle_type == AMLI_CYCLE) {
172 const INT amlideg = param->amli_degree;
173 param->amli_coef = (REAL*)fasp_mem_calloc(amlideg + 1, sizeof(REAL));
174 REAL lambda_max = 2.0, lambda_min = lambda_max / 4;
175 fasp_amg_amli_coef(lambda_max, lambda_min, amlideg, param->amli_coef);
176 }
177
178#if DIAGONAL_PREF
179 fasp_dcsr_diagpref(&mgl[0].A); // reorder each row to make diagonal appear first
180#endif
181
182 /*----------------------------*/
183 /*--- checking aggregation ---*/
184 /*----------------------------*/
185
186 // Pairwise matching algorithm requires diagonal preference ordering
187 if (param->aggregation_type == PAIRWISE) {
188 param->pair_number = MIN(param->pair_number, max_levels);
189 fasp_dcsr_diagpref(&mgl[0].A);
190 }
191
192 // Main AMG setup loop
193 while ((mgl[lvl].A.row > min_cdof) && (lvl < max_levels - 1)) {
194
195#if DEBUG_MODE > 1
196 printf("### DEBUG: level = %d, row = %d, nnz = %d\n", lvl, mgl[lvl].A.row,
197 mgl[lvl].A.nnz);
198#endif
199
200 /*-- Setup ILU decomposition if necessary */
201 if (lvl < param->ILU_levels) {
202 status = fasp_ilu_dcsr_setup(&mgl[lvl].A, &mgl[lvl].LU, &iluparam);
203 if (status < 0) {
204 if (prtlvl > PRINT_MIN) {
205 printf("### WARNING: ILU setup on level-%d failed!\n", lvl);
206 printf("### WARNING: Disable ILU for level >= %d.\n", lvl);
207 }
208 param->ILU_levels = lvl;
209 }
210 }
211
212 /*-- Setup Schwarz smoother if necessary */
213 if (lvl < param->SWZ_levels) {
214 mgl[lvl].Schwarz.A = fasp_dcsr_sympart(&mgl[lvl].A);
215 fasp_dcsr_shift(&(mgl[lvl].Schwarz.A), 1);
216 status = fasp_swz_dcsr_setup(&mgl[lvl].Schwarz, &swzparam);
217 if (status < 0) {
218 if (prtlvl > PRINT_MIN) {
219 printf("### WARNING: Schwarz on level-%d failed!\n", lvl);
220 printf("### WARNING: Disable Schwarz for level >= %d.\n", lvl);
221 }
222 param->SWZ_levels = lvl;
223 }
224 }
225
226 /*-- Aggregation --*/
227 switch (param->aggregation_type) {
228
229 case VMB: // VMB aggregation
230
231 status = aggregation_vmb(&mgl[lvl].A, &vertices[lvl], param, lvl + 1,
232 &Neighbor[lvl], &num_aggs[lvl]);
233
234 /*-- Choose strength threshold adaptively --*/
235 if (num_aggs[lvl] * 4.0 > mgl[lvl].A.row)
236 param->strong_coupled /= 2.0;
237 else if (num_aggs[lvl] * 1.25 < mgl[lvl].A.row)
238 param->strong_coupled *= 2.0;
239
240 break;
241
242 case NPAIR: // non-symmetric pairwise matching aggregation
243 status =
244 aggregation_nsympair(mgl, param, lvl, vertices, &num_aggs[lvl]);
245 /*-- Modified by Chunsheng Feng on 10/17/2020, ZCS on 01/15/2021:
246 if NPAIR fail, switch aggregation type to VBM. --*/
247 if (status != FASP_SUCCESS || num_aggs[lvl] * 2.0 > mgl[lvl].A.row) {
248 if (prtlvl > PRINT_MORE) {
249 printf("### WARNING: Non-symmetric pairwise matching failed on "
250 "level %d!\n",
251 lvl);
252 printf("### WARNING: Switch to VMB aggregation on level %d!\n",
253 lvl);
254 }
255 param->aggregation_type = VMB;
256 status = aggregation_vmb(&mgl[lvl].A, &vertices[lvl], param,
257 lvl + 1, &Neighbor[lvl], &num_aggs[lvl]);
258 }
259
260 break;
261
262 default: // symmetric pairwise matching aggregation
263 status =
264 aggregation_symmpair(mgl, param, lvl, vertices, &num_aggs[lvl]);
265 }
266
267 // Check 1: Did coarsening step succeed?
268 if (status < 0) {
269 // When error happens, stop at the current multigrid level!
270 if (prtlvl > PRINT_MIN) {
271 printf("### WARNING: Stop coarsening on level %d!\n", lvl);
272 }
273 status = FASP_SUCCESS;
274 fasp_ivec_free(&vertices[lvl]);
275 fasp_dcsr_free(&Neighbor[lvl]);
276 break;
277 }
278
279 /*-- Form Prolongation --*/
280 form_tentative_p(&vertices[lvl], &mgl[lvl].P, mgl[0].near_kernel_basis,
281 num_aggs[lvl]);
282
283 // Check 2: Is coarse sparse too small?
284 if (mgl[lvl].P.col < MIN_CDOF) {
285 fasp_ivec_free(&vertices[lvl]);
286 fasp_dcsr_free(&Neighbor[lvl]);
287 break;
288 }
289
290 // Check 3: Does this coarsening step too aggressive?
291 if (mgl[lvl].P.row > mgl[lvl].P.col * MAX_CRATE) {
292 if (prtlvl > PRINT_MIN) {
293 printf("### WARNING: Coarsening might be too aggressive!\n");
294 printf("### WARNING: Fine level = %d, coarse level = %d. Discard!\n",
295 mgl[lvl].P.row, mgl[lvl].P.col);
296 }
297 fasp_ivec_free(&vertices[lvl]);
298 fasp_dcsr_free(&Neighbor[lvl]);
299 break;
300 }
301
302 /*-- Form restriction --*/
303 fasp_dcsr_trans(&mgl[lvl].P, &mgl[lvl].R);
304
305 /*-- Form coarse level stiffness matrix --*/
306 fasp_blas_dcsr_rap_agg(&mgl[lvl].R, &mgl[lvl].A, &mgl[lvl].P, &mgl[lvl + 1].A);
307
308 fasp_dcsr_free(&Neighbor[lvl]);
309 fasp_ivec_free(&vertices[lvl]);
310
311 ++lvl;
312
313#if DIAGONAL_PREF
315 &mgl[lvl].A); // reorder each row to make diagonal appear first
316#endif
317
318 // Check 4: Is this coarsening ratio too small?
319 if ((REAL)mgl[lvl].P.col > mgl[lvl].P.row * MIN_CRATE) {
320 param->quality_bound *= 2.0;
321 }
322
323 } // end of the main while loop
324
325 // Setup coarse level systems for direct solvers
326 switch (csolver) {
327
328#if WITH_MUMPS
329 case SOLVER_MUMPS:
330 {
331 // Setup MUMPS direct solver on the coarsest level
332 mgl[lvl].mumps.job = 1;
333 fasp_solver_mumps_steps(&mgl[lvl].A, &mgl[lvl].b, &mgl[lvl].x,
334 &mgl[lvl].mumps);
335 break;
336 }
337#endif
338
339#if WITH_UMFPACK
340 case SOLVER_UMFPACK:
341 {
342 // Need to sort the matrix A for UMFPACK to work
343 dCSRmat Ac_tran;
344 Ac_tran =
345 fasp_dcsr_create(mgl[lvl].A.row, mgl[lvl].A.col, mgl[lvl].A.nnz);
346 fasp_dcsr_transz(&mgl[lvl].A, NULL, &Ac_tran);
347 // It is equivalent to do transpose and then sort
348 // fasp_dcsr_trans(&mgl[lvl].A, &Ac_tran);
349 // fasp_dcsr_sort(&Ac_tran);
350 fasp_dcsr_cp(&Ac_tran, &mgl[lvl].A);
351 fasp_dcsr_free(&Ac_tran);
352 mgl[lvl].Numeric = fasp_umfpack_factorize(&mgl[lvl].A, 0);
353 break;
354 }
355#endif
356
357#if WITH_PARDISO
358 case SOLVER_PARDISO:
359 {
360 fasp_dcsr_sort(&mgl[lvl].A);
361 fasp_pardiso_factorize(&mgl[lvl].A, &mgl[lvl].pdata, prtlvl);
362 break;
363 }
364#endif
365
366 default: // Do nothing!
367 break;
368 }
369
370 // setup total level number and current level
371 mgl[0].num_levels = max_levels = lvl + 1;
372 mgl[0].w = fasp_dvec_create(m);
373
374 for (lvl = 1; lvl < max_levels; ++lvl) {
375 INT mm = mgl[lvl].A.row;
376 mgl[lvl].num_levels = max_levels;
377 mgl[lvl].b = fasp_dvec_create(mm);
378 mgl[lvl].x = fasp_dvec_create(mm);
379
380 mgl[lvl].cycle_type = cycle_type; // initialize cycle type!
381 mgl[lvl].ILU_levels = param->ILU_levels - lvl; // initialize ILU levels!
382 mgl[lvl].SWZ_levels = param->SWZ_levels - lvl; // initialize Schwarz!
383
384 if (cycle_type == NL_AMLI_CYCLE)
385 mgl[lvl].w = fasp_dvec_create(3 * mm);
386 else
387 mgl[lvl].w = fasp_dvec_create(2 * mm);
388 }
389
390 // setup for cycle type of unsmoothed aggregation
391 eta = xsi / ((1 - xsi) * (cplxmax - 1));
392 mgl[0].cycle_type = 1;
393 mgl[max_levels - 1].cycle_type = 0;
394
395 for (lvl = 1; lvl < max_levels - 1; ++lvl) {
396 fracratio = (REAL)mgl[lvl].A.nnz / mgl[0].A.nnz;
397 mgl[lvl].cycle_type =
398 (INT)(pow((REAL)xsi, (REAL)lvl) / (eta * fracratio * icum));
399 // safe-guard step: make cycle type >= 1 and <= 2
400 mgl[lvl].cycle_type = MAX(1, MIN(2, mgl[lvl].cycle_type));
401 icum = icum * mgl[lvl].cycle_type;
402 }
403
404#if MULTI_COLOR_ORDER
405 INT Colors, rowmax;
406#ifdef _OPENMP
407 int threads = fasp_get_num_threads();
408 if (threads > max_levels - 1) threads = max_levels - 1;
409#pragma omp parallel for private(lvl, rowmax, Colors) schedule(static, 1) \
410 num_threads(threads)
411#endif
412 for (lvl = 0; lvl < max_levels - 1; lvl++) {
413
414#if 1
415 dCSRmat_Multicoloring(&mgl[lvl].A, &rowmax, &Colors);
416#else
417 dCSRmat_Multicoloring_Theta(&mgl[lvl].A, mgl[lvl].GS_Theta, &rowmax, &Colors);
418#endif
419 if (prtlvl > 1)
420 printf("mgl[%3d].A.row = %12d, rowmax = %5d, rowavg = %7.2lf, colors = "
421 "%5d, Theta = %le.\n",
422 lvl, mgl[lvl].A.row, rowmax, (double)mgl[lvl].A.nnz / mgl[lvl].A.row,
423 mgl[lvl].A.color, mgl[lvl].GS_Theta);
424 }
425#endif
426
427 if (prtlvl > PRINT_NONE) {
428 fasp_gettime(&setup_end);
429 fasp_amgcomplexity(mgl, prtlvl);
430 fasp_cputime("Unsmoothed aggregation setup", setup_end - setup_start);
431 }
432
433 fasp_mem_free(Neighbor);
434 Neighbor = NULL;
435 fasp_mem_free(vertices);
436 vertices = NULL;
437 fasp_mem_free(num_aggs);
438 num_aggs = NULL;
439
440#if DEBUG_MODE > 0
441 printf("### DEBUG: [--End--] %s ...\n", __FUNCTION__);
442#endif
443
444 return status;
445}
446
447/*---------------------------------*/
448/*-- End of File --*/
449/*---------------------------------*/
void fasp_darray_set(const INT n, REAL *x, const REAL val)
Set initial value for an array to be x=val.
Definition: AuxArray.c:41
void fasp_mem_free(void *mem)
Free up previous allocated memory body and set pointer to NULL.
Definition: AuxMemory.c:152
void * fasp_mem_calloc(const unsigned int size, const unsigned int type)
Allocate, initiate, and check memory.
Definition: AuxMemory.c:65
void fasp_cputime(const char *message, const REAL cputime)
Print CPU walltime.
Definition: AuxMessage.c:179
void fasp_amgcomplexity(const AMG_data *mgl, const SHORT prtlvl)
Print level and complexity information of AMG.
Definition: AuxMessage.c:84
void fasp_gettime(REAL *time)
Get system time.
Definition: AuxTiming.c:37
void fasp_ivec_free(ivector *u)
Free vector data space of INT type.
Definition: AuxVector.c:164
dvector fasp_dvec_create(const INT m)
Create dvector data space of REAL type.
Definition: AuxVector.c:62
SHORT fasp_ilu_dcsr_setup(dCSRmat *A, ILU_data *iludata, ILU_param *iluparam)
Get ILU decomposition of a CSR matrix A.
INT fasp_swz_dcsr_setup(SWZ_data *swzdata, SWZ_param *swzparam)
Setup phase for the Schwarz methods.
void fasp_dcsr_diagpref(dCSRmat *A)
Re-order the column and data arrays of a CSR matrix, so that the first entry in each row is the diago...
Definition: BlaSparseCSR.c:680
dCSRmat fasp_dcsr_create(const INT m, const INT n, const INT nnz)
Create CSR sparse matrix data memory space.
Definition: BlaSparseCSR.c:47
void fasp_dcsr_shift(dCSRmat *A, const INT offset)
Re-index a REAL matrix in CSR format to make the index starting from 0 or 1.
void dCSRmat_Multicoloring_Theta(dCSRmat *A, REAL theta, INT *rowmax, INT *groups)
Use the greedy multicoloring algorithm to get color groups for for the adjacency graph of A.
void fasp_dcsr_free(dCSRmat *A)
Free CSR sparse matrix data memory space.
Definition: BlaSparseCSR.c:184
void fasp_dcsr_transz(dCSRmat *A, INT *p, dCSRmat *AT)
Generalized transpose of A: (n x m) matrix given in dCSRmat format.
void fasp_dcsr_sort(dCSRmat *A)
Sort each row of A in ascending order w.r.t. column indices.
Definition: BlaSparseCSR.c:385
void dCSRmat_Multicoloring(dCSRmat *A, INT *rowmax, INT *groups)
Use the greedy multicoloring algorithm to get color groups for for the adjacency graph of A.
void fasp_dcsr_cp(const dCSRmat *A, dCSRmat *B)
copy a dCSRmat to a new one B=A
Definition: BlaSparseCSR.c:851
dCSRmat fasp_dcsr_sympart(dCSRmat *A)
Get symmetric part of a dCSRmat matrix.
INT fasp_dcsr_trans(const dCSRmat *A, dCSRmat *AT)
Find transpose of dCSRmat matrix A.
Definition: BlaSparseCSR.c:952
void fasp_blas_dcsr_rap_agg(const dCSRmat *R, const dCSRmat *A, const dCSRmat *P, dCSRmat *RAP)
Triple sparse matrix multiplication B=R*A*P (nonzeros of R, P = 1)
Definition: BlaSpmvCSR.c:1276
SHORT fasp_amg_setup_ua(AMG_data *mgl, AMG_param *param)
Set up phase of unsmoothed aggregation AMG.
Definition: PreAMGSetupUA.c:55
void fasp_amg_amli_coef(const REAL lambda_max, const REAL lambda_min, const INT degree, REAL *coef)
Compute the coefficients of the polynomial used by AMLI-cycle.
int fasp_solver_mumps_steps(dCSRmat *ptrA, dvector *b, dvector *u, Mumps_data *mumps)
Solve Ax=b by MUMPS in three steps.
Definition: XtrMumps.c:196
Main header file for the FASP project.
#define MIN(a, b)
Definition: fasp.h:83
#define REAL
Definition: fasp.h:75
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:71
#define MAX(a, b)
Definition of max, min, abs.
Definition: fasp.h:82
#define INT
Definition: fasp.h:72
#define AMLI_CYCLE
Definition: fasp_const.h:181
#define SOLVER_PARDISO
Definition: fasp_const.h:126
#define NL_AMLI_CYCLE
Definition: fasp_const.h:182
#define FASP_SUCCESS
Definition of return status and error messages.
Definition: fasp_const.h:19
#define NPAIR
Definition: fasp_const.h:172
#define MAX_CRATE
Definition: fasp_const.h:262
#define SOLVER_MUMPS
Definition: fasp_const.h:125
#define PAIRWISE
Definition of aggregation types.
Definition: fasp_const.h:170
#define SOLVER_UMFPACK
Definition: fasp_const.h:124
#define VMB
Definition: fasp_const.h:171
#define MIN_CRATE
Definition: fasp_const.h:261
#define PRINT_MORE
Definition: fasp_const.h:76
#define PRINT_NONE
Print level for all subroutines – not including DEBUG output.
Definition: fasp_const.h:73
#define MIN_CDOF
Definition: fasp_const.h:260
#define PRINT_MIN
Definition: fasp_const.h:74
Data for AMG methods.
Definition: fasp.h:804
INT near_kernel_dim
dimension of the near kernel for SAMG
Definition: fasp.h:849
dCSRmat A
pointer to the matrix at level level_num
Definition: fasp.h:817
INT cycle_type
cycle type
Definition: fasp.h:869
Mumps_data mumps
data for MUMPS
Definition: fasp.h:866
SWZ_data Schwarz
data of Schwarz smoother
Definition: fasp.h:860
dvector b
pointer to the right-hand side at level level_num
Definition: fasp.h:826
REAL ** near_kernel_basis
basis of near kernel space for SAMG
Definition: fasp.h:852
void * Numeric
pointer to the numerical factorization from UMFPACK
Definition: fasp.h:834
INT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:843
INT SWZ_levels
number of levels use Schwarz smoother
Definition: fasp.h:857
dvector x
pointer to the iterative solution at level level_num
Definition: fasp.h:829
SHORT num_levels
number of levels in use <= max_levels
Definition: fasp.h:812
dvector w
temporary work space
Definition: fasp.h:863
Parameters for AMG methods.
Definition: fasp.h:455
INT ILU_lfil
level of fill-in for ILUs and ILUk
Definition: fasp.h:566
REAL ILU_relax
relaxation for ILUs
Definition: fasp.h:572
INT SWZ_mmsize
maximal block size
Definition: fasp.h:581
SHORT print_level
print level for AMG
Definition: fasp.h:461
INT SWZ_maxlvl
maximal levels
Definition: fasp.h:584
SHORT aggregation_type
aggregation type
Definition: fasp.h:518
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:509
SHORT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:560
SHORT coarse_solver
coarse solver type
Definition: fasp.h:500
REAL strong_coupled
strong coupled threshold for aggregate
Definition: fasp.h:545
SHORT cycle_type
type of AMG cycle
Definition: fasp.h:476
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:506
SHORT ILU_type
ILU type for smoothing.
Definition: fasp.h:563
INT SWZ_blksolver
type of Schwarz block solver
Definition: fasp.h:590
INT SWZ_type
type of Schwarz method
Definition: fasp.h:587
REAL quality_bound
quality threshold for pairwise aggregation
Definition: fasp.h:479
INT coarse_dof
max number of coarsest level DOF
Definition: fasp.h:473
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:569
INT SWZ_levels
number of levels use Schwarz smoother
Definition: fasp.h:578
INT pair_number
number of pairwise matchings
Definition: fasp.h:542
SHORT max_levels
max number of levels of AMG
Definition: fasp.h:470
Parameters for ILU.
Definition: fasp.h:404
INT ILU_lfil
level of fill-in for ILUk
Definition: fasp.h:413
REAL ILU_relax
add the sum of dropped elements to diagonal element in proportion relax
Definition: fasp.h:419
SHORT print_level
print level
Definition: fasp.h:407
SHORT ILU_type
ILU type for decomposition.
Definition: fasp.h:410
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:416
INT job
work for MUMPS
Definition: fasp.h:615
dCSRmat A
pointer to the original coefficient matrix
Definition: fasp.h:731
Parameters for Schwarz method.
Definition: fasp.h:430
INT SWZ_mmsize
maximal size of blocks
Definition: fasp.h:442
INT SWZ_maxlvl
maximal level for constructing the blocks
Definition: fasp.h:439
INT SWZ_blksolver
type of Schwarz block solver
Definition: fasp.h:445
SHORT SWZ_type
type for Schwarz method
Definition: fasp.h:436
Sparse matrix of REAL type in CSR format.
Definition: fasp.h:151
INT col
column of matrix A, n
Definition: fasp.h:157
INT row
row number of matrix A, m
Definition: fasp.h:154
INT nnz
number of nonzero entries
Definition: fasp.h:160
Vector with n entries of INT type.
Definition: fasp.h:368