Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
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
190
193
197
200
203
206
209
212
215
218
221
224
227
228 //-----------------------------------------
229 // extra near kernal space for extra solve
230
233
236
239 //-----------------------------------------
240
243
246
247} AMG_data_bsr;
255typedef struct {
256
259
262
271typedef struct {
272
275
278
281
284
287
290
293
296
299
302
305
308
311
314
317
320
323
326
329
332
335
338
339 // extra near kernal space
340
343
346
349
352
355
363typedef struct {
364
365 /*-------------------------------------*/
366 /* Basic data for block preconditioner */
367 /*-------------------------------------*/
374 /*------------------------------*/
375 /* Data for the diagonal blocks */
376 /*------------------------------*/
377
378 /*--- solve by direct solver ---*/
379 void** LU_diag;
381 /*--- solve by AMG ---*/
398typedef struct {
399
406 void** local_LU;
410 // temprary work spaces
416#endif /* end if for __FASPBLOCK_HEADER__ */
417
418/*---------------------------------*/
419/*-- End of File --*/
420/*---------------------------------*/
Main header file for the FASP project.
#define REAL
Definition: fasp.h:75
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:71
#define INT
Definition: fasp.h:72
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
dBSRmat PT
Definition: fasp_block.h:196
dvector diaginv_SS
pointer to the diagonal inverse of the saturation block at level level_num
Definition: fasp_block.h:208
INT near_kernel_dim
dimension of the near kernel for SAMG
Definition: fasp_block.h:223
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:199
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:232
dBSRmat SS
pointer to the saturation block (only for reservoir simulation)
Definition: fasp_block.h:202
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:245
ILU_data PP_LU
ILU data for pressure block.
Definition: fasp_block.h:211
AMG_data * mglT
AMG data for TT, Li Zhao, 05/23/2023.
Definition: fasp_block.h:192
dvector b
pointer to the right-hand side at level level_num
Definition: fasp_block.h:164
AMG_data * mglP
AMG data for PP, Li Zhao, 05/19/2023.
Definition: fasp_block.h:185
REAL ** near_kernel_basis
basis of near kernel space for SAMG
Definition: fasp_block.h:226
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:217
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:238
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:235
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:205
dCSRmat TT
Definition: fasp_block.h:189
dvector w
temporary work space
Definition: fasp_block.h:242
ivector cfmark
pointer to the CF marker at level level_num
Definition: fasp_block.h:214
ILU_data LU
ILU matrix for ILU smoother.
Definition: fasp_block.h:220
Data for AMG methods.
Definition: fasp.h:804
Parameters for AMG methods.
Definition: fasp.h:455
Data for ILU setup.
Definition: fasp.h:651
Data for MUMPS interface.
Definition: fasp.h:607
Data for Intel MKL PARDISO interface.
Definition: fasp.h:625
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:151
Vector with n entries of REAL type.
Definition: fasp.h:354
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:190
Vector with n entries of INT type.
Definition: fasp.h:368
Data for block preconditioners in dBLCmat format.
Definition: fasp_block.h:363
dBLCmat * Ablc
Definition: fasp_block.h:368
dCSRmat * A_diag
Definition: fasp_block.h:370
AMG_data ** mgl
Definition: fasp_block.h:382
AMG_param * amgparam
Definition: fasp_block.h:384
Data for preconditioners in dBSRmat format.
Definition: fasp_block.h:271
dBSRmat * A
Matrix data.
Definition: fasp_block.h:337
SHORT print_level
print level in AMG preconditioner
Definition: fasp_block.h:277
AMG_data * pres_mgl_data
AMG preconditioner data for pressure block.
Definition: fasp_block.h:331
SHORT coarsening_type
coarsening type
Definition: fasp_block.h:304
SHORT nl_amli_krylov_type
type of krylov method used by Nonlinear AMLI cycle
Definition: fasp_block.h:325
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp_block.h:313
dCSRmat * A_nk
Matrix data for near kernal.
Definition: fasp_block.h:342
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp_block.h:319
REAL * w
temporary work space for other usage
Definition: fasp_block.h:354
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp_block.h:334
SHORT AMG_type
type of AMG method
Definition: fasp_block.h:274
REAL tol
tolerance for AMG preconditioner
Definition: fasp_block.h:286
SHORT coarse_solver
coarse solver type for AMG
Definition: fasp_block.h:310
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp_block.h:307
SHORT smoother
AMG smoother type.
Definition: fasp_block.h:292
SHORT cycle_type
AMG cycle type.
Definition: fasp_block.h:289
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp_block.h:316
REAL tentative_smooth
smooth factor for smoothing the tentative prolongation
Definition: fasp_block.h:322
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp_block.h:301
dCSRmat * R_nk
Resriction for near kernal.
Definition: fasp_block.h:348
AMG_data_bsr * mgl_data
AMG preconditioner data.
Definition: fasp_block.h:328
INT max_levels
max number of AMG levels
Definition: fasp_block.h:283
dCSRmat * P_nk
Prolongation for near kernal.
Definition: fasp_block.h:345
SHORT presmooth_iter
number of presmoothing
Definition: fasp_block.h:298
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp_block.h:280
dvector r
temporary dvector used to store and restore the residual
Definition: fasp_block.h:351
SHORT smooth_order
AMG smoother ordering.
Definition: fasp_block.h:295
Data for sweeping preconditioner.
Definition: fasp_block.h:398
Data for diagnal preconditioners in dBSRmat format.
Definition: fasp_block.h:255
INT nb
dimension of each sub-block
Definition: fasp_block.h:258
dvector diag
diagnal elements
Definition: fasp_block.h:261