Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
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#define MULTI_COLOR_ORDER OFF
47#define DLMALLOC OFF
48#define NEDMALLOC OFF
55// When this flag is OFF, do not force C1 criterion for the classical AMG method
56#define RS_C1 ON
57// When this flag is ON, the matrix rows will be reordered as diagonal entries first
58#define DIAGONAL_PREF OFF
63#define SHORT short
64#define INT int
65#define LONG long
66#define LONGLONG long long
67#define REAL double
68#define LONGREAL long double
69#define STRLEN 256
74#define MAX(a,b) (((a)>(b))?(a):(b))
75#define MIN(a,b) (((a)<(b))?(a):(b))
76#define ABS(a) (((a)>=0.0)?(a):-(a))
81#define GT(a,b) (((a)>(b))?(TRUE):(FALSE))
82#define GE(a,b) (((a)>=(b))?(TRUE):(FALSE))
83#define LS(a,b) (((a)<(b))?(TRUE):(FALSE))
84#define LE(a,b) (((a)<=(b))?(TRUE):(FALSE))
85#define ISNAN(a) (((a)!=(a))?(TRUE):(FALSE))
90#define PUT_INT(A) printf("### DEBUG: %s = %d\n", #A, (A))
91#define PUT_REAL(A) printf("### DEBUG: %s = %e\n", #A, (A))
93/*---------------------------*/
94/*--- Matrix and vector ---*/
95/*---------------------------*/
96
103typedef struct ddenmat{
104
107
110
113
122typedef struct idenmat{
123
126
129
132
143typedef struct dCSRmat{
144
147
150
153
156
159
162
163#if MULTI_COLOR_ORDER
165 INT color;
167 INT *IC;
169 INT *ICMAP;
170#endif
171
182typedef struct iCSRmat{
183
186
189
192
195
198
201
213typedef struct dCOOmat{
214
217
220
223
226
229
232
243typedef struct iCOOmat{
244
247
250
253
256
259
262
269typedef struct dCSRLmat{
270
273
276
279
282
285
288
291
294
297
308typedef struct dSTRmat{
309
312
315
318
321
324
327
330
333
336
339
346typedef struct dvector{
347
350
353
361typedef struct ivector{
362
365
368
371/*---------------------------*/
372/*--- Parameter structures --*/
373/*---------------------------*/
374
379typedef struct {
380
390} ITS_param;
396typedef struct {
397
400
403
406
409
412
415
416} ILU_param;
422typedef struct {
423
426
429
432
435
438
439} SWZ_param;
447typedef struct {
448
451
454
457
460
463
466
469
472
475
477 SHORT smooth_order; // 1: nature order 2: C/F order (both are symmetric)
478
481
484
487
490
493
496
499
502
505
508
511
514
517
520
523
526
529
532
535
538
541
544
547
550
553
556
559
562
565
568
571
574
577
580
581} AMG_param;
583/*---------------------------*/
584/*--- Work data structures --*/
585/*---------------------------*/
586
593typedef struct {
594
595#if WITH_MUMPS
597 DMUMPS_STRUC_C id;
598#endif
599
602
603} Mumps_data;
611typedef struct {
612
614 void *pt[64];
615
616#if WITH_PARDISO
618 MKL_INT iparm[64];
619
621 MKL_INT mtype;
622
624 MKL_INT maxfct;
625
627 MKL_INT mnum;
628
629#endif
630
631} Pardiso_data;
637typedef struct {
638
641
644
647
650
653
656
659
662
665
668
671 // iperm[0:n-1] = old indices of unknowns
672 // iperm[n:2*n-1] = reverse permutation = new indices.
673
676
679
682
685
688
691
694
697
700
703
704} ILU_data;
712typedef struct {
713
714 /* matrix information */
715
717 dCSRmat A; // note: must start from 1!! Change later
718
719 /* blocks information */
720
723
726
729
732
735
738
741
744
747
750
753
756
759
762
765
766#if WITH_UMFPACK
768 void **numeric;
769#endif
770
771#if WITH_MUMPS
773 DMUMPS_STRUC_C *id;
774#endif
775
778
781
782} SWZ_data;
790typedef struct {
791
792 /* Level information */
793
796
799
800 /* Problem information */
801
804
807
810
813
816
817 /* Extra information */
818
820 void *Numeric;
821
824
827
830
833
836
839
840 // Smoother order information
841
844
847
850
853
856
859
862
865
868
869#if MULTI_COLOR_ORDER
871 REAL GS_Theta;
872#endif
873
874} AMG_data;
880typedef struct {
881
884
887
890
893
896
899
902
905
908
911
914
917
920
923
926
929
932
935
938
941
944
947
948 // extra near kernel space
949
952
955
958
959 // temporary work space
960
963
966
967} precond_data;
973typedef struct {
974
977
980
983
986
989
992
995
998
1001
1004
1007
1010
1013
1016
1019
1022
1025
1028
1029 // data for GS/block GS smoothers (STR format)
1030
1033
1036
1039
1042
1045
1048
1049 // temporary work space
1050
1053
1056
1065typedef struct {
1066
1069
1072
1081typedef struct {
1082
1084 void *data;
1085
1087 void (*fct)(REAL *, REAL *, void *);
1088
1089} precond;
1095typedef struct {
1096
1098 void *data;
1099
1101 void (*fct)(const void *, const REAL *, REAL *);
1102
1103} mxv_matfree;
1111typedef struct {
1112
1113 // output flags
1117 // problem parameters
1118 char inifile[STRLEN];
1119 char workdir[STRLEN];
1122 // parameters for iterative solvers
1131 // parameters for ILU
1138 // parameter for Schwarz
1144 // parameters for AMG
1164 // parameters for classical AMG
1176 // parameters for smoothed aggregation AMG
1183} input_param;
1185/*
1186 * OpenMP definitions and declarations
1187 */
1188#ifdef _OPENMP
1189
1190#include "omp.h"
1191
1192#define ILU_MC_OMP OFF
1194//extern INT omp_count; /**< Counter for multiple calls: Remove later!!! --Chensong */
1195
1196extern INT THDs_AMG_GS;
1197extern INT THDs_CPR_lGS;
1198extern INT THDs_CPR_gGS;
1199#ifdef DETAILTIME
1200extern REAL total_linear_time;
1201extern REAL total_start_time;
1202extern REAL total_setup_time;
1203extern INT total_iter;
1204extern INT fasp_called_times;
1205#endif
1206
1207#endif /* end if for _OPENMP */
1208
1209#endif /* end if for __FASP_HEADER__ */
1210
1211/*---------------------------------*/
1212/*-- End of File --*/
1213/*---------------------------------*/
INT THDs_CPR_gGS
Definition: AuxThreads.c:118
INT THDs_CPR_lGS
Definition: AuxThreads.c:117
INT THDs_AMG_GS
Definition: AuxThreads.c:116
struct dCOOmat dCOOmat
struct dCSRLmat dCSRLmat
struct iCSRmat iCSRmat
#define STRLEN
Definition: fasp.h:69
#define REAL
Definition: fasp.h:67
struct ivector ivector
struct dSTRmat dSTRmat
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:63
struct dvector dvector
struct iCOOmat iCOOmat
struct idenmat idenmat
struct dCSRmat dCSRmat
struct ddenmat ddenmat
#define INT
Definition: fasp.h:64
Definition of FASP constants, including messages, solver types, etc.
Data for AMG methods.
Definition: fasp.h:790
INT near_kernel_dim
dimension of the near kernel for SAMG
Definition: fasp.h:835
dCSRmat A
pointer to the matrix at level level_num
Definition: fasp.h:803
INT cycle_type
cycle type
Definition: fasp.h:855
Pardiso_data pdata
data for Intel MKL PARDISO
Definition: fasp.h:823
Mumps_data mumps
data for MUMPS
Definition: fasp.h:852
dCSRmat R
restriction operator at level level_num
Definition: fasp.h:806
dCSRmat P
prolongation operator at level level_num
Definition: fasp.h:809
INT colors
number of colors
Definition: fasp.h:864
SWZ_data Schwarz
data of Schwarz smoother
Definition: fasp.h:846
dvector b
pointer to the right-hand side at level level_num
Definition: fasp.h:812
REAL ** near_kernel_basis
basis of near kernel space for SAMG
Definition: fasp.h:838
void * Numeric
pointer to the numerical factorization from UMFPACK
Definition: fasp.h:820
INT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:829
INT * ic
indices for different colors
Definition: fasp.h:858
INT SWZ_levels
number of levels use Schwarz smoother
Definition: fasp.h:843
dvector x
pointer to the iterative solution at level level_num
Definition: fasp.h:815
INT * icmap
mapping from vertex to color
Definition: fasp.h:861
SHORT max_levels
max number of levels
Definition: fasp.h:795
SHORT num_levels
number of levels in use <= max_levels
Definition: fasp.h:798
dvector w
temporary work space
Definition: fasp.h:849
ivector cfmark
pointer to the CF marker at level level_num
Definition: fasp.h:826
REAL weight
weight for smoother
Definition: fasp.h:867
ILU_data LU
ILU matrix for ILU smoother.
Definition: fasp.h:832
Parameters for AMG methods.
Definition: fasp.h:447
INT ILU_lfil
level of fill-in for ILUs and ILUk
Definition: fasp.h:555
INT aggressive_level
number of levels use aggressive coarsening
Definition: fasp.h:525
REAL ILU_relax
relaxation for ILUs
Definition: fasp.h:561
REAL strong_threshold
strong connection threshold for coarsening
Definition: fasp.h:516
INT SWZ_mmsize
maximal block size
Definition: fasp.h:570
INT aggressive_path
number of paths use to determine strongly coupled C points
Definition: fasp.h:528
SHORT interpolation_type
interpolation type
Definition: fasp.h:513
SHORT print_level
print level for AMG
Definition: fasp.h:453
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:489
INT SWZ_maxlvl
maximal levels
Definition: fasp.h:573
SHORT aggregation_type
aggregation type
Definition: fasp.h:510
SHORT coarsening_type
coarsening type
Definition: fasp.h:507
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:504
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:495
SHORT smooth_filter
switch for filtered matrix used for smoothing the tentative prolongation
Definition: fasp.h:543
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:501
SHORT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:549
SHORT AMG_type
type of AMG method
Definition: fasp.h:450
REAL tol
stopping tolerance for AMG solver
Definition: fasp.h:459
SHORT coarse_solver
coarse solver type
Definition: fasp.h:492
REAL strong_coupled
strong coupled threshold for aggregate
Definition: fasp.h:534
REAL relaxation
relaxation parameter for Jacobi and SOR smoother
Definition: fasp.h:486
SHORT smoother
smoother type
Definition: fasp.h:474
SHORT cycle_type
type of AMG cycle
Definition: fasp.h:468
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:498
SHORT ILU_type
ILU type for smoothing.
Definition: fasp.h:552
INT SWZ_blksolver
type of Schwarz block solver
Definition: fasp.h:579
INT SWZ_type
type of Schwarz method
Definition: fasp.h:576
REAL quality_bound
quality threshold for pairwise aggregation
Definition: fasp.h:471
INT coarse_dof
max number of coarsest level DOF
Definition: fasp.h:465
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:558
REAL tentative_smooth
relaxation parameter for smoothing the tentative prolongation
Definition: fasp.h:540
SHORT postsmooth_iter
number of postsmoothers
Definition: fasp.h:483
INT SWZ_levels
number of levels use Schwarz smoother
Definition: fasp.h:567
INT pair_number
number of pairwise matchings
Definition: fasp.h:531
SHORT max_levels
max number of levels of AMG
Definition: fasp.h:462
SHORT presmooth_iter
number of presmoothers
Definition: fasp.h:480
REAL truncation_threshold
truncation threshold
Definition: fasp.h:522
INT max_aggregation
max size of each aggregate
Definition: fasp.h:537
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:564
REAL max_row_sum
maximal row sum parameter
Definition: fasp.h:519
INT maxit
max number of iterations of AMG
Definition: fasp.h:456
SHORT smooth_restriction
smooth the restriction for SA methods or not
Definition: fasp.h:546
SHORT smooth_order
smoother order
Definition: fasp.h:477
Data for ILU setup.
Definition: fasp.h:637
INT * ijlu
integer array of row pointers and column indexes, the size is nzlu
Definition: fasp.h:655
REAL * luval
nonzero entries of LU
Definition: fasp.h:658
INT col
column of matrix LU, n
Definition: fasp.h:649
INT * jlevU
mapping from row to color for upper triangle
Definition: fasp.h:702
INT nlevU
number of colors for upper triangle
Definition: fasp.h:690
INT nwork
work space size
Definition: fasp.h:664
INT ncolors
number of colors for multi-threading
Definition: fasp.h:675
INT nb
block size for BSR type only
Definition: fasp.h:661
INT row
row number of matrix LU, m
Definition: fasp.h:646
INT nlevL
number of colors for lower triangle
Definition: fasp.h:687
INT type
type of ILUdata
Definition: fasp.h:643
INT * ic
indices for different colors
Definition: fasp.h:678
INT * icmap
mapping from vertex to color
Definition: fasp.h:681
INT * iperm
permutation arrays for ILUtp
Definition: fasp.h:670
INT nzlu
number of nonzero entries
Definition: fasp.h:652
INT * jlevL
mapping from row to color for lower triangle
Definition: fasp.h:699
REAL * work
work space
Definition: fasp.h:667
INT * uptr
temporary work space
Definition: fasp.h:684
INT * ilevL
number of vertices in each color for lower triangle
Definition: fasp.h:693
dCSRmat * A
pointer to the original coefficient matrix
Definition: fasp.h:640
INT * ilevU
number of vertices in each color for upper triangle
Definition: fasp.h:696
Parameters for ILU.
Definition: fasp.h:396
INT ILU_lfil
level of fill-in for ILUk
Definition: fasp.h:405
REAL ILU_relax
add the sum of dropped elements to diagonal element in proportion relax
Definition: fasp.h:411
SHORT print_level
print level
Definition: fasp.h:399
SHORT ILU_type
ILU type for decomposition.
Definition: fasp.h:402
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:408
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:414
Parameters for iterative solvers.
Definition: fasp.h:379
SHORT itsolver_type
Definition: fasp.h:382
SHORT print_level
Definition: fasp.h:381
SHORT precond_type
Definition: fasp.h:384
REAL tol
Definition: fasp.h:388
SHORT decoup_type
Definition: fasp.h:383
INT restart
Definition: fasp.h:386
SHORT stop_type
Definition: fasp.h:385
INT maxit
Definition: fasp.h:387
Data for MUMPS interface.
Definition: fasp.h:593
INT job
work for MUMPS
Definition: fasp.h:601
Data for Intel MKL PARDISO interface.
Definition: fasp.h:611
Data for Schwarz methods.
Definition: fasp.h:712
INT memt
working space size
Definition: fasp.h:752
INT * mask
mask
Definition: fasp.h:755
INT maxbs
maximal block size
Definition: fasp.h:758
REAL * al
LU decomposition: the L block.
Definition: fasp.h:743
dCSRmat A
pointer to the original coefficient matrix
Definition: fasp.h:717
dvector rhsloc1
local right hand side
Definition: fasp.h:734
dvector xloc1
local solution
Definition: fasp.h:737
SWZ_param * swzparam
param for Schwarz
Definition: fasp.h:780
INT nblk
number of blocks
Definition: fasp.h:722
REAL * au
LU decomposition: the U block.
Definition: fasp.h:740
dCSRmat * blk_data
matrix for each partition
Definition: fasp.h:764
INT SWZ_type
Schwarz method type.
Definition: fasp.h:746
INT blk_solver
Schwarz block solver.
Definition: fasp.h:749
INT * jblock
column index of blocks
Definition: fasp.h:728
Mumps_data * mumps
param for MUMPS
Definition: fasp.h:777
REAL * rhsloc
temp work space ???
Definition: fasp.h:731
INT * maxa
maxa
Definition: fasp.h:761
INT * iblock
row index of blocks
Definition: fasp.h:725
Parameters for Schwarz method.
Definition: fasp.h:422
INT SWZ_mmsize
maximal size of blocks
Definition: fasp.h:434
SHORT print_level
print leve
Definition: fasp.h:425
INT SWZ_maxlvl
maximal level for constructing the blocks
Definition: fasp.h:431
INT SWZ_blksolver
type of Schwarz block solver
Definition: fasp.h:437
SHORT SWZ_type
type for Schwarz method
Definition: fasp.h:428
Sparse matrix of REAL type in COO (IJ) format.
Definition: fasp.h:213
INT * colind
integer array of column indices, the size is nnz
Definition: fasp.h:228
INT col
column of matrix A, n
Definition: fasp.h:219
INT * rowind
integer array of row indices, the size is nnz
Definition: fasp.h:225
REAL * val
nonzero entries of A
Definition: fasp.h:231
INT row
row number of matrix A, m
Definition: fasp.h:216
INT nnz
number of nonzero entries
Definition: fasp.h:222
Sparse matrix of REAL type in CSRL format.
Definition: fasp.h:269
INT col
number of cols
Definition: fasp.h:275
REAL * val
values of all the nonzero entries
Definition: fasp.h:296
INT row
number of rows
Definition: fasp.h:272
INT * start
j in {start[i],...,start[i+1]-1} means nz_diff[i] nnz in index[j]-row
Definition: fasp.h:290
INT nnz
number of nonzero entries
Definition: fasp.h:278
INT * index
row index of the matrix (length-grouped): rows with same nnz are together
Definition: fasp.h:287
INT * nz_diff
nz_diff[i]: the i-th different value in 'nzrow'
Definition: fasp.h:284
INT dif
number of different values in i-th row, i=0:nrows-1
Definition: fasp.h:281
INT * ja
column indices of all the nonzeros
Definition: fasp.h:293
Sparse matrix of REAL type in CSR format.
Definition: fasp.h:143
INT col
column of matrix A, n
Definition: fasp.h:149
REAL * val
nonzero entries of A
Definition: fasp.h:161
INT row
row number of matrix A, m
Definition: fasp.h:146
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:155
INT nnz
number of nonzero entries
Definition: fasp.h:152
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:158
Structure matrix of REAL type.
Definition: fasp.h:308
INT * offsets
offsets of the off-diagonals (length is nband)
Definition: fasp.h:335
INT nx
number of grids in x direction
Definition: fasp.h:311
INT nxy
number of grids on x-y plane
Definition: fasp.h:320
INT ny
number of grids in y direction
Definition: fasp.h:314
INT nband
number of off-diag bands
Definition: fasp.h:332
REAL * diag
diagonal entries (length is ngrid*(nc^2))
Definition: fasp.h:329
INT ngrid
number of grids
Definition: fasp.h:326
INT nc
size of each block (number of components)
Definition: fasp.h:323
INT nz
number of grids in z direction
Definition: fasp.h:317
REAL ** offdiag
off-diagonal entries (dimension is nband * [(ngrid-|offsets|) * nc^2])
Definition: fasp.h:338
Dense matrix of REAL type.
Definition: fasp.h:103
INT col
number of columns
Definition: fasp.h:109
INT row
number of rows
Definition: fasp.h:106
REAL ** val
actual matrix entries
Definition: fasp.h:112
Vector with n entries of REAL type.
Definition: fasp.h:346
REAL * val
actual vector entries
Definition: fasp.h:352
INT row
number of rows
Definition: fasp.h:349
Sparse matrix of INT type in COO (IJ) format.
Definition: fasp.h:243
INT * I
integer array of row indices, the size is nnz
Definition: fasp.h:255
INT * J
integer array of column indices, the size is nnz
Definition: fasp.h:258
INT col
column of matrix A, n
Definition: fasp.h:249
INT row
row number of matrix A, m
Definition: fasp.h:246
INT nnz
number of nonzero entries
Definition: fasp.h:252
INT * val
nonzero entries of A
Definition: fasp.h:261
Sparse matrix of INT type in CSR format.
Definition: fasp.h:182
INT col
column of matrix A, n
Definition: fasp.h:188
INT row
row number of matrix A, m
Definition: fasp.h:185
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:194
INT nnz
number of nonzero entries
Definition: fasp.h:191
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:197
INT * val
nonzero entries of A
Definition: fasp.h:200
Dense matrix of INT type.
Definition: fasp.h:122
INT col
number of columns
Definition: fasp.h:128
INT row
number of rows
Definition: fasp.h:125
INT ** val
actual matrix entries
Definition: fasp.h:131
Input parameters.
Definition: fasp.h:1111
INT AMG_coarse_dof
Definition: fasp.h:1155
INT ILU_lfil
Definition: fasp.h:1133
REAL ILU_relax
Definition: fasp.h:1135
INT SWZ_mmsize
Definition: fasp.h:1139
SHORT AMG_smooth_order
Definition: fasp.h:1149
SHORT print_level
Definition: fasp.h:1114
REAL AMG_quality_bound
Definition: fasp.h:1174
INT SWZ_maxlvl
Definition: fasp.h:1140
INT AMG_SWZ_levels
Definition: fasp.h:1162
SHORT AMG_levels
Definition: fasp.h:1146
SHORT AMG_coarsening_type
Definition: fasp.h:1165
SHORT AMG_cycle_type
Definition: fasp.h:1147
INT AMG_pair_number
Definition: fasp.h:1173
REAL AMG_strong_threshold
Definition: fasp.h:1168
REAL AMG_truncation_threshold
Definition: fasp.h:1169
SHORT AMG_polynomial_degree
Definition: fasp.h:1151
SHORT AMG_coarse_solver
Definition: fasp.h:1158
SHORT precond_type
Definition: fasp.h:1125
SHORT AMG_type
Definition: fasp.h:1145
SHORT AMG_smooth_filter
Definition: fasp.h:1180
SHORT output_type
Definition: fasp.h:1115
REAL AMG_tentative_smooth
Definition: fasp.h:1179
SHORT AMG_smoother
Definition: fasp.h:1148
REAL AMG_strong_coupled
Definition: fasp.h:1177
INT AMG_max_aggregation
Definition: fasp.h:1178
SHORT decoup_type
Definition: fasp.h:1124
SHORT ILU_type
Definition: fasp.h:1132
SHORT AMG_amli_degree
Definition: fasp.h:1160
INT restart
Definition: fasp.h:1129
SHORT AMG_smooth_restriction
Definition: fasp.h:1181
INT SWZ_blksolver
Definition: fasp.h:1142
INT SWZ_type
Definition: fasp.h:1141
REAL ILU_droptol
Definition: fasp.h:1134
INT AMG_aggressive_path
Definition: fasp.h:1172
SHORT AMG_nl_amli_krylov_type
Definition: fasp.h:1161
SHORT AMG_postsmooth_iter
Definition: fasp.h:1153
INT AMG_aggressive_level
Definition: fasp.h:1171
REAL AMG_max_row_sum
Definition: fasp.h:1170
SHORT AMG_presmooth_iter
Definition: fasp.h:1152
INT itsolver_maxit
Definition: fasp.h:1128
REAL AMG_tol
Definition: fasp.h:1154
SHORT stop_type
Definition: fasp.h:1126
INT problem_num
Definition: fasp.h:1120
SHORT AMG_interpolation_type
Definition: fasp.h:1167
SHORT AMG_ILU_levels
Definition: fasp.h:1157
REAL ILU_permtol
Definition: fasp.h:1136
REAL itsolver_tol
Definition: fasp.h:1127
INT AMG_maxit
Definition: fasp.h:1156
SHORT AMG_coarse_scaling
Definition: fasp.h:1159
REAL AMG_relaxation
Definition: fasp.h:1150
SHORT solver_type
Definition: fasp.h:1123
SHORT AMG_aggregation_type
Definition: fasp.h:1166
Vector with n entries of INT type.
Definition: fasp.h:361
INT row
number of rows
Definition: fasp.h:364
INT * val
actual vector entries
Definition: fasp.h:367
Matrix-vector multiplication, replace the actual matrix.
Definition: fasp.h:1095
void * data
data for MxV, can be a Matrix or something else
Definition: fasp.h:1098
Data for preconditioners in dSTRmat format.
Definition: fasp.h:973
ivector * neigh
array to store neighbor information
Definition: fasp.h:1047
ivector * pivot
the pivot for the GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:1035
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:979
SHORT coarsening_type
coarsening type
Definition: fasp.h:1003
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:1009
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:1012
SHORT scaled
whether the matrix are scaled or not
Definition: fasp.h:1018
REAL * w
temporary work space for other usage
Definition: fasp.h:1055
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:1015
dSTRmat * A_str
store the whole reservoir block in STR format
Definition: fasp.h:1024
SHORT AMG_type
type of AMG method
Definition: fasp.h:976
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:988
ivector * order
order for smoothing
Definition: fasp.h:1044
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:1006
SHORT smoother
AMG smoother type.
Definition: fasp.h:994
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:991
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:1000
SHORT max_levels
max number of AMG levels
Definition: fasp.h:985
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:997
ivector * pivotS
the pivot for the GS/block GS smoother (saturation block)
Definition: fasp.h:1041
dvector * diaginv
the inverse of the diagonals for GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:1032
dvector * diaginvS
the inverse of the diagonals for GS/block GS smoother (saturation block)
Definition: fasp.h:1038
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:982
dSTRmat * SS_str
store Saturation block in STR format
Definition: fasp.h:1027
dCSRmat * A
the original CSR matrix
Definition: fasp.h:1021
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:1052
Data for preconditioners.
Definition: fasp.h:880
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:886
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:916
SHORT coarsening_type
switch of scaling of the coarse grid correction
Definition: fasp.h:919
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:931
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:925
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:940
dCSRmat * A_nk
Matrix data for near kernel.
Definition: fasp.h:951
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:937
REAL * w
temporary work space for other usage
Definition: fasp.h:965
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:943
SHORT AMG_type
type of AMG method
Definition: fasp.h:883
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:895
SHORT coarse_solver
coarse solver type for AMG
Definition: fasp.h:922
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:913
SHORT smoother
AMG smoother type.
Definition: fasp.h:901
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:898
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:928
REAL tentative_smooth
smooth factor for smoothing the tentative prolongation
Definition: fasp.h:934
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:910
dCSRmat * R_nk
Restriction for near kernel.
Definition: fasp.h:957
SHORT max_levels
max number of AMG levels
Definition: fasp.h:892
dCSRmat * P_nk
Prolongation for near kernel.
Definition: fasp.h:954
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:907
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:889
dCSRmat * A
Matrix data.
Definition: fasp.h:946
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:962
SHORT smooth_order
AMG smoother ordering.
Definition: fasp.h:904
Data for diagonal preconditioners in dSTRmat format.
Definition: fasp.h:1065
INT nc
number of components
Definition: fasp.h:1068
dvector diag
diagonal elements
Definition: fasp.h:1071
Preconditioner data and action.
Definition: fasp.h:1081
void * data
data for preconditioner, void pointer
Definition: fasp.h:1084