Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
fasp.h
Go to the documentation of this file.
1 
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 
23 #include "fasp_const.h"
24 
25 #if WITH_MUMPS
26 #include "dmumps_c.h"
27 #endif
28 
29 #if WITH_PARDISO
30 #include "mkl_pardiso.h"
31 #include "mkl_types.h"
32 #include "mkl_spblas.h"
33 #endif
34 
35 #ifndef __FASP_HEADER__ /*-- allow multiple inclusions --*/
36 #define __FASP_HEADER__
38 /*---------------------------*/
39 /*--- Macros definition ---*/
40 /*---------------------------*/
41 
45 #define FASP_VERSION 1.8
46 #define FASP_USE_ILU ON
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
72 #define MAX(a,b) (((a)>(b))?(a):(b))
73 #define MIN(a,b) (((a)<(b))?(a):(b))
74 #define ABS(a) (((a)>=0.0)?(a):-(a))
79 #define GT(a,b) (((a)>(b))?(TRUE):(FALSE))
80 #define GE(a,b) (((a)>=(b))?(TRUE):(FALSE))
81 #define LS(a,b) (((a)<(b))?(TRUE):(FALSE))
82 #define LE(a,b) (((a)<=(b))?(TRUE):(FALSE))
83 #define ISNAN(a) (((a)!=(a))?(TRUE):(FALSE))
88 #define PUT_INT(A) printf("### DEBUG: %s = %d\n", #A, (A))
89 #define PUT_REAL(A) printf("### DEBUG: %s = %e\n", #A, (A))
91 /*---------------------------*/
92 /*--- Global variables ---*/
93 /*---------------------------*/
94 
95 extern unsigned INT total_alloc_mem;
96 extern unsigned INT total_alloc_count;
98 /*---------------------------*/
99 /*--- Matrix and vector ---*/
100 /*---------------------------*/
101 
108 typedef struct ddenmat{
109 
112 
115 
118 
119 } ddenmat;
127 typedef struct idenmat{
128 
131 
134 
136  INT **val;
137 
138 } idenmat;
148 typedef struct dCSRmat{
149 
152 
155 
158 
160  INT *IA;
161 
163  INT *JA;
164 
167 
168 } dCSRmat;
178 typedef struct iCSRmat{
179 
182 
185 
188 
190  INT *IA;
191 
193  INT *JA;
194 
197 
198 } iCSRmat;
209 typedef struct dCOOmat{
210 
213 
216 
219 
222 
225 
228 
229 } dCOOmat;
239 typedef struct iCOOmat{
240 
243 
246 
249 
251  INT *I;
252 
254  INT *J;
255 
258 
259 } iCOOmat;
265 typedef struct dCSRLmat{
266 
269 
272 
275 
278 
281 
284 
287 
289  INT *ja;
290 
293 
294 } dCSRLmat;
304 typedef struct dSTRmat{
305 
308 
311 
314 
317 
320 
323 
326 
329 
332 
335 
336 } dSTRmat;
342 typedef struct dvector{
343 
346 
349 
350 } dvector;
356 typedef struct ivector{
357 
360 
363 
364 } ivector;
366 /*---------------------------*/
367 /*--- Parameter structures --*/
368 /*---------------------------*/
369 
374 typedef struct {
375 
378 
381 
384 
387 
390 
393 
394 } ILU_param;
400 typedef struct {
401 
404 
407 
410 
413 
416 
419 
422 
425 
426 } ILU_data;
434 typedef struct {
435 
438 
441 
444 
447 
450 
451 } Schwarz_param;
459 typedef struct {
460 
461 #if WITH_MUMPS
462  DMUMPS_STRUC_C id;
464 #endif
465 
468 
469 } Mumps_data;
477 typedef struct {
478 
479  // Internal solver memory pointer
480  void *pt[64];
481 
482 #if WITH_PARDISO
483  // Pardiso control parameters
484  MKL_INT iparm[64];
485 
486  // Type of the matrix
487  MKL_INT mtype;
488 
489  // Maximum number of numerical factorizations
490  MKL_INT maxfct;
491 
492  // Indicate the actual matrix for the solution phase, 1 <= mnum <= maxfct
493  MKL_INT mnum;
494 
495 #endif
496 
497 } Pardiso_data;
505 typedef struct {
506 
507  /* matrix information */
508 
510  dCSRmat A; // note: has to be start from 1!! Change later
511 
512  /* blocks information */
513 
516 
519 
522 
525 
528 
531 
534 
537 
540 
543 
546 
549 
552 
555 
558 
559 #if WITH_UMFPACK
560  void **numeric;
562 #endif
563 
564 #if WITH_MUMPS
565  DMUMPS_STRUC_C *id;
567 #endif
568 
571 
574 
575 } Schwarz_data;
576 
583 typedef struct {
584 
587 
590 
593 
596 
599 
602 
605 
608 
611 
613  SHORT smooth_order; // 1: nature order 2: C/F order (both are symmetric)
614 
617 
620 
623 
626 
629 
632 
635 
638 
641 
644 
647 
650 
653 
656 
659 
662 
665 
668 
671 
674 
677 
680 
683 
686 
689 
692 
695 
698 
701 
704 
707 
710 
713 
714 } AMG_param;
722 typedef struct {
723 
724  /* Level information */
725 
728 
731 
732  /* Problem information */
733 
736 
739 
742 
745 
748 
749  /* Extra information */
750 
752  void *Numeric;
753 
756 
759 
762 
765 
768 
771 
772  // Smoother order information
773 
776 
779 
782 
785 
788 
789 } AMG_data;
795 typedef struct {
796 
799 
802 
805 
808 
811 
814 
817 
820 
823 
826 
829 
832 
835 
838 
841 
844 
847 
850 
853 
856 
859 
862 
863  // extra near kernel space
864 
867 
870 
873 
874  // temporary work space
875 
878 
880  REAL *w;
881 
883  // INT flag;
884 
885 } precond_data;
891 typedef struct {
892 
895 
898 
901 
904 
907 
910 
913 
916 
919 
922 
925 
928 
931 
934 
937 
940 
943 
946 
947  // data for GS/block GS smoothers (STR format)
948 
951 
954 
957 
960 
963 
966 
967  // temporary work space
968 
971 
973  REAL *w;
974 
983 typedef struct {
984 
987 
990 
991 } precond_diagstr;
999 typedef struct {
1000 
1002  void *data;
1003 
1005  void (*fct)(REAL *, REAL *, void *);
1006 
1007 } precond;
1013 typedef struct {
1014 
1016  void *data;
1017 
1019  void (*fct)(void *, REAL *, REAL *);
1020 
1021 } mxv_matfree;
1029 typedef struct {
1030 
1031  // output flags
1035  // problem parameters
1036  char inifile[256];
1037  char workdir[256];
1040  // parameters for iterative solvers
1048  // parameters for ILU
1055  // parameter for Schwarz
1061  // parameters for AMG
1081  // parameters for classical AMG
1093  // parameters for smoothed aggregation AMG
1099 } input_param;
1105 typedef struct {
1106 
1115 } itsolver_param;
1127 typedef struct grid2d {
1128 
1129  REAL (*p)[2];
1130  INT (*e)[2];
1131  INT (*t)[3];
1132  INT (*s)[3];
1144 } grid2d;
1146 typedef grid2d *pgrid2d;
1148 typedef const grid2d *pcgrid2d;
1154 typedef struct
1155 {
1156 
1159 
1162 
1163 } Link;
1171 typedef struct linked_list
1172 {
1173 
1176 
1179 
1182 
1185 
1188 
1189 } ListElement;
1196 /*
1197  * OpenMP definitions and declarations
1198  */
1199 #define FASP_GSRB 1
1201 #if FASP_GSRB
1202 extern INT nx_rb ;
1203 extern INT ny_rb ;
1204 extern INT nz_rb ;
1205 extern INT *IMAP;
1206 extern INT MAXIMAP;
1207 #endif
1208 
1209 extern INT count;
1211 #ifdef _OPENMP
1212 
1213 #include "omp.h"
1214 
1215 extern INT THDs_AMG_GS;
1216 extern INT THDs_CPR_lGS;
1217 extern INT THDs_CPR_gGS;
1218 #ifdef DETAILTIME
1219 extern REAL total_linear_time;
1220 extern REAL total_start_time;
1221 extern REAL total_setup_time;
1222 extern INT total_iter;
1223 extern INT fasp_called_times;
1224 #endif
1225 
1226 #endif /* end if for _OPENMP */
1227 
1228 #endif /* end if for __FASP_HEADER__ */
1229 
1230 /*---------------------------------*/
1231 /*-- End of File --*/
1232 /*---------------------------------*/
INT nx
number of grids in x direction
Definition: fasp.h:307
INT max_aggregation
max size of each aggregate
Definition: fasp.h:673
INT * IMAP
INT col
column of matrix LU, n
Definition: fasp.h:406
INT * ijlu
integer array of row pointers and column indexes, the size is nzlu
Definition: fasp.h:412
INT * rowind
integer array of row indices, the size is nnz
Definition: fasp.h:221
Data passed to the preconditioner for dSTRmat matrices.
Definition: fasp.h:891
SHORT coarsening_type
switch of scaling of the coarse grid correction
Definition: fasp.h:834
INT dif
number of different values in i-th row, i=0:nrows-1
Definition: fasp.h:277
SHORT AMG_type
type of AMG method
Definition: fasp.h:586
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:840
Parameters for AMG solver.
Definition: fasp.h:583
REAL strong_coupled
strong coupled threshold for aggregate
Definition: fasp.h:670
SHORT AMG_type
type of AMG method
Definition: fasp.h:894
SHORT postsmooth_iter
number of postsmoothers
Definition: fasp.h:619
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:163
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:822
REAL tentative_smooth
relaxation parameter for smoothing the tentative prolongation
Definition: fasp.h:676
SHORT smoother
smoother type
Definition: fasp.h:610
INT maxit
max number of iterations of AMG
Definition: fasp.h:592
SHORT coarsening_type
coarsening type
Definition: fasp.h:643
SHORT smooth_order
smoother order
Definition: fasp.h:613
struct linked_list * prev_node
previous node
Definition: fasp.h:1187
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:828
Schwarz_data Schwarz
data of Schwarz smoother
Definition: fasp.h:778
INT coarse_dof
max number of coarsest level DOF
Definition: fasp.h:601
#define REAL
Definition: fasp.h:67
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:634
REAL AMG_quality_bound
Definition: fasp.h:1091
Vector with n entries of INT type.
Definition: fasp.h:356
INT ngrid
number of grids
Definition: fasp.h:322
INT head
starting of the list
Definition: fasp.h:1178
INT * pdiri
Definition: fasp.h:1133
SHORT presmooth_iter
number of presmoothers
Definition: fasp.h:616
INT maxbs
maximal block size
Definition: fasp.h:551
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:801
INT row
row number of matrix A, m
Definition: fasp.h:242
SHORT AMG_postsmooth_iter
Definition: fasp.h:1070
SHORT presmooth_iter
number of presmoothing
Definition: fasp.h:915
INT * iblock
row index of blocks
Definition: fasp.h:518
REAL AMG_max_row_sum
Definition: fasp.h:1087
REAL ** val
actual matrix entries
Definition: fasp.h:117
INT itsolver_maxit
Definition: fasp.h:1045
INT nc
size of each block (number of components)
Definition: fasp.h:319
SHORT num_levels
number of levels in use <= max_levels
Definition: fasp.h:730
SHORT ILU_type
ILU type for decomposition.
Definition: fasp.h:380
INT * efather
Definition: fasp.h:1137
SHORT smoother
AMG smoother type.
Definition: fasp.h:816
SHORT AMG_smooth_filter
Definition: fasp.h:1097
INT * nz_diff
nz_diff[i]: the i-th different value in 'nzrow'
Definition: fasp.h:280
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:625
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:804
INT AMG_coarse_dof
Definition: fasp.h:1071
INT * ediri
Definition: fasp.h:1134
SHORT AMG_presmooth_iter
Definition: fasp.h:1069
SHORT AMG_aggregation_type
Definition: fasp.h:1083
INT nc
number of components
Definition: fasp.h:986
Mumps_data * mumps
param for MUMPS
Definition: fasp.h:570
REAL ** offdiag
off-diagonal entries (dimension is nband * [(ngrid-|offsets|) * nc^2])
Definition: fasp.h:334
dvector b
pointer to the right-hand side at level level_num
Definition: fasp.h:744
INT Schwarz_levels
number of levels use Schwarz smoother
Definition: fasp.h:775
INT col
number of columns
Definition: fasp.h:133
REAL ILU_relax
add the sum of dropped elements to diagonal element in proportion relax
Definition: fasp.h:389
INT nblk
number of blocks
Definition: fasp.h:515
SHORT solver_type
Definition: fasp.h:1041
INT * offsets
offsets of the off-diagonals (length is nband)
Definition: fasp.h:331
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:927
Structure matrix of REAL type.
Definition: fasp.h:304
INT ** val
actual matrix entries
Definition: fasp.h:136
REAL quality_bound
quality threshold for pairwise aggregation
Definition: fasp.h:607
REAL * au
LU decomposition: the U block.
Definition: fasp.h:533
INT * maxa
maxa
Definition: fasp.h:554
SHORT smooth_order
AMG smoother ordering.
Definition: fasp.h:819
REAL * val
nonzero entries of A
Definition: fasp.h:166
Input parameters.
Definition: fasp.h:1029
REAL * rhsloc
temp work space???
Definition: fasp.h:524
INT nz
number of grids in z direction
Definition: fasp.h:313
REAL(* p)[2]
Definition: fasp.h:1129
ivector * neigh
array to store neighbor information
Definition: fasp.h:965
REAL * val
nonzero entries of A
Definition: fasp.h:227
INT Schwarz_maxlvl
maximal level for constructing the blocks
Definition: fasp.h:443
REAL AMG_relaxation
Definition: fasp.h:1067
struct dCSRLmat dCSRLmat
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:858
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:392
REAL * val
actual vector entries
Definition: fasp.h:348
INT col
column of matrix A, n
Definition: fasp.h:215
SHORT precond_type
Definition: fasp.h:1042
INT ILU_lfil
level of fill-in for ILUk
Definition: fasp.h:383
REAL ILU_permtol
Definition: fasp.h:1053
SHORT AMG_smooth_order
Definition: fasp.h:1066
SHORT AMG_smoother
Definition: fasp.h:1065
INT aggressive_path
number of paths use to determine strongly coupled C points
Definition: fasp.h:664
Vector with n entries of REAL type.
Definition: fasp.h:342
INT(* e)[2]
Definition: fasp.h:1130
INT aggressive_level
number of levels use aggressive coarsening
Definition: fasp.h:661
struct ivector ivector
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:846
dvector * diaginvS
the inverse of the diagonals for GS/block GS smoother (saturation block)
Definition: fasp.h:956
INT nnz
number of nonzero entries
Definition: fasp.h:218
SHORT ILU_type
Definition: fasp.h:1049
INT * ja
column indices of all the nonzeros
Definition: fasp.h:289
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:930
INT Schwarz_maxlvl
Definition: fasp.h:1057
dvector * diaginv
the inverse of the diagonals for GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:950
struct dSTRmat dSTRmat
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:909
SHORT AMG_type
type of AMG method
Definition: fasp.h:798
SHORT smoother
AMG smoother type.
Definition: fasp.h:912
#define INT
Definition: fasp.h:64
INT * JA
integer array of column indexes, the size is nnz
Definition: fasp.h:193
INT row
number of rows
Definition: fasp.h:130
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:877
Data for ILU setup.
Definition: fasp.h:400
REAL strong_threshold
strong connection threshold for coarsening
Definition: fasp.h:652
REAL AMG_strong_threshold
Definition: fasp.h:1085
Preconditioner data and action.
Definition: fasp.h:999
INT row
row number of matrix A, m
Definition: fasp.h:181
INT Schwarz_type
Schwarz method type.
Definition: fasp.h:539
INT nz_rb
INT nband
number of off-diag bands
Definition: fasp.h:328
REAL AMG_tentative_smooth
Definition: fasp.h:1096
INT restart
Definition: fasp.h:1112
Parameters for MUMPS interface.
Definition: fasp.h:459
INT row
row number of matrix A, m
Definition: fasp.h:212
Pardiso_data pdata
data for Intel MKL PARDISO
Definition: fasp.h:755
INT nwork
work space size
Definition: fasp.h:421
INT near_kernel_dim
dimension of the near kernel for SAMG
Definition: fasp.h:767
SHORT AMG_nl_amli_krylov_type
Definition: fasp.h:1078
Sparse matrix of REAL type in COO (or IJ) format.
Definition: fasp.h:209
REAL ** near_kernel_basis
basis of near kernel space for SAMG
Definition: fasp.h:770
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:906
INT restart
Definition: fasp.h:1046
Parameters for Intel MKL PARDISO interface.
Definition: fasp.h:477
struct grid2d grid2d
INT Schwarz_levels
number of levels use Schwarz smoother
Definition: fasp.h:700
SHORT precond_type
Definition: fasp.h:1108
ivector * pivot
the pivot for the GS/block GS smoother (whole reservoir matrix)
Definition: fasp.h:953
unsigned INT total_alloc_count
Total allocated memory amount.
Definition: memory.c:35
INT row
number of rows
Definition: fasp.h:268
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:852
ILU_data LU
ILU matrix for ILU smoother.
Definition: fasp.h:764
SHORT stop_type
Definition: fasp.h:1109
void * data
data for preconditioner, void pointer
Definition: fasp.h:1002
struct dvector dvector
INT THDs_AMG_GS
Definition: threads.c:107
SHORT aggregation_type
aggregation type
Definition: fasp.h:646
struct linked_list ListElement
dvector x
pointer to the iterative solution at level level_num
Definition: fasp.h:747
INT * index
row index of the matrix (length-grouped): rows with same nnz are together
Definition: fasp.h:283
dvector diag
diagonal elements
Definition: fasp.h:989
INT THDs_CPR_gGS
Definition: threads.c:109
Schwarz_param * swzparam
param for Schwarz
Definition: fasp.h:573
INT Schwarz_blksolver
Definition: fasp.h:1059
INT ILU_lfil
Definition: fasp.h:1050
ivector * order
order for smoothing
Definition: fasp.h:962
INT nnz
number of nonzero entries
Definition: fasp.h:157
grid2d * pgrid2d
Definition: fasp.h:1146
INT AMG_maxit
Definition: fasp.h:1073
Definition of all kinds of messages, including error messages, solver types, etc. ...
SHORT AMG_coarse_scaling
Definition: fasp.h:1076
INT vertices
Definition: fasp.h:1140
SHORT AMG_interpolation_type
Definition: fasp.h:1084
REAL * luval
nonzero entries of LU
Definition: fasp.h:415
SHORT coarse_solver
coarse solver type
Definition: fasp.h:628
REAL truncation_threshold
truncation threshold
Definition: fasp.h:658
struct dCOOmat dCOOmat
SHORT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:682
SHORT Schwarz_type
type for Schwarz method
Definition: fasp.h:440
INT col
column of matrix A, n
Definition: fasp.h:154
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:918
SHORT postsmooth_iter
number of postsmoothing
Definition: fasp.h:825
SHORT amli_degree
degree of the polynomial used by AMLI cycle
Definition: fasp.h:843
REAL ILU_permtol
permuted if permtol*|a(i,j)| > |a(i,i)|
Definition: fasp.h:697
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:190
SHORT max_levels
max number of levels of AMG
Definition: fasp.h:598
REAL ILU_relax
Definition: fasp.h:1052
Matrix-vector multiplication, replace the actual matrix.
Definition: fasp.h:1013
dCSRmat * R_nk
Restriction for near kernel.
Definition: fasp.h:872
REAL * w
temporary work space for other usage
Definition: fasp.h:880
REAL * amli_coef
coefficients of the polynomial used by AMLI cycle
Definition: fasp.h:637
dCSRmat * A
the original CSR matrix
Definition: fasp.h:939
INT * val
nonzero entries of A
Definition: fasp.h:196
INT AMG_aggressive_path
Definition: fasp.h:1089
INT * pfather
Definition: fasp.h:1136
SHORT AMG_coarse_solver
Definition: fasp.h:1075
INT row
row number of matrix LU, m
Definition: fasp.h:403
INT Schwarz_mmsize
maximal size of blocks
Definition: fasp.h:446
REAL ILU_relax
relaxation for ILUs
Definition: fasp.h:694
SHORT nl_amli_krylov_type
type of Krylov method used by Nonlinear AMLI cycle
Definition: fasp.h:640
INT row
number of rows
Definition: fasp.h:111
INT * val
actual vector entries
Definition: fasp.h:362
INT tail
ending of the list
Definition: fasp.h:1181
INT * mask
mask
Definition: fasp.h:548
dSTRmat * SS_str
store Saturation block in STR format
Definition: fasp.h:945
dvector rhsloc1
local right hand side
Definition: fasp.h:527
SHORT coarse_solver
coarse solver type for AMG
Definition: fasp.h:837
INT AMG_max_aggregation
Definition: fasp.h:1095
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:622
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:386
INT row
row number of matrix A, m
Definition: fasp.h:151
Parameters passed to iterative solvers.
Definition: fasp.h:1105
struct linked_list * next_node
next node
Definition: fasp.h:1184
INT * val
nonzero entries of A
Definition: fasp.h:257
INT Schwarz_blksolver
type of Schwarz block solver
Definition: fasp.h:449
REAL relaxation
relaxation parameter for SOR smoother
Definition: fasp.h:924
Sparse matrix of REAL type in CSR format.
Definition: fasp.h:148
Dense matrix of REAL type.
Definition: fasp.h:108
INT Schwarz_blksolver
type of Schwarz block solver
Definition: fasp.h:712
ivector cfmark
pointer to the CF marker at level level_num
Definition: fasp.h:758
ListElement * LinkList
Definition: fasp.h:1194
dCSRmat P
prolongation operator at level level_num
Definition: fasp.h:741
dCSRmat * A_nk
Matrix data for near kernel.
Definition: fasp.h:866
INT * I
integer array of row indices, the size is nnz
Definition: fasp.h:251
struct iCOOmat iCOOmat
INT maxit
max number of iterations of AMG preconditioner
Definition: fasp.h:900
REAL tentative_smooth
smooth factor for smoothing the tentative prolongation
Definition: fasp.h:849
INT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:761
SHORT ILU_type
ILU type for smoothing.
Definition: fasp.h:685
INT row
number of rows
Definition: fasp.h:345
ivector * pivotS
the pivot for the GS/block GS smoother (saturation block)
Definition: fasp.h:959
REAL tol
Definition: fasp.h:1111
SHORT cycle_type
type of AMG cycle
Definition: fasp.h:604
SHORT max_levels
max number of AMG levels
Definition: fasp.h:807
REAL * diag
diagonal entries (length is ngrid*(nc^2))
Definition: fasp.h:325
dCSRmat A
pointer to the matrix
Definition: fasp.h:510
INT AMG_pair_number
Definition: fasp.h:1090
INT col
column of matrix A, n
Definition: fasp.h:245
dCSRmat R
restriction operator at level level_num
Definition: fasp.h:738
SHORT smooth_filter
switch for filtered matrix used for smoothing the tentative prolongation
Definition: fasp.h:679
INT AMG_aggressive_level
Definition: fasp.h:1088
SHORT polynomial_degree
degree of the polynomial smoother
Definition: fasp.h:831
SHORT print_level
Definition: fasp.h:1113
Parameters for Schwarz method.
Definition: fasp.h:434
INT cycle_type
cycle type
Definition: fasp.h:787
INT nnz
number of nonzero entries
Definition: fasp.h:248
REAL max_row_sum
maximal row sum parameter
Definition: fasp.h:655
AMG_data * mgl_data
AMG preconditioner data.
Definition: fasp.h:855
INT(* s)[3]
Definition: fasp.h:1132
Parameters for ILU.
Definition: fasp.h:374
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:63
INT edges
Definition: fasp.h:1141
struct idenmat idenmat
SHORT interpolation_type
interpolation type
Definition: fasp.h:649
Mumps_data mumps
data for MUMPS
Definition: fasp.h:784
const grid2d * pcgrid2d
Definition: fasp.h:1148
SHORT print_level
print leve
Definition: fasp.h:437
INT nxy
number of grids on x-y plane
Definition: fasp.h:316
SHORT stop_type
Definition: fasp.h:1043
INT Schwarz_mmsize
maximal block size
Definition: fasp.h:703
Sparse matrix of INT type in COO (or IJ) format.
Definition: fasp.h:239
REAL tol
tolerance for AMG preconditioner
Definition: fasp.h:810
INT triangles
Definition: fasp.h:1142
INT col
number of cols
Definition: fasp.h:271
INT data
data
Definition: fasp.h:1175
dvector r
temporary dvector used to store and restore the residual
Definition: fasp.h:970
INT pair_number
number of pairwise matchings
Definition: fasp.h:667
INT memt
working space size
Definition: fasp.h:545
REAL itsolver_tol
Definition: fasp.h:1044
REAL AMG_tol
Definition: fasp.h:1072
dCSRmat A
pointer to the matrix at level level_num
Definition: fasp.h:735
INT problem_num
Definition: fasp.h:1038
struct dCSRmat dCSRmat
INT nx_rb
INT nnz
number of nonzero entries
Definition: fasp.h:274
Data for Schwarz methods.
Definition: fasp.h:505
REAL ILU_droptol
Definition: fasp.h:1051
SHORT print_level
print level for AMG
Definition: fasp.h:589
INT count
INT * colind
integer array of column indices, the size is nnz
Definition: fasp.h:224
INT Schwarz_type
Definition: fasp.h:1058
unsigned INT total_alloc_mem
Definition: memory.c:34
INT * tfather
Definition: fasp.h:1138
INT * J
integer array of column indices, the size is nnz
Definition: fasp.h:254
Data for AMG solvers.
Definition: fasp.h:722
INT row
number of rows
Definition: fasp.h:359
REAL AMG_strong_coupled
Definition: fasp.h:1094
INT blk_solver
Schwarz block solver.
Definition: fasp.h:542
SHORT max_levels
max number of levels
Definition: fasp.h:727
SHORT AMG_type
Definition: fasp.h:1062
dCSRmat * blk_data
matrix for each partition
Definition: fasp.h:557
INT col
number of columns
Definition: fasp.h:114
Data passed to the preconditioners.
Definition: fasp.h:795
REAL * w
temporary work space for other usage
Definition: fasp.h:973
INT MAXIMAP
dSTRmat * A_str
store the whole reservoir block in STR format
Definition: fasp.h:942
void * Numeric
pointer to the numerical factorization from UMFPACK
Definition: fasp.h:752
REAL tol
stopping tolerance for AMG solver
Definition: fasp.h:595
INT THDs_CPR_lGS
Definition: threads.c:108
INT AMG_Schwarz_levels
Definition: fasp.h:1079
INT nb
block size for BSR type only
Definition: fasp.h:418
SHORT cycle_type
AMG cycle type.
Definition: fasp.h:813
Two dimensional grid data structure.
Definition: fasp.h:1127
Sparse matrix of REAL type in CSRL format.
Definition: fasp.h:265
INT Schwarz_maxlvl
maximal levels
Definition: fasp.h:706
REAL * work
work space
Definition: fasp.h:424
INT nnz
number of nonzero entries
Definition: fasp.h:187
dCSRmat * P_nk
Prolongation for near kernel.
Definition: fasp.h:869
SHORT print_level
print level in AMG preconditioner
Definition: fasp.h:897
SHORT AMG_cycle_type
Definition: fasp.h:1064
struct ddenmat ddenmat
SHORT AMG_coarsening_type
Definition: fasp.h:1082
INT col
column of matrix A, n
Definition: fasp.h:184
struct iCSRmat iCSRmat
REAL ILU_droptol
drop tolerance for ILUt
Definition: fasp.h:691
REAL * al
LU decomposition: the L block.
Definition: fasp.h:536
SHORT scaled
whether the matrix are scaled or not
Definition: fasp.h:936
INT nzlu
number of nonzero entries
Definition: fasp.h:409
INT * IA
integer array of row pointers, the size is m+1
Definition: fasp.h:160
INT ny_rb
INT job
work for MUMPS
Definition: fasp.h:467
INT Schwarz_type
type of Schwarz method
Definition: fasp.h:709
void * data
data for MxV, can be a Matrix or something else
Definition: fasp.h:1016
SHORT print_level
Definition: fasp.h:1032
INT Schwarz_mmsize
Definition: fasp.h:1056
INT ILU_lfil
level of fill-in for ILUs and ILUk
Definition: fasp.h:688
dvector w
Temporary work space.
Definition: fasp.h:781
REAL * val
values of all the nonzero entries
Definition: fasp.h:292
INT * start
j in {start[i],...,start[i+1]-1} means nz_diff[i] nnz in index[j]-row
Definition: fasp.h:286
SHORT AMG_amli_degree
Definition: fasp.h:1077
Sparse matrix of INT type in CSR format.
Definition: fasp.h:178
REAL AMG_truncation_threshold
Definition: fasp.h:1086
Dense matrix of INT type.
Definition: fasp.h:127
INT ny
number of grids in y direction
Definition: fasp.h:310
A linked list node.
Definition: fasp.h:1171
INT(* t)[3]
Definition: fasp.h:1131
SHORT AMG_levels
Definition: fasp.h:1063
SHORT max_levels
max number of AMG levels
Definition: fasp.h:903
SHORT output_type
Definition: fasp.h:1033
dvector xloc1
local solution
Definition: fasp.h:530
Data passed to diagonal preconditioner for dSTRmat matrices.
Definition: fasp.h:983
SHORT coarse_scaling
switch of scaling of the coarse grid correction
Definition: fasp.h:631
SHORT AMG_ILU_levels
Definition: fasp.h:1074
SHORT AMG_polynomial_degree
Definition: fasp.h:1068
dCSRmat * A
Matrix data.
Definition: fasp.h:861
SHORT coarsening_type
coarsening type
Definition: fasp.h:921
ILU_data * LU
ILU preconditioner data (needed for CPR type preconditioner)
Definition: fasp.h:933
SHORT itsolver_type
Definition: fasp.h:1107
SHORT print_level
print level
Definition: fasp.h:377
INT * jblock
column index of blocks
Definition: fasp.h:521