Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
fasp_block.h
Go to the documentation of this file.
1
15#include "fasp.h"
16
17#ifndef __FASPBLOCK_HEADER__ /*-- allow multiple inclusions --*/
18#define __FASPBLOCK_HEADER__
20/*---------------------------*/
21/*--- Data structures ---*/
22/*---------------------------*/
23
34typedef struct dBSRmat {
35
38
41
44
46 INT nb; // NOTE: for the moment, allow nb*nb full block
47
49 INT storage_manner; // 0: row-major order, 1: column-major order
50
58
61
65
74typedef struct dBLCmat {
75
78
81
84
93typedef struct iBLCmat {
94
97
100
103
110typedef struct block_dvector {
111
114
117
126typedef struct block_ivector {
127
130
133
136/*---------------------------*/
137/*--- Parameter structures --*/
138/*---------------------------*/
139
146typedef struct {
147
150
153
156
159
162
165
168
171
174
176 void *Numeric;
177
180
183
186
189
192
195
198
201
204
207
210
213
214 //-----------------------------------------
215 // extra near kernal space for extra solve
216
219
222
225 //-----------------------------------------
226
229
232
233} AMG_data_bsr;
241typedef struct {
242
245
248
257typedef struct {
258
261
264
267
270
273
276
279
282
285
288
291
294
297
300
303
306
309
312
315
318
321
324
325 // extra near kernal space
326
329
332
335
338
341
349typedef struct {
350
351 /*-------------------------------------*/
352 /* Basic data for block preconditioner */
353 /*-------------------------------------*/
360 /*------------------------------*/
361 /* Data for the diagonal blocks */
362 /*------------------------------*/
363
364 /*--- solve by direct solver ---*/
365 void **LU_diag;
367 /*--- solve by AMG ---*/
384typedef struct {
385
392 void **local_LU;
396 // temprary work spaces
402#endif /* end if for __FASPBLOCK_HEADER__ */
403
404/*---------------------------------*/
405/*-- End of File --*/
406/*---------------------------------*/
Main header file for the FASP project.
#define REAL
Definition: fasp.h:67
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:63
#define INT
Definition: fasp.h:64
struct dBSRmat dBSRmat
struct dBLCmat dBLCmat
struct block_ivector block_ivector
struct iBLCmat iBLCmat
struct block_dvector block_dvector
Data for multigrid levels in dBSRmat format.
Definition: fasp_block.h:146
dCSRmat PP
pointer to the pressure block (only for reservoir simulation)
Definition: fasp_block.h:182
dvector diaginv_SS
pointer to the diagonal inverse of the saturation block at level level_num
Definition: fasp_block.h:194
INT near_kernel_dim
dimension of the near kernel for SAMG
Definition: fasp_block.h:209
dBSRmat R
restriction operator at level level_num
Definition: fasp_block.h:158
REAL * pw
pointer to the auxiliary vectors for pressure block
Definition: fasp_block.h:185
dBSRmat A
pointer to the matrix at level level_num
Definition: fasp_block.h:155
dCSRmat * A_nk
Matrix data for near kernal.
Definition: fasp_block.h:218
dBSRmat SS
pointer to the saturation block (only for reservoir simulation)
Definition: fasp_block.h:188
dCSRmat Ac
pointer to the matrix at level level_num (csr format)
Definition: fasp_block.h:173
Pardiso_data pdata
data for Intel MKL PARDISO
Definition: fasp_block.h:179
Mumps_data mumps
data for MUMPS
Definition: fasp_block.h:231
ILU_data PP_LU
ILU data for pressure block.
Definition: fasp_block.h:197
dvector b
pointer to the right-hand side at level level_num
Definition: fasp_block.h:164
REAL ** near_kernel_basis
basis of near kernel space for SAMG
Definition: fasp_block.h:212
void * Numeric
pointer to the numerical dactorization from UMFPACK
Definition: fasp_block.h:176
INT ILU_levels
number of levels use ILU smoother
Definition: fasp_block.h:203
dBSRmat P
prolongation operator at level level_num
Definition: fasp_block.h:161
INT num_levels
number of levels in use <= max_levels
Definition: fasp_block.h:152
dCSRmat * R_nk
Resriction for near kernal.
Definition: fasp_block.h:224
dvector x
pointer to the iterative solution at level level_num
Definition: fasp_block.h:167
INT max_levels
max number of levels
Definition: fasp_block.h:149
dCSRmat * P_nk
Prolongation for near kernal.
Definition: fasp_block.h:221
dvector diaginv
pointer to the diagonal inverse at level level_num
Definition: fasp_block.h:170
REAL * sw
pointer to the auxiliary vectors for saturation block
Definition: fasp_block.h:191
dvector w
temporary work space
Definition: fasp_block.h:228
ivector cfmark
pointer to the CF marker at level level_num
Definition: fasp_block.h:200
ILU_data LU
ILU matrix for ILU smoother.
Definition: fasp_block.h:206
Data for AMG methods.
Definition: fasp.h:790
Parameters for AMG methods.
Definition: fasp.h:447
Data for ILU setup.
Definition: fasp.h:637
Data for MUMPS interface.
Definition: fasp.h:593
Data for Intel MKL PARDISO interface.
Definition: fasp.h:611
Block REAL vector structure.
Definition: fasp_block.h:110
INT brow
row number of blocks in A, m
Definition: fasp_block.h:113
dvector ** blocks
blocks of dvector, point to blocks[brow]
Definition: fasp_block.h:116
Block INT vector structure.
Definition: fasp_block.h:126
INT brow
row number of blocks in A, m
Definition: fasp_block.h:129
ivector ** blocks
blocks of dvector, point to blocks[brow]
Definition: fasp_block.h:132
Block REAL CSR matrix format.
Definition: fasp_block.h:74
INT brow
row number of blocks in A, m
Definition: fasp_block.h:77
dCSRmat ** blocks
blocks of dCSRmat, point to blocks[brow][bcol]
Definition: fasp_block.h:83
INT bcol
column number of blocks A, n
Definition: fasp_block.h:80
Block sparse row storage matrix of REAL type.
Definition: fasp_block.h:34
INT COL
number of cols of sub-blocks in matrix A, N
Definition: fasp_block.h:40
INT NNZ
number of nonzero sub-blocks in matrix A, NNZ
Definition: fasp_block.h:43
REAL * val
Definition: fasp_block.h:57
INT nb
dimension of each sub-block
Definition: fasp_block.h:46
INT * IA
integer array of row pointers, the size is ROW+1
Definition: fasp_block.h:60
INT ROW
number of rows of sub-blocks in matrix A, M
Definition: fasp_block.h:37
INT * JA
Definition: fasp_block.h:64
INT storage_manner
storage manner for each sub-block
Definition: fasp_block.h:49
Sparse matrix of REAL type in CSR format.
Definition: fasp.h:143
Vector with n entries of REAL type.
Definition: fasp.h:346
Block INT CSR matrix format.
Definition: fasp_block.h:93
INT brow
row number of blocks in A, m
Definition: fasp_block.h:96
iCSRmat ** blocks
blocks of iCSRmat, point to blocks[brow][bcol]
Definition: fasp_block.h:102
INT bcol
column number of blocks A, n
Definition: fasp_block.h:99
Sparse matrix of INT type in CSR format.
Definition: fasp.h:182
Vector with n entries of INT type.
Definition: fasp.h:361
Data for block preconditioners in dBLCmat format.
Definition: fasp_block.h:349
dBLCmat * Ablc
Definition: fasp_block.h:354
dCSRmat * A_diag
Definition: fasp_block.h:356
AMG_data ** mgl
Definition: fasp_block.h:368
AMG_param * amgparam
Definition: fasp_block.h:370
Data for preconditioners in dBSRmat format.
Definition: fasp_block.h:257
dBSRmat * A
Matrix data.
Definition: fasp_block.h:323
SHORT print_level
print level in AMG preconditioner
Definition: fasp_block.h:263
AMG_data * pres_mgl_data
AMG preconditioner data for pressure block.
Definition: fasp_block.h:317
SHORT coarsening_type
coarsening type
Definition: fasp_block.h:290
SHORT nl_amli_krylov_type
type of krylov method used by Nonlinear AMLI cycle
Definition: fasp_block.h:311
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp_block.h:299
dCSRmat * A_nk
Matrix data for near kernal.
Definition: fasp_block.h:328
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp_block.h:305
REAL * w
temporary work space for other usage
Definition: fasp_block.h:340
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp_block.h:320
SHORT AMG_type
type of AMG method
Definition: fasp_block.h:260
REAL tol
tolerance for AMG preconditioner
Definition: fasp_block.h:272
SHORT coarse_solver
coarse solver type for AMG
Definition: fasp_block.h:296
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp_block.h:293
SHORT smoother
AMG smoother type.
Definition: fasp_block.h:278
SHORT cycle_type
AMG cycle type.
Definition: fasp_block.h:275
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp_block.h:302
REAL tentative_smooth
smooth factor for smoothing the tentative prolongation
Definition: fasp_block.h:308
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp_block.h:287
dCSRmat * R_nk
Resriction for near kernal.
Definition: fasp_block.h:334
AMG_data_bsr * mgl_data
AMG preconditioner data.
Definition: fasp_block.h:314
INT max_levels
max number of AMG levels
Definition: fasp_block.h:269
dCSRmat * P_nk
Prolongation for near kernal.
Definition: fasp_block.h:331
SHORT presmooth_iter
number of presmoothing
Definition: fasp_block.h:284
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp_block.h:266
dvector r
temporary dvector used to store and restore the residual
Definition: fasp_block.h:337
SHORT smooth_order
AMG smoother ordering.
Definition: fasp_block.h:281
Data for sweeping preconditioner.
Definition: fasp_block.h:384
Data for diagnal preconditioners in dBSRmat format.
Definition: fasp_block.h:241
INT nb
dimension of each sub-block
Definition: fasp_block.h:244
dvector diag
diagnal elements
Definition: fasp_block.h:247