Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
fasp.h
Go to the documentation of this file.
1
15#include <stdio.h>
16#include <stdlib.h>
17#include <string.h>
18
19#include "fasp_const.h"
20
21#if WITH_MUMPS
22#include "dmumps_c.h"
23#endif
24
25#if WITH_PARDISO
26#include "mkl_pardiso.h"
27#include "mkl_types.h"
28#endif
29
30#ifndef __FASP_HEADER__ /*-- allow multiple inclusions --*/
31#define __FASP_HEADER__
33/*---------------------------*/
34/*--- Macros definition ---*/
35/*---------------------------*/
36
40#define FASP_VERSION 2.0
42#ifdef _OPENMP
43#define MULTI_COLOR_ORDER \
44 ON
46#else
47#define MULTI_COLOR_ORDER \
48 OFF
50#endif
51
55#define DLMALLOC OFF
56#define NEDMALLOC OFF
63// When this flag is OFF, do not force C1 criterion for the classical AMG method
64#define RS_C1 ON
65// When this flag is ON, the matrix rows will be reordered as diagonal entries first
66#define DIAGONAL_PREF OFF
71#define SHORT short
72#define INT int
73#define LONG long
74#define LONGLONG long long
75#define REAL double
76#define LONGREAL long double
77#define STRLEN 256
82#define MAX(a, b) (((a) > (b)) ? (a) : (b))
83#define MIN(a, b) (((a) < (b)) ? (a) : (b))
84#define ABS(a) (((a) >= 0.0) ? (a) : -(a))
89#define GT(a, b) (((a) > (b)) ? (TRUE) : (FALSE))
90#define GE(a, b) (((a) >= (b)) ? (TRUE) : (FALSE))
91#define LS(a, b) (((a) < (b)) ? (TRUE) : (FALSE))
92#define LE(a, b) (((a) <= (b)) ? (TRUE) : (FALSE))
93#define ISNAN(a) (((a) != (a)) ? (TRUE) : (FALSE))
98#define PUT_INT(A) printf("### DEBUG: %s = %d\n", #A, (A))
99#define PUT_REAL(A) printf("### DEBUG: %s = %e\n", #A, (A))
101/*---------------------------*/
102/*--- Matrix and vector ---*/
103/*---------------------------*/
104
111typedef struct ddenmat {
112
115
118
121
130typedef struct idenmat {
131
134
137
140
151typedef struct dCSRmat {
152
155
158
161
164
167
170
171#if MULTI_COLOR_ORDER
173 INT color;
175 INT* IC;
177 INT* ICMAP;
178#endif
179
190typedef struct iCSRmat {
191
194
197
200
203
206
209
221typedef struct dCOOmat {
222
225
228
231
234
237
240
251typedef struct iCOOmat {
252
255
258
261
264
267
270
277typedef struct dCSRLmat {
278
281
284
287
290
293
296
299
302
305
316typedef struct dSTRmat {
317
320
323
326
329
332
335
338
341
344
347
354typedef struct dvector {
355
358
361
368typedef struct ivector {
369
372
375
378/*---------------------------*/
379/*--- Parameter structures --*/
380/*---------------------------*/
381
386typedef struct {
387
398} ITS_param;
404typedef struct {
405
408
411
414
417
420
423
424} ILU_param;
430typedef struct {
431
434
437
440
443
446
447} SWZ_param;
455typedef struct {
456
459
462
465
468
471
474
477
480
483
485 SHORT smooth_order; // 1: nature order 2: C/F order (both are symmetric)
486
489
492
495
498
501
504
507
510
513
516
519
522
525
528
531
534
537
540
543
546
549
552
555
558
561
564
567
570
573
576
579
582
585
588
591
594
595} AMG_param;
597/*---------------------------*/
598/*--- Work data structures --*/
599/*---------------------------*/
600
607typedef struct {
608
609#if WITH_MUMPS
611 DMUMPS_STRUC_C id;
612#endif
613
616
617} Mumps_data;
625typedef struct {
626
628 void* pt[64];
629
630#if WITH_PARDISO
632 MKL_INT iparm[64];
633
635 MKL_INT mtype;
636
638 MKL_INT maxfct;
639
641 MKL_INT mnum;
642
643#endif
644
645} Pardiso_data;
651typedef struct {
652
655
658
661
664
667
670
673
676
679
682
685 // iperm[0:n-1] = old indices of unknowns
686 // iperm[n:2*n-1] = reverse permutation = new indices.
687
690
693
696
699
702
705
708
711
714
717
718} ILU_data;
726typedef struct {
727
728 /* matrix information */
729
731 dCSRmat A; // note: must start from 1!! Change later
732
733 /* blocks information */
734
737
740
743
746
749
752
755
758
761
764
767
770
773
776
779
780#if WITH_UMFPACK
782 void** numeric;
783#endif
784
785#if WITH_MUMPS
787 DMUMPS_STRUC_C* id;
788#endif
789
792
795
796} SWZ_data;
804typedef struct {
805
806 /* Level information */
807
810
813
814 /* Problem information */
815
818
821
824
827
830
831 /* Extra information */
832
834 void* Numeric;
835
838
841
844
847
850
853
854 // Smoother order information
855
858
861
864
867
870
873
876
879
882
883#if MULTI_COLOR_ORDER
885 REAL GS_Theta;
886#endif
887
888} AMG_data;
894typedef struct {
895
898
901
904
907
910
913
916
919
922
925
928
931
934
937
940
943
946
949
952
955
958
961
962 // extra near kernel space
963
966
969
972
973 // temporary work space
974
977
980
981} precond_data;
987typedef struct {
988
991
994
997
1000
1003
1006
1009
1012
1015
1018
1021
1024
1027
1030
1033
1036
1039
1042
1043 // data for GS/block GS smoothers (STR format)
1044
1047
1050
1053
1056
1059
1062
1063 // temporary work space
1064
1067
1070
1079typedef struct {
1080
1083
1086
1095typedef struct {
1096
1098 void* data;
1099
1101 void (*fct)(REAL*, REAL*, void*);
1102
1103} precond;
1109typedef struct {
1110
1112 void* data;
1113
1115 void (*fct)(const void*, const REAL*, REAL*);
1116
1117} mxv_matfree;
1125typedef struct {
1126
1127 // output flags
1131 // problem parameters
1132 char inifile[STRLEN];
1133 char workdir[STRLEN];
1136 // parameters for iterative solvers
1146 // parameters for ILU
1153 // parameter for Schwarz
1159 // parameters for AMG
1179 // parameters for classical AMG
1191 // parameters for smoothed aggregation AMG
1199} input_param;
1201/*
1202 * OpenMP definitions and declarations
1203 */
1204#ifdef _OPENMP
1205
1206#include "omp.h"
1207
1208#define ILU_MC_OMP OFF
1210// extern INT omp_count; /**< Counter for multiple calls: Remove later!!! --Chensong
1211// */
1212
1213extern INT THDs_AMG_GS;
1214extern INT THDs_CPR_lGS;
1215extern INT THDs_CPR_gGS;
1216#ifdef DETAILTIME
1217extern REAL total_linear_time;
1218extern REAL total_start_time;
1219extern REAL total_setup_time;
1220extern INT total_iter;
1221extern INT fasp_called_times;
1222#endif
1223
1224#endif /* end if for _OPENMP */
1225
1226extern double PreSmoother_time_zl;
1227extern double PostSmoother_time_zl;
1228extern double Krylov_time_zl;
1229extern double Coarsen_time_zl;
1230extern double AMLI_cycle_time_zl;
1231
1232#endif /* end if for __FASP_HEADER__ */
1233
1234/*---------------------------------*/
1235/*-- End of File --*/
1236/*---------------------------------*/
INT THDs_CPR_gGS
Definition: AuxThreads.c:119
INT THDs_CPR_lGS
Definition: AuxThreads.c:118
INT THDs_AMG_GS
Definition: AuxThreads.c:117
#define STRLEN
Definition: fasp.h:77
#define REAL
Definition: fasp.h:75
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:71
#define INT
Definition: fasp.h:72
Definition of FASP constants, including messages, solver types, etc.
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
Pardiso_data pdata
data for Intel MKL PARDISO
Definition: fasp.h:837
Mumps_data mumps
data for MUMPS
Definition: fasp.h:866
dCSRmat R
restriction operator at level level_num
Definition: fasp.h:820
dCSRmat P
prolongation operator at level level_num
Definition: fasp.h:823
INT colors
number of colors
Definition: fasp.h:878
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 * ic
indices for different colors
Definition: fasp.h:872
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
INT * icmap
mapping from vertex to color
Definition: fasp.h:875
SHORT max_levels
max number of levels
Definition: fasp.h:809
SHORT num_levels
number of levels in use <= max_levels
Definition: fasp.h:812
dvector w
temporary work space
Definition: fasp.h:863
ivector cfmark
pointer to the CF marker at level level_num
Definition: fasp.h:840
REAL weight
weight for smoother
Definition: fasp.h:881
ILU_data LU
ILU matrix for ILU smoother.
Definition: fasp.h:846
Parameters for AMG methods.
Definition: fasp.h:455
SHORT aggregation_norm_type
aggregation norm type
Definition: fasp.h:521
INT ILU_lfil
level of fill-in for ILUs and ILUk
Definition: fasp.h:566
INT aggressive_level
number of levels use aggressive coarsening
Definition: fasp.h:536
REAL ILU_relax
relaxation for ILUs
Definition: fasp.h:572
REAL strong_threshold
strong connection threshold for coarsening
Definition: fasp.h:527
INT SWZ_mmsize
maximal block size
Definition: fasp.h:581
INT aggressive_path
number of paths use to determine strongly coupled C points
Definition: fasp.h:539
SHORT interpolation_type
interpolation type
Definition: fasp.h:524
SHORT print_level
print level for AMG
Definition: fasp.h:461
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:497
INT SWZ_maxlvl
maximal levels
Definition: fasp.h:584
SHORT aggregation_type
aggregation type
Definition: fasp.h:518
SHORT coarsening_type
coarsening type
Definition: fasp.h:515
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:512
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:503
SHORT smooth_filter
switch for filtered matrix used for smoothing the tentative prolongation
Definition: fasp.h:554
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 AMG_type
type of AMG method
Definition: fasp.h:458
REAL tol
stopping tolerance for AMG solver
Definition: fasp.h:467
SHORT coarse_solver
coarse solver type
Definition: fasp.h:500
REAL strong_coupled
strong coupled threshold for aggregate
Definition: fasp.h:545
REAL theta
theta for reduction-based amg
Definition: fasp.h:593
REAL relaxation
relaxation parameter for Jacobi and SOR smoother
Definition: fasp.h:494
SHORT smoother
smoother type
Definition: fasp.h:482
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
REAL tentative_smooth
relaxation parameter for smoothing the tentative prolongation
Definition: fasp.h:551
SHORT postsmooth_iter
number of postsmoothers
Definition: fasp.h:491
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
SHORT presmooth_iter
number of presmoothers
Definition: fasp.h:488
REAL truncation_threshold
truncation threshold
Definition: fasp.h:533
INT max_aggregation
max size of each aggregate
Definition: fasp.h:548
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:575
REAL max_row_sum
maximal row sum parameter
Definition: fasp.h:530
INT maxit
max number of iterations of AMG
Definition: fasp.h:464
SHORT smooth_restriction
smooth the restriction for SA methods or not
Definition: fasp.h:557
SHORT smooth_order
smoother order
Definition: fasp.h:485
Data for ILU setup.
Definition: fasp.h:651
INT * ijlu
integer array of row pointers and column indexes, the size is nzlu
Definition: fasp.h:669
REAL * luval
nonzero entries of LU
Definition: fasp.h:672
INT col
column of matrix LU, n
Definition: fasp.h:663
INT * jlevU
mapping from row to color for upper triangle
Definition: fasp.h:716
INT nlevU
number of colors for upper triangle
Definition: fasp.h:704
INT nwork
work space size
Definition: fasp.h:678
INT ncolors
number of colors for multi-threading
Definition: fasp.h:689
INT nb
block size for BSR type only
Definition: fasp.h:675
INT row
row number of matrix LU, m
Definition: fasp.h:660
INT nlevL
number of colors for lower triangle
Definition: fasp.h:701
INT type
type of ILUdata
Definition: fasp.h:657
INT * ic
indices for different colors
Definition: fasp.h:692
INT * icmap
mapping from vertex to color
Definition: fasp.h:695
INT * iperm
permutation arrays for ILUtp
Definition: fasp.h:684
INT nzlu
number of nonzero entries
Definition: fasp.h:666
INT * jlevL
mapping from row to color for lower triangle
Definition: fasp.h:713
REAL * work
work space
Definition: fasp.h:681
INT * uptr
temporary work space
Definition: fasp.h:698
INT * ilevL
number of vertices in each color for lower triangle
Definition: fasp.h:707
dCSRmat * A
pointer to the original coefficient matrix
Definition: fasp.h:654
INT * ilevU
number of vertices in each color for upper triangle
Definition: fasp.h:710
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
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:422
Parameters for iterative solvers.
Definition: fasp.h:386
SHORT itsolver_type
Definition: fasp.h:389
SHORT print_level
Definition: fasp.h:388
SHORT precond_type
Definition: fasp.h:391
REAL tol
Definition: fasp.h:395
SHORT decoup_type
Definition: fasp.h:390
INT restart
Definition: fasp.h:393
SHORT stop_type
Definition: fasp.h:392
REAL abstol
Definition: fasp.h:396
INT maxit
Definition: fasp.h:394
Data for MUMPS interface.
Definition: fasp.h:607
INT job
work for MUMPS
Definition: fasp.h:615
Data for Intel MKL PARDISO interface.
Definition: fasp.h:625
Data for Schwarz methods.
Definition: fasp.h:726
INT memt
working space size
Definition: fasp.h:766
INT * mask
mask
Definition: fasp.h:769
INT maxbs
maximal block size
Definition: fasp.h:772
REAL * al
LU decomposition: the L block.
Definition: fasp.h:757
dCSRmat A
pointer to the original coefficient matrix
Definition: fasp.h:731
dvector rhsloc1
local right hand side
Definition: fasp.h:748
dvector xloc1
local solution
Definition: fasp.h:751
SWZ_param * swzparam
param for Schwarz
Definition: fasp.h:794
INT nblk
number of blocks
Definition: fasp.h:736
REAL * au
LU decomposition: the U block.
Definition: fasp.h:754
dCSRmat * blk_data
matrix for each partition
Definition: fasp.h:778
INT SWZ_type
Schwarz method type.
Definition: fasp.h:760
INT blk_solver
Schwarz block solver.
Definition: fasp.h:763
INT * jblock
column index of blocks
Definition: fasp.h:742
Mumps_data * mumps
param for MUMPS
Definition: fasp.h:791
REAL * rhsloc
temp work space ???
Definition: fasp.h:745
INT * maxa
maxa
Definition: fasp.h:775
INT * iblock
row index of blocks
Definition: fasp.h:739
Parameters for Schwarz method.
Definition: fasp.h:430
INT SWZ_mmsize
maximal size of blocks
Definition: fasp.h:442
SHORT print_level
print leve
Definition: fasp.h:433
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 COO (IJ) format.
Definition: fasp.h:221
INT * colind
integer array of column indices, the size is nnz
Definition: fasp.h:236
INT col
column of matrix A, n
Definition: fasp.h:227
INT * rowind
integer array of row indices, the size is nnz
Definition: fasp.h:233
REAL * val
nonzero entries of A
Definition: fasp.h:239
INT row
row number of matrix A, m
Definition: fasp.h:224
INT nnz
number of nonzero entries
Definition: fasp.h:230
Sparse matrix of REAL type in CSRL format.
Definition: fasp.h:277
INT col
number of cols
Definition: fasp.h:283
REAL * val
values of all the nonzero entries
Definition: fasp.h:304
INT row
number of rows
Definition: fasp.h:280
INT * start
j in {start[i],...,start[i+1]-1} means nz_diff[i] nnz in index[j]-row
Definition: fasp.h:298
INT nnz
number of nonzero entries
Definition: fasp.h:286
INT * index
row index of the matrix (length-grouped): rows with same nnz are together
Definition: fasp.h:295
INT * nz_diff
nz_diff[i]: the i-th different value in 'nzrow'
Definition: fasp.h:292
INT dif
number of different values in i-th row, i=0:nrows-1
Definition: fasp.h:289
INT * ja
column indices of all the nonzeros
Definition: fasp.h:301
Sparse matrix of REAL type in CSR format.
Definition: fasp.h:151
INT col
column of matrix A, n
Definition: fasp.h:157
REAL * val
nonzero entries of A
Definition: fasp.h:169
INT row
row number of matrix A, m
Definition: fasp.h:154
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:163
INT nnz
number of nonzero entries
Definition: fasp.h:160
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:166
Structure matrix of REAL type.
Definition: fasp.h:316
INT * offsets
offsets of the off-diagonals (length is nband)
Definition: fasp.h:343
INT nx
number of grids in x direction
Definition: fasp.h:319
INT nxy
number of grids on x-y plane
Definition: fasp.h:328
INT ny
number of grids in y direction
Definition: fasp.h:322
INT nband
number of off-diag bands
Definition: fasp.h:340
REAL * diag
diagonal entries (length is ngrid*(nc^2))
Definition: fasp.h:337
INT ngrid
number of grids
Definition: fasp.h:334
INT nc
size of each block (number of components)
Definition: fasp.h:331
INT nz
number of grids in z direction
Definition: fasp.h:325
REAL ** offdiag
off-diagonal entries (dimension is nband * [(ngrid-|offsets|) * nc^2])
Definition: fasp.h:346
Dense matrix of REAL type.
Definition: fasp.h:111
INT col
number of columns
Definition: fasp.h:117
INT row
number of rows
Definition: fasp.h:114
REAL ** val
actual matrix entries
Definition: fasp.h:120
Vector with n entries of REAL type.
Definition: fasp.h:354
REAL * val
actual vector entries
Definition: fasp.h:360
INT row
number of rows
Definition: fasp.h:357
Sparse matrix of INT type in COO (IJ) format.
Definition: fasp.h:251
INT * I
integer array of row indices, the size is nnz
Definition: fasp.h:263
INT * J
integer array of column indices, the size is nnz
Definition: fasp.h:266
INT col
column of matrix A, n
Definition: fasp.h:257
INT row
row number of matrix A, m
Definition: fasp.h:254
INT nnz
number of nonzero entries
Definition: fasp.h:260
INT * val
nonzero entries of A
Definition: fasp.h:269
Sparse matrix of INT type in CSR format.
Definition: fasp.h:190
INT col
column of matrix A, n
Definition: fasp.h:196
INT row
row number of matrix A, m
Definition: fasp.h:193
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:202
INT nnz
number of nonzero entries
Definition: fasp.h:199
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:205
INT * val
nonzero entries of A
Definition: fasp.h:208
Dense matrix of INT type.
Definition: fasp.h:130
INT col
number of columns
Definition: fasp.h:136
INT row
number of rows
Definition: fasp.h:133
INT ** val
actual matrix entries
Definition: fasp.h:139
Input parameters.
Definition: fasp.h:1125
INT AMG_coarse_dof
Definition: fasp.h:1170
INT ILU_lfil
Definition: fasp.h:1148
REAL ILU_relax
Definition: fasp.h:1150
INT SWZ_mmsize
Definition: fasp.h:1154
SHORT AMG_smooth_order
Definition: fasp.h:1164
REAL itsolver_abstol
Definition: fasp.h:1142
SHORT print_level
Definition: fasp.h:1128
REAL AMG_quality_bound
Definition: fasp.h:1189
INT SWZ_maxlvl
Definition: fasp.h:1155
INT AMG_SWZ_levels
Definition: fasp.h:1177
SHORT AMG_levels
Definition: fasp.h:1161
SHORT AMG_coarsening_type
Definition: fasp.h:1180
SHORT AMG_cycle_type
Definition: fasp.h:1162
INT AMG_pair_number
Definition: fasp.h:1188
REAL AMG_strong_threshold
Definition: fasp.h:1183
REAL AMG_truncation_threshold
Definition: fasp.h:1184
SHORT AMG_polynomial_degree
Definition: fasp.h:1166
SHORT AMG_coarse_solver
Definition: fasp.h:1173
SHORT precond_type
Definition: fasp.h:1139
SHORT AMG_type
Definition: fasp.h:1160
SHORT AMG_smooth_filter
Definition: fasp.h:1195
SHORT output_type
Definition: fasp.h:1129
REAL AMG_tentative_smooth
Definition: fasp.h:1194
SHORT AMG_smoother
Definition: fasp.h:1163
REAL AMG_strong_coupled
Definition: fasp.h:1192
INT AMG_max_aggregation
Definition: fasp.h:1193
SHORT decoup_type
Definition: fasp.h:1138
SHORT ILU_type
Definition: fasp.h:1147
SHORT AMG_amli_degree
Definition: fasp.h:1175
INT restart
Definition: fasp.h:1144
SHORT AMG_smooth_restriction
Definition: fasp.h:1196
INT SWZ_blksolver
Definition: fasp.h:1157
INT SWZ_type
Definition: fasp.h:1156
REAL ILU_droptol
Definition: fasp.h:1149
INT AMG_aggressive_path
Definition: fasp.h:1187
SHORT AMG_nl_amli_krylov_type
Definition: fasp.h:1176
SHORT AMG_postsmooth_iter
Definition: fasp.h:1168
INT AMG_aggressive_level
Definition: fasp.h:1186
REAL AMG_max_row_sum
Definition: fasp.h:1185
SHORT AMG_presmooth_iter
Definition: fasp.h:1167
INT itsolver_maxit
Definition: fasp.h:1143
REAL AMG_tol
Definition: fasp.h:1169
SHORT stop_type
Definition: fasp.h:1140
INT problem_num
Definition: fasp.h:1134
SHORT AMG_aggregation_norm_type
Definition: fasp.h:1197
SHORT AMG_interpolation_type
Definition: fasp.h:1182
SHORT AMG_ILU_levels
Definition: fasp.h:1172
REAL ILU_permtol
Definition: fasp.h:1151
REAL itsolver_tol
Definition: fasp.h:1141
INT AMG_maxit
Definition: fasp.h:1171
SHORT AMG_coarse_scaling
Definition: fasp.h:1174
REAL AMG_relaxation
Definition: fasp.h:1165
SHORT solver_type
Definition: fasp.h:1137
SHORT AMG_aggregation_type
Definition: fasp.h:1181
Vector with n entries of INT type.
Definition: fasp.h:368
INT row
number of rows
Definition: fasp.h:371
INT * val
actual vector entries
Definition: fasp.h:374
Matrix-vector multiplication, replace the actual matrix.
Definition: fasp.h:1109
void * data
data for MxV, can be a Matrix or something else
Definition: fasp.h:1112
Data for preconditioners in dSTRmat format.
Definition: fasp.h:987
ivector * neigh
array to store neighbor information
Definition: fasp.h:1061
ivector * pivot
the pivot for the GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:1049
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:993
SHORT coarsening_type
coarsening type
Definition: fasp.h:1017
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:1023
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:1026
SHORT scaled
whether the matrix are scaled or not
Definition: fasp.h:1032
REAL * w
temporary work space for other usage
Definition: fasp.h:1069
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:1029
dSTRmat * A_str
store the whole reservoir block in STR format
Definition: fasp.h:1038
SHORT AMG_type
type of AMG method
Definition: fasp.h:990
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:1002
ivector * order
order for smoothing
Definition: fasp.h:1058
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:1020
SHORT smoother
AMG smoother type.
Definition: fasp.h:1008
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:1005
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:1014
SHORT max_levels
max number of AMG levels
Definition: fasp.h:999
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:1011
ivector * pivotS
the pivot for the GS/block GS smoother (saturation block)
Definition: fasp.h:1055
dvector * diaginv
the inverse of the diagonals for GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:1046
dvector * diaginvS
the inverse of the diagonals for GS/block GS smoother (saturation block)
Definition: fasp.h:1052
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:996
dSTRmat * SS_str
store Saturation block in STR format
Definition: fasp.h:1041
dCSRmat * A
the original CSR matrix
Definition: fasp.h:1035
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:1066
Data for preconditioners.
Definition: fasp.h:894
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:900
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:930
SHORT coarsening_type
switch of scaling of the coarse grid correction
Definition: fasp.h:933
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:945
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:939
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:954
dCSRmat * A_nk
Matrix data for near kernel.
Definition: fasp.h:965
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:951
REAL * w
temporary work space for other usage
Definition: fasp.h:979
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:957
SHORT AMG_type
type of AMG method
Definition: fasp.h:897
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:909
SHORT coarse_solver
coarse solver type for AMG
Definition: fasp.h:936
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:927
SHORT smoother
AMG smoother type.
Definition: fasp.h:915
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:912
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:942
REAL tentative_smooth
smooth factor for smoothing the tentative prolongation
Definition: fasp.h:948
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:924
dCSRmat * R_nk
Restriction for near kernel.
Definition: fasp.h:971
SHORT max_levels
max number of AMG levels
Definition: fasp.h:906
dCSRmat * P_nk
Prolongation for near kernel.
Definition: fasp.h:968
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:921
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:903
dCSRmat * A
Matrix data.
Definition: fasp.h:960
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:976
SHORT smooth_order
AMG smoother ordering.
Definition: fasp.h:918
Data for diagonal preconditioners in dSTRmat format.
Definition: fasp.h:1079
INT nc
number of components
Definition: fasp.h:1082
dvector diag
diagonal elements
Definition: fasp.h:1085
Preconditioner data and action.
Definition: fasp.h:1095
void * data
data for preconditioner, void pointer
Definition: fasp.h:1098