Fast Auxiliary Space Preconditioning  2.0.6 Jan/10/2018
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 #include "mkl_spblas.h"
29 #endif
30 
31 #ifndef __FASP_HEADER__ /*-- allow multiple inclusions --*/
32 #define __FASP_HEADER__
34 /*---------------------------*/
35 /*--- Macros definition ---*/
36 /*---------------------------*/
37 
41 #define FASP_VERSION 1.9
46 #define DLMALLOC OFF
47 #define NEDMALLOC OFF
54 // When this flag is OFF, do not force C1 criterion for the classical AMG method
55 #define RS_C1 ON
56 // When this flag is ON, the matrix rows will be reordered as diagonal entries first
57 #define DIAGONAL_PREF OFF
62 #define SHORT short
63 #define INT int
64 #define LONG long
65 #define LONGLONG long long
66 #define REAL double
71 #define MAX(a,b) (((a)>(b))?(a):(b))
72 #define MIN(a,b) (((a)<(b))?(a):(b))
73 #define ABS(a) (((a)>=0.0)?(a):-(a))
78 #define GT(a,b) (((a)>(b))?(TRUE):(FALSE))
79 #define GE(a,b) (((a)>=(b))?(TRUE):(FALSE))
80 #define LS(a,b) (((a)<(b))?(TRUE):(FALSE))
81 #define LE(a,b) (((a)<=(b))?(TRUE):(FALSE))
82 #define ISNAN(a) (((a)!=(a))?(TRUE):(FALSE))
87 #define PUT_INT(A) printf("### DEBUG: %s = %d\n", #A, (A))
88 #define PUT_REAL(A) printf("### DEBUG: %s = %e\n", #A, (A))
90 /*---------------------------*/
91 /*--- Global variables ---*/
92 /*---------------------------*/
93 
94 extern unsigned INT total_alloc_mem;
95 extern unsigned INT total_alloc_count;
97 /*---------------------------*/
98 /*--- Matrix and vector ---*/
99 /*---------------------------*/
100 
107 typedef struct ddenmat{
108 
111 
114 
117 
118 } ddenmat;
126 typedef struct idenmat{
127 
130 
133 
135  INT **val;
136 
137 } idenmat;
147 typedef struct dCSRmat{
148 
151 
154 
157 
159  INT *IA;
160 
162  INT *JA;
163 
166 
167 } dCSRmat;
177 typedef struct iCSRmat{
178 
181 
184 
187 
189  INT *IA;
190 
192  INT *JA;
193 
196 
197 } iCSRmat;
208 typedef struct dCOOmat{
209 
212 
215 
218 
221 
224 
227 
228 } dCOOmat;
238 typedef struct iCOOmat{
239 
242 
245 
248 
250  INT *I;
251 
253  INT *J;
254 
257 
258 } iCOOmat;
264 typedef struct dCSRLmat{
265 
268 
271 
274 
277 
280 
283 
286 
288  INT *ja;
289 
292 
293 } dCSRLmat;
303 typedef struct dSTRmat{
304 
307 
310 
313 
316 
319 
322 
325 
328 
331 
334 
335 } dSTRmat;
341 typedef struct dvector{
342 
345 
348 
349 } dvector;
355 typedef struct ivector{
356 
359 
362 
363 } ivector;
365 /*---------------------------*/
366 /*--- Parameter structures --*/
367 /*---------------------------*/
368 
373 typedef struct {
374 
383 } ITS_param;
389 typedef struct {
390 
393 
396 
399 
402 
405 
408 
409 } ILU_param;
415 typedef struct {
416 
419 
422 
425 
428 
431 
432 } SWZ_param;
440 typedef struct {
441 
444 
447 
450 
453 
456 
459 
462 
465 
468 
470  SHORT smooth_order; // 1: nature order 2: C/F order (both are symmetric)
471 
474 
477 
480 
483 
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 
574 } AMG_param;
576 /*---------------------------*/
577 /*--- Work data structures --*/
578 /*---------------------------*/
579 
586 typedef struct {
587 
588 #if WITH_MUMPS
589  DMUMPS_STRUC_C id;
591 #endif
592 
595 
596 } Mumps_data;
604 typedef struct {
605 
607  void *pt[64];
608 
609 #if WITH_PARDISO
610  MKL_INT iparm[64];
612 
614  MKL_INT mtype;
615 
617  MKL_INT maxfct;
618 
620  MKL_INT mnum;
621 
622 #endif
623 
624 } Pardiso_data;
630 typedef struct {
631 
634 
637 
640 
643 
646 
649 
652 
655 
658 
661 
664  // iperm[0:n-1] = old indices of unknowns
665  // iperm[n:2*n-1] = reverse permutation = new indices.
666 
669 
671  INT *ic;
672 
675 
678 
681 
684 
687 
690 
693 
696 
697 } ILU_data;
705 typedef struct {
706 
707  /* matrix information */
708 
710  dCSRmat A; // note: must start from 1!! Change later
711 
712  /* blocks information */
713 
716 
719 
722 
725 
728 
731 
734 
737 
740 
743 
746 
749 
752 
755 
758 
759 #if WITH_UMFPACK
760  void **numeric;
762 #endif
763 
764 #if WITH_MUMPS
765  DMUMPS_STRUC_C *id;
767 #endif
768 
771 
774 
775 } SWZ_data;
783 typedef struct {
784 
785  /* Level information */
786 
789 
792 
793  /* Problem information */
794 
797 
800 
803 
806 
809 
810  /* Extra information */
811 
813  void *Numeric;
814 
817 
820 
823 
826 
829 
832 
833  // Smoother order information
834 
837 
840 
843 
846 
849 
851  INT *ic;
852 
855 
858 
861 
862 } AMG_data;
868 typedef struct {
869 
872 
875 
878 
881 
884 
887 
890 
893 
896 
899 
902 
905 
908 
911 
914 
917 
920 
923 
926 
929 
932 
935 
936  // extra near kernel space
937 
940 
943 
946 
947  // temporary work space
948 
951 
953  REAL *w;
954 
955 } precond_data;
961 typedef struct {
962 
965 
968 
971 
974 
977 
980 
983 
986 
989 
992 
995 
998 
1001 
1004 
1007 
1010 
1013 
1016 
1017  // data for GS/block GS smoothers (STR format)
1018 
1021 
1024 
1027 
1030 
1033 
1036 
1037  // temporary work space
1038 
1041 
1044 
1045 } precond_data_str;
1053 typedef struct {
1054 
1057 
1060 
1061 } precond_diag_str;
1069 typedef struct {
1070 
1072  void *data;
1073 
1075  void (*fct)(REAL *, REAL *, void *);
1076 
1077 } precond;
1083 typedef struct {
1084 
1086  void *data;
1087 
1089  void (*fct)(const void *, const REAL *, REAL *);
1090 
1091 } mxv_matfree;
1099 typedef struct {
1100 
1101  // output flags
1105  // problem parameters
1106  char inifile[256];
1107  char workdir[256];
1110  // parameters for iterative solvers
1118  // parameters for ILU
1125  // parameter for Schwarz
1131  // parameters for AMG
1151  // parameters for classical AMG
1163  // parameters for smoothed aggregation AMG
1170 } input_param;
1172 /*
1173  * OpenMP definitions and declarations
1174  */
1175 #define FASP_GSRB 0
1177 #if FASP_GSRB
1178 extern INT nx_rb ;
1179 extern INT ny_rb ;
1180 extern INT nz_rb ;
1181 extern INT *IMAP;
1182 extern INT MAXIMAP;
1183 #endif
1184 
1185 extern INT count;
1187 #ifdef _OPENMP
1188 
1189 #include "omp.h"
1190 
1191 extern INT THDs_AMG_GS;
1192 extern INT THDs_CPR_lGS;
1193 extern INT THDs_CPR_gGS;
1194 #ifdef DETAILTIME
1195 extern REAL total_linear_time;
1196 extern REAL total_start_time;
1197 extern REAL total_setup_time;
1198 extern INT total_iter;
1199 extern INT fasp_called_times;
1200 #endif
1201 
1202 #endif /* end if for _OPENMP */
1203 
1204 #endif /* end if for __FASP_HEADER__ */
1205 
1206 /*---------------------------------*/
1207 /*-- End of File --*/
1208 /*---------------------------------*/
INT nx
number of grids in x direction
Definition: fasp.h:306
INT max_aggregation
max size of each aggregate
Definition: fasp.h:530
SHORT AMG_smooth_restriction
Definition: fasp.h:1168
INT * iblock
row index of blocks
Definition: fasp.h:718
INT col
column of matrix LU, n
Definition: fasp.h:642
INT * ijlu
integer array of row pointers and column indexes, the size is nzlu
Definition: fasp.h:648
INT SWZ_maxlvl
maximal level for constructing the blocks
Definition: fasp.h:424
Data for Schwarz methods.
Definition: fasp.h:705
INT * rowind
integer array of row indices, the size is nnz
Definition: fasp.h:220
Data for preconditioners in dSTRmat format.
Definition: fasp.h:961
SHORT coarsening_type
switch of scaling of the coarse grid correction
Definition: fasp.h:907
INT dif
number of different values in i-th row, i=0:nrows-1
Definition: fasp.h:276
dCSRmat * blk_data
matrix for each partition
Definition: fasp.h:757
INT THDs_AMG_GS
Definition: AuxThreads.c:115
SHORT AMG_type
type of AMG method
Definition: fasp.h:443
INT colors
number of colors
Definition: fasp.h:857
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:913
Parameters for AMG methods.
Definition: fasp.h:440
REAL strong_coupled
strong coupled threshold for aggregate
Definition: fasp.h:527
SHORT AMG_type
type of AMG method
Definition: fasp.h:964
SHORT postsmooth_iter
number of postsmoothers
Definition: fasp.h:476
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:162
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:895
REAL tentative_smooth
relaxation parameter for smoothing the tentative prolongation
Definition: fasp.h:533
SHORT smoother
smoother type
Definition: fasp.h:467
INT maxit
max number of iterations of AMG
Definition: fasp.h:449
SHORT coarsening_type
coarsening type
Definition: fasp.h:500
INT * ilevL
number of vertices in each color for lower triangle
Definition: fasp.h:686
SHORT smooth_order
smoother order
Definition: fasp.h:470
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:901
INT coarse_dof
max number of coarsest level DOF
Definition: fasp.h:458
#define REAL
Definition: fasp.h:66
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:491
REAL AMG_quality_bound
Definition: fasp.h:1161
INT * ic
indices for different colors
Definition: fasp.h:671
Vector with n entries of INT type.
Definition: fasp.h:355
INT ngrid
number of grids
Definition: fasp.h:321
SHORT presmooth_iter
number of presmoothers
Definition: fasp.h:473
REAL tol
Definition: fasp.h:381
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:874
INT row
row number of matrix A, m
Definition: fasp.h:241
SHORT AMG_postsmooth_iter
Definition: fasp.h:1140
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:985
REAL AMG_max_row_sum
Definition: fasp.h:1157
REAL ** val
actual matrix entries
Definition: fasp.h:116
INT itsolver_maxit
Definition: fasp.h:1115
INT nc
size of each block (number of components)
Definition: fasp.h:318
SHORT num_levels
number of levels in use <= max_levels
Definition: fasp.h:791
SHORT ILU_type
ILU type for decomposition.
Definition: fasp.h:395
INT * icmap
mapping from vertex to color
Definition: fasp.h:674
INT blk_solver
Schwarz block solver.
Definition: fasp.h:742
SHORT smoother
AMG smoother type.
Definition: fasp.h:889
SHORT AMG_smooth_filter
Definition: fasp.h:1167
INT * nz_diff
nz_diff[i]: the i-th different value in &#39;nzrow&#39;
Definition: fasp.h:279
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:482
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:877
INT AMG_coarse_dof
Definition: fasp.h:1141
SHORT AMG_presmooth_iter
Definition: fasp.h:1139
SHORT AMG_aggregation_type
Definition: fasp.h:1153
INT THDs_CPR_gGS
Definition: AuxThreads.c:117
SWZ_data Schwarz
data of Schwarz smoother
Definition: fasp.h:839
INT SWZ_blksolver
Definition: fasp.h:1129
REAL ** offdiag
off-diagonal entries (dimension is nband * [(ngrid-|offsets|) * nc^2])
Definition: fasp.h:333
dvector b
pointer to the right-hand side at level level_num
Definition: fasp.h:805
INT col
number of columns
Definition: fasp.h:132
REAL ILU_relax
add the sum of dropped elements to diagonal element in proportion relax
Definition: fasp.h:404
SHORT solver_type
Definition: fasp.h:1111
INT * uptr
temporary work space
Definition: fasp.h:677
INT * offsets
offsets of the off-diagonals (length is nband)
Definition: fasp.h:330
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:997
INT nc
number of components
Definition: fasp.h:1056
Structure matrix of REAL type.
Definition: fasp.h:303
INT ** val
actual matrix entries
Definition: fasp.h:135
INT * maxa
maxa
Definition: fasp.h:754
REAL quality_bound
quality threshold for pairwise aggregation
Definition: fasp.h:464
SHORT smooth_order
AMG smoother ordering.
Definition: fasp.h:892
INT SWZ_blksolver
type of Schwarz block solver
Definition: fasp.h:430
REAL * val
nonzero entries of A
Definition: fasp.h:165
Input parameters.
Definition: fasp.h:1099
INT AMG_SWZ_levels
Definition: fasp.h:1149
INT nz
number of grids in z direction
Definition: fasp.h:312
ivector * neigh
array to store neighbor information
Definition: fasp.h:1035
Parameters for Schwarz method.
Definition: fasp.h:415
REAL * val
nonzero entries of A
Definition: fasp.h:226
INT * jlevL
mapping from row to color for lower triangle
Definition: fasp.h:692
REAL AMG_relaxation
Definition: fasp.h:1137
struct dCSRLmat dCSRLmat
SWZ_param * swzparam
param for Schwarz
Definition: fasp.h:773
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:931
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:407
REAL * val
actual vector entries
Definition: fasp.h:347
INT col
column of matrix A, n
Definition: fasp.h:214
SHORT precond_type
Definition: fasp.h:1112
INT ILU_lfil
level of fill-in for ILUk
Definition: fasp.h:398
INT nlevL
number of colors for lower triangle
Definition: fasp.h:680
REAL ILU_permtol
Definition: fasp.h:1123
SHORT AMG_smooth_order
Definition: fasp.h:1136
SHORT AMG_smoother
Definition: fasp.h:1135
INT aggressive_path
number of paths use to determine strongly coupled C points
Definition: fasp.h:521
Vector with n entries of REAL type.
Definition: fasp.h:341
INT aggressive_level
number of levels use aggressive coarsening
Definition: fasp.h:518
struct ivector ivector
REAL * au
LU decomposition: the U block.
Definition: fasp.h:733
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:919
dvector * diaginvS
the inverse of the diagonals for GS/block GS smoother (saturation block)
Definition: fasp.h:1026
INT nnz
number of nonzero entries
Definition: fasp.h:217
SHORT ILU_type
Definition: fasp.h:1119
INT * ja
column indices of all the nonzeros
Definition: fasp.h:288
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:1000
dvector * diaginv
the inverse of the diagonals for GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:1020
struct dSTRmat dSTRmat
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:979
SHORT AMG_type
type of AMG method
Definition: fasp.h:871
SHORT smoother
AMG smoother type.
Definition: fasp.h:982
#define INT
Definition: fasp.h:63
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:192
INT row
number of rows
Definition: fasp.h:129
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:950
Data for ILU setup.
Definition: fasp.h:630
REAL strong_threshold
strong connection threshold for coarsening
Definition: fasp.h:509
REAL AMG_strong_threshold
Definition: fasp.h:1155
Preconditioner data and action.
Definition: fasp.h:1069
SHORT print_level
print leve
Definition: fasp.h:418
INT row
row number of matrix A, m
Definition: fasp.h:180
INT maxit
Definition: fasp.h:380
INT nband
number of off-diag bands
Definition: fasp.h:327
INT SWZ_type
type of Schwarz method
Definition: fasp.h:569
REAL AMG_tentative_smooth
Definition: fasp.h:1166
Data for MUMPS interface.
Definition: fasp.h:586
INT row
row number of matrix A, m
Definition: fasp.h:211
Pardiso_data pdata
data for Intel MKL PARDISO
Definition: fasp.h:816
INT nwork
work space size
Definition: fasp.h:657
INT near_kernel_dim
dimension of the near kernel for SAMG
Definition: fasp.h:828
SHORT AMG_nl_amli_krylov_type
Definition: fasp.h:1148
Sparse matrix of REAL type in COO (IJ) format.
Definition: fasp.h:208
REAL ** near_kernel_basis
basis of near kernel space for SAMG
Definition: fasp.h:831
INT SWZ_mmsize
Definition: fasp.h:1126
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:976
INT restart
Definition: fasp.h:1116
Data for Intel MKL PARDISO interface.
Definition: fasp.h:604
INT THDs_CPR_lGS
Definition: AuxThreads.c:116
ivector * pivot
the pivot for the GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:1023
unsigned INT total_alloc_count
Total allocated memory amount.
Definition: AuxMemory.c:44
INT row
number of rows
Definition: fasp.h:267
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:925
ILU_data LU
ILU matrix for ILU smoother.
Definition: fasp.h:825
INT SWZ_mmsize
maximal block size
Definition: fasp.h:563
void * data
data for preconditioner, void pointer
Definition: fasp.h:1072
struct dvector dvector
SHORT aggregation_type
aggregation type
Definition: fasp.h:503
dvector x
pointer to the iterative solution at level level_num
Definition: fasp.h:808
INT * index
row index of the matrix (length-grouped): rows with same nnz are together
Definition: fasp.h:282
INT SWZ_levels
number of levels use Schwarz smoother
Definition: fasp.h:836
INT ILU_lfil
Definition: fasp.h:1120
dCSRmat * A
pointer to the original coefficient matrix
Definition: fasp.h:633
ivector * order
order for smoothing
Definition: fasp.h:1032
SHORT print_level
Definition: fasp.h:375
INT nnz
number of nonzero entries
Definition: fasp.h:156
INT ncolors
number of colors for multi-threading
Definition: fasp.h:668
INT AMG_maxit
Definition: fasp.h:1143
SHORT precond_type
Definition: fasp.h:377
Definition of FASP constants, including messages, solver types, etc.
SHORT AMG_coarse_scaling
Definition: fasp.h:1146
SHORT AMG_interpolation_type
Definition: fasp.h:1154
REAL * luval
nonzero entries of LU
Definition: fasp.h:651
SHORT coarse_solver
coarse solver type
Definition: fasp.h:485
REAL truncation_threshold
truncation threshold
Definition: fasp.h:515
struct dCOOmat dCOOmat
SHORT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:542
INT col
column of matrix A, n
Definition: fasp.h:153
dvector diag
diagonal elements
Definition: fasp.h:1059
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:988
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:898
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:916
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:557
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:189
SHORT max_levels
max number of levels of AMG
Definition: fasp.h:455
REAL ILU_relax
Definition: fasp.h:1122
INT memt
working space size
Definition: fasp.h:745
Matrix-vector multiplication, replace the actual matrix.
Definition: fasp.h:1083
dCSRmat * R_nk
Restriction for near kernel.
Definition: fasp.h:945
REAL * w
temporary work space for other usage
Definition: fasp.h:953
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:494
dCSRmat A
pointer to the original coefficient matrix
Definition: fasp.h:710
dCSRmat * A
the original CSR matrix
Definition: fasp.h:1009
INT * val
nonzero entries of A
Definition: fasp.h:195
INT AMG_aggressive_path
Definition: fasp.h:1159
INT * icmap
mapping from vertex to color
Definition: fasp.h:854
INT SWZ_maxlvl
maximal levels
Definition: fasp.h:566
SHORT AMG_coarse_solver
Definition: fasp.h:1145
INT row
row number of matrix LU, m
Definition: fasp.h:639
INT * iperm
permutation arrays for ILUtp
Definition: fasp.h:663
REAL ILU_relax
relaxation for ILUs
Definition: fasp.h:554
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:497
INT row
number of rows
Definition: fasp.h:110
INT * val
actual vector entries
Definition: fasp.h:361
dSTRmat * SS_str
store Saturation block in STR format
Definition: fasp.h:1015
INT * jblock
column index of blocks
Definition: fasp.h:721
SHORT coarse_solver
coarse solver type for AMG
Definition: fasp.h:910
INT AMG_max_aggregation
Definition: fasp.h:1165
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:479
SHORT itsolver_type
Definition: fasp.h:376
INT * ic
indices for different colors
Definition: fasp.h:851
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:401
INT row
row number of matrix A, m
Definition: fasp.h:150
INT * mask
mask
Definition: fasp.h:748
INT * val
nonzero entries of A
Definition: fasp.h:256
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:994
Sparse matrix of REAL type in CSR format.
Definition: fasp.h:147
Dense matrix of REAL type.
Definition: fasp.h:107
dvector rhsloc1
local right hand side
Definition: fasp.h:727
ivector cfmark
pointer to the CF marker at level level_num
Definition: fasp.h:819
dCSRmat P
prolongation operator at level level_num
Definition: fasp.h:802
INT maxbs
maximal block size
Definition: fasp.h:751
dCSRmat * A_nk
Matrix data for near kernel.
Definition: fasp.h:939
INT * I
integer array of row indices, the size is nnz
Definition: fasp.h:250
struct iCOOmat iCOOmat
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:970
REAL tentative_smooth
smooth factor for smoothing the tentative prolongation
Definition: fasp.h:922
Data for diagonal preconditioners in dSTRmat format.
Definition: fasp.h:1053
INT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:822
SHORT ILU_type
ILU type for smoothing.
Definition: fasp.h:545
INT row
number of rows
Definition: fasp.h:344
ivector * pivotS
the pivot for the GS/block GS smoother (saturation block)
Definition: fasp.h:1029
SHORT cycle_type
type of AMG cycle
Definition: fasp.h:461
SHORT max_levels
max number of AMG levels
Definition: fasp.h:880
REAL * diag
diagonal entries (length is ngrid*(nc^2))
Definition: fasp.h:324
INT AMG_pair_number
Definition: fasp.h:1160
INT col
column of matrix A, n
Definition: fasp.h:244
dCSRmat R
restriction operator at level level_num
Definition: fasp.h:799
SHORT smooth_filter
switch for filtered matrix used for smoothing the tentative prolongation
Definition: fasp.h:536
INT AMG_aggressive_level
Definition: fasp.h:1158
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:904
INT cycle_type
cycle type
Definition: fasp.h:848
INT nnz
number of nonzero entries
Definition: fasp.h:247
REAL max_row_sum
maximal row sum parameter
Definition: fasp.h:512
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:928
Parameters for ILU.
Definition: fasp.h:389
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:62
struct idenmat idenmat
Parameters for iterative solvers.
Definition: fasp.h:373
SHORT interpolation_type
interpolation type
Definition: fasp.h:506
Mumps_data mumps
data for MUMPS
Definition: fasp.h:845
REAL * rhsloc
temp work space ???
Definition: fasp.h:724
INT nxy
number of grids on x-y plane
Definition: fasp.h:315
SHORT stop_type
Definition: fasp.h:1113
Sparse matrix of INT type in COO (IJ) format.
Definition: fasp.h:238
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:883
INT col
number of cols
Definition: fasp.h:270
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:1040
INT pair_number
number of pairwise matchings
Definition: fasp.h:524
REAL * al
LU decomposition: the L block.
Definition: fasp.h:736
REAL itsolver_tol
Definition: fasp.h:1114
REAL AMG_tol
Definition: fasp.h:1142
dCSRmat A
pointer to the matrix at level level_num
Definition: fasp.h:796
INT problem_num
Definition: fasp.h:1108
struct dCSRmat dCSRmat
INT nnz
number of nonzero entries
Definition: fasp.h:273
REAL ILU_droptol
Definition: fasp.h:1121
SHORT print_level
print level for AMG
Definition: fasp.h:446
INT count
INT * colind
integer array of column indices, the size is nnz
Definition: fasp.h:223
unsigned INT total_alloc_mem
Definition: AuxMemory.c:43
INT * J
integer array of column indices, the size is nnz
Definition: fasp.h:253
Data for AMG methods.
Definition: fasp.h:783
INT SWZ_type
Definition: fasp.h:1128
Mumps_data * mumps
param for MUMPS
Definition: fasp.h:770
INT row
number of rows
Definition: fasp.h:358
REAL AMG_strong_coupled
Definition: fasp.h:1164
INT SWZ_mmsize
maximal size of blocks
Definition: fasp.h:427
SHORT max_levels
max number of levels
Definition: fasp.h:788
SHORT AMG_type
Definition: fasp.h:1132
INT col
number of columns
Definition: fasp.h:113
Data for preconditioners.
Definition: fasp.h:868
REAL * w
temporary work space for other usage
Definition: fasp.h:1043
dSTRmat * A_str
store the whole reservoir block in STR format
Definition: fasp.h:1012
void * Numeric
pointer to the numerical factorization from UMFPACK
Definition: fasp.h:813
REAL tol
stopping tolerance for AMG solver
Definition: fasp.h:452
INT SWZ_type
Schwarz method type.
Definition: fasp.h:739
INT nb
block size for BSR type only
Definition: fasp.h:654
SHORT SWZ_type
type for Schwarz method
Definition: fasp.h:421
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:886
INT nblk
number of blocks
Definition: fasp.h:715
Sparse matrix of REAL type in CSRL format.
Definition: fasp.h:264
dvector xloc1
local solution
Definition: fasp.h:730
REAL * work
work space
Definition: fasp.h:660
INT nnz
number of nonzero entries
Definition: fasp.h:186
INT SWZ_blksolver
type of Schwarz block solver
Definition: fasp.h:572
dCSRmat * P_nk
Prolongation for near kernel.
Definition: fasp.h:942
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:967
SHORT AMG_cycle_type
Definition: fasp.h:1134
struct ddenmat ddenmat
SHORT AMG_coarsening_type
Definition: fasp.h:1152
SHORT stop_type
Definition: fasp.h:378
INT col
column of matrix A, n
Definition: fasp.h:183
INT * jlevU
mapping from row to color for upper triangle
Definition: fasp.h:695
struct iCSRmat iCSRmat
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:551
SHORT scaled
whether the matrix are scaled or not
Definition: fasp.h:1006
INT nzlu
number of nonzero entries
Definition: fasp.h:645
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:159
INT job
work for MUMPS
Definition: fasp.h:594
void * data
data for MxV, can be a Matrix or something else
Definition: fasp.h:1086
SHORT print_level
Definition: fasp.h:1102
INT restart
Definition: fasp.h:379
INT ILU_lfil
level of fill-in for ILUs and ILUk
Definition: fasp.h:548
dvector w
temporary work space
Definition: fasp.h:842
REAL * val
values of all the nonzero entries
Definition: fasp.h:291
INT * start
j in {start[i],...,start[i+1]-1} means nz_diff[i] nnz in index[j]-row
Definition: fasp.h:285
SHORT smooth_restriction
smooth the restriction or not
Definition: fasp.h:539
INT SWZ_maxlvl
Definition: fasp.h:1127
SHORT AMG_amli_degree
Definition: fasp.h:1147
Sparse matrix of INT type in CSR format.
Definition: fasp.h:177
REAL AMG_truncation_threshold
Definition: fasp.h:1156
Dense matrix of INT type.
Definition: fasp.h:126
INT ny
number of grids in y direction
Definition: fasp.h:309
INT type
type of ILUdata
Definition: fasp.h:636
SHORT AMG_levels
Definition: fasp.h:1133
SHORT max_levels
max number of AMG levels
Definition: fasp.h:973
SHORT output_type
Definition: fasp.h:1103
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:488
SHORT AMG_ILU_levels
Definition: fasp.h:1144
INT * ilevU
number of vertices in each color for upper triangle
Definition: fasp.h:689
SHORT AMG_polynomial_degree
Definition: fasp.h:1138
INT SWZ_levels
number of levels use Schwarz smoother
Definition: fasp.h:560
dCSRmat * A
Matrix data.
Definition: fasp.h:934
SHORT coarsening_type
coarsening type
Definition: fasp.h:991
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:1003
INT nlevU
number of colors for upper triangle
Definition: fasp.h:683
SHORT print_level
print level
Definition: fasp.h:392
REAL weight
weight for smoother
Definition: fasp.h:860