Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
PreAMGSetupSABSR.c
Go to the documentation of this file.
1
22#include <math.h>
23#include <time.h>
24
25#ifdef _OPENMP
26#include <omp.h>
27#endif
28
29#include "fasp.h"
30#include "fasp_functs.h"
31
32/*---------------------------------*/
33/*-- Declare Private Functions --*/
34/*---------------------------------*/
35
36#include "PreAMGAggregation.inl"
37#include "PreAMGAggregationBSR.inl"
38#include "PreAMGAggregationUA.inl"
39
40static SHORT amg_setup_smoothP_smoothR_bsr (AMG_data_bsr *, AMG_param *);
41static void smooth_agg_bsr (const dBSRmat *, dBSRmat *, dBSRmat *, const AMG_param *,
42 const dCSRmat *);
43
44/*---------------------------------*/
45/*-- Public Functions --*/
46/*---------------------------------*/
47
62 AMG_param *param)
63{
64#if DEBUG_MODE > 0
65 printf("### DEBUG: [-Begin-] %s ...\n", __FUNCTION__);
66#endif
67
68 SHORT status = amg_setup_smoothP_smoothR_bsr(mgl, param);
69
70#if DEBUG_MODE > 0
71 printf("### DEBUG: [--End--] %s ...\n", __FUNCTION__);
72#endif
73
74 return status;
75}
76
77/*---------------------------------*/
78/*-- Private Functions --*/
79/*---------------------------------*/
80
96static void smooth_agg_bsr (const dBSRmat *A,
97 dBSRmat *tentp,
98 dBSRmat *P,
99 const AMG_param *param,
100 const dCSRmat *N)
101{
102 const INT row = A->ROW, col= A->COL, nnz = A->NNZ;
103 const INT nb = A->nb, nb2 = nb*nb;
104 const REAL smooth_factor = param->tentative_smooth;
105
106 // local variables
107 dBSRmat S;
108 dvector diaginv; // diagonal block inv
109
110 INT i, j;
111
112 REAL *Id = (REAL *)fasp_mem_calloc(nb2, sizeof(REAL));
113 REAL *temp = (REAL *)fasp_mem_calloc(nb2, sizeof(REAL));
114
115 fasp_smat_identity(Id, nb, nb2);
116
117 /* Step 1. Form smoother */
118
119 // copy structure from A
120 S = fasp_dbsr_create(row, col, nnz, nb, 0);
121
122 for ( i=0; i<=row; ++i ) S.IA[i] = A->IA[i];
123 for ( i=0; i<nnz; ++i ) S.JA[i] = A->JA[i];
124
125 diaginv = fasp_dbsr_getdiaginv(A);
126
127 // for S
128 for (i=0; i<row; ++i) {
129
130 for (j=S.IA[i]; j<S.IA[i+1]; ++j) {
131
132 if (S.JA[j] == i) {
133
134 fasp_blas_smat_mul(diaginv.val+(i*nb2), A->val+(j*nb2), temp, nb);
135 fasp_blas_smat_add(Id, temp, nb, 1.0, (-1.0)*smooth_factor, S.val+(j*nb2));
136
137 }
138 else {
139
140 fasp_blas_smat_mul(diaginv.val+(i*nb2), A->val+(j*nb2), S.val+(j*nb2), nb);
141 fasp_blas_smat_axm(S.val+(j*nb2), nb, (-1.0)*smooth_factor);
142
143 }
144
145 }
146
147 }
148 fasp_dvec_free(&diaginv);
149
150 fasp_mem_free(Id); Id = NULL;
151 fasp_mem_free(temp); temp = NULL;
152
153 /* Step 2. Smooth the tentative prolongation P = S*tenp */
154 fasp_blas_dbsr_mxm(&S, tentp, P); // Note: think twice about this.
155
156 P->NNZ = P->IA[P->ROW];
157
158 fasp_dbsr_free(&S);
159}
160
177static SHORT amg_setup_smoothP_smoothR_bsr (AMG_data_bsr *mgl,
178 AMG_param *param)
179{
180 const SHORT CondType = 1; // Condensation method used for AMG
181
182 const SHORT prtlvl = param->print_level;
183 const SHORT csolver = param->coarse_solver;
184 const SHORT min_cdof = MAX(param->coarse_dof,50);
185 const INT m = mgl[0].A.ROW;
186 const INT nb = mgl[0].A.nb;
187
188 ILU_param iluparam;
189 SHORT max_levels=param->max_levels;
190 SHORT i, lvl=0, status=FASP_SUCCESS;
191 REAL setup_start, setup_end;
192
193 AMG_data *mgl_csr = fasp_amg_data_create(max_levels);
194
195 dCSRmat temp1, temp2;
196
197#if DEBUG_MODE > 0
198 printf("### DEBUG: [-Begin-] %s ...\n", __FUNCTION__);
199 printf("### DEBUG: nr=%d, nc=%d, nnz=%d\n",
200 mgl[0].A.ROW, mgl[0].A.COL, mgl[0].A.NNZ);
201#endif
202
203 fasp_gettime(&setup_start);
204
205 /*-----------------------*/
206 /*--local working array--*/
207 /*-----------------------*/
208
209 // level info (fine: 0; coarse: 1)
210 ivector *vertices = (ivector *)fasp_mem_calloc(max_levels, sizeof(ivector));
211
212 // each level stores the information of the number of aggregations
213 INT *num_aggs = (INT *)fasp_mem_calloc(max_levels, sizeof(INT));
214
215 // each level stores the information of the strongly coupled neighbourhood
216 dCSRmat *Neighbor = (dCSRmat *)fasp_mem_calloc(max_levels, sizeof(dCSRmat));
217
218 // each level stores the information of the tentative prolongations
219 dBSRmat *tentp = (dBSRmat *)fasp_mem_calloc(max_levels,sizeof(dBSRmat));
220
221 for ( i=0; i<max_levels; ++i ) num_aggs[i] = 0;
222
223 /*-----------------------*/
224 /*-- setup null spaces --*/
225 /*-----------------------*/
226
227 // null space for whole Jacobian
228 //mgl[0].near_kernel_dim = 1;
229 //mgl[0].near_kernel_basis = (REAL **)fasp_mem_calloc(mgl->near_kernel_dim, sizeof(REAL*));
230
231 //for ( i=0; i < mgl->near_kernel_dim; ++i ) mgl[0].near_kernel_basis[i] = NULL;
232
233 /*-----------------------*/
234 /*-- setup ILU param --*/
235 /*-----------------------*/
236
237 // initialize ILU parameters
238 mgl->ILU_levels = param->ILU_levels;
239 if ( param->ILU_levels > 0 ) {
240 iluparam.print_level = param->print_level;
241 iluparam.ILU_lfil = param->ILU_lfil;
242 iluparam.ILU_droptol = param->ILU_droptol;
243 iluparam.ILU_relax = param->ILU_relax;
244 iluparam.ILU_type = param->ILU_type;
245 }
246
247 /*----------------------------*/
248 /*--- checking aggregation ---*/
249 /*----------------------------*/
250
251 if (param->aggregation_type == PAIRWISE)
252 param->pair_number = MIN(param->pair_number, max_levels);
253
254 // Main AMG setup loop
255 while ( (mgl[lvl].A.ROW > min_cdof) && (lvl < max_levels-1) ) {
256
257 /*-- setup ILU decomposition if necessary */
258 if ( lvl < param->ILU_levels ) {
259 status = fasp_ilu_dbsr_setup(&mgl[lvl].A, &mgl[lvl].LU, &iluparam);
260 if ( status < 0 ) {
261 if ( prtlvl > PRINT_MIN ) {
262 printf("### WARNING: ILU setup on level-%d failed!\n", lvl);
263 printf("### WARNING: Disable ILU for level >= %d.\n", lvl);
264 }
265 param->ILU_levels = lvl;
266 }
267 }
268
269 /*-- get the diagonal inverse --*/
270 mgl[lvl].diaginv = fasp_dbsr_getdiaginv(&mgl[lvl].A);
271
272 switch ( CondType ) {
273 case 2:
274 mgl[lvl].PP = condenseBSR(&mgl[lvl].A); break;
275 default:
276 mgl[lvl].PP = condenseBSRLinf(&mgl[lvl].A); break;
277 }
278
279 /*-- Aggregation --*/
280 switch ( param->aggregation_type ) {
281
282 case NPAIR: // unsymmetric pairwise matching aggregation
283
284 mgl_csr[lvl].A = mgl[lvl].PP;
285 status = aggregation_nsympair (mgl_csr, param, lvl, vertices,
286 &num_aggs[lvl]);
287
288 break;
289
290 default: // symmetric pairwise matching aggregation
291
292 mgl_csr[lvl].A = mgl[lvl].PP;
293 status = aggregation_symmpair (mgl_csr, param, lvl, vertices,
294 &num_aggs[lvl]);
295
296 // TODO: Need to design better algorithm for pairwise BSR -- Xiaozhe
297 // TODO: Check why this fails for BSR --Chensong
298
299 break;
300 }
301
302 if ( status < 0 ) {
303 // When error happens, force solver to use the current multigrid levels!
304 if ( prtlvl > PRINT_MIN ) {
305 printf("### WARNING: Aggregation on level-%d failed!\n", lvl);
306 }
307 status = FASP_SUCCESS; break;
308 }
309
310 /* -- Form Tentative prolongation --*/
311 if (lvl == 0 && mgl[0].near_kernel_dim >0 ){
312 form_tentative_p_bsr1(&vertices[lvl], &tentp[lvl], &mgl[0],
313 num_aggs[lvl], mgl[0].near_kernel_dim,
314 mgl[0].near_kernel_basis);
315 }
316 else{
317 form_boolean_p_bsr(&vertices[lvl], &tentp[lvl], &mgl[0], num_aggs[lvl]);
318 }
319
320 /* -- Smoothing -- */
321 smooth_agg_bsr(&mgl[lvl].A, &tentp[lvl], &mgl[lvl].P, param, &Neighbor[lvl]);
322
323 /*-- Form restriction --*/
324 fasp_dbsr_trans(&mgl[lvl].P, &mgl[lvl].R);
325
326 /*-- Form coarse level stiffness matrix --*/
327 fasp_blas_dbsr_rap(&mgl[lvl].R, &mgl[lvl].A, &mgl[lvl].P, &mgl[lvl+1].A);
328
329 /*-- Form extra near kernel space if needed --*/
330 if (mgl[lvl].A_nk != NULL){
331
332 mgl[lvl+1].A_nk = (dCSRmat *)fasp_mem_calloc(1, sizeof(dCSRmat));
333 mgl[lvl+1].P_nk = (dCSRmat *)fasp_mem_calloc(1, sizeof(dCSRmat));
334 mgl[lvl+1].R_nk = (dCSRmat *)fasp_mem_calloc(1, sizeof(dCSRmat));
335
336 temp1 = fasp_format_dbsr_dcsr(&mgl[lvl].R);
337 fasp_blas_dcsr_mxm(&temp1, mgl[lvl].P_nk, mgl[lvl+1].P_nk);
338 fasp_dcsr_trans(mgl[lvl+1].P_nk, mgl[lvl+1].R_nk);
339 temp2 = fasp_format_dbsr_dcsr(&mgl[lvl+1].A);
340 fasp_blas_dcsr_rap(mgl[lvl+1].R_nk, &temp2, mgl[lvl+1].P_nk, mgl[lvl+1].A_nk);
341 fasp_dcsr_free(&temp1);
342 fasp_dcsr_free(&temp2);
343
344 }
345
346 fasp_dcsr_free(&Neighbor[lvl]);
347 fasp_ivec_free(&vertices[lvl]);
348 fasp_dbsr_free(&tentp[lvl]);
349
350 ++lvl;
351 }
352
353 // Setup coarse level systems for direct solvers (BSR version)
354 switch (csolver) {
355
356#if WITH_MUMPS
357 case SOLVER_MUMPS: {
358 // Setup MUMPS direct solver on the coarsest level
359 mgl[lvl].mumps.job = 1;
360 mgl[lvl].Ac = fasp_format_dbsr_dcsr(&mgl[lvl].A);
361 fasp_solver_mumps_steps(&mgl[lvl].Ac, &mgl[lvl].b, &mgl[lvl].x, &mgl[lvl].mumps);
362 break;
363 }
364#endif
365
366#if WITH_UMFPACK
367 case SOLVER_UMFPACK: {
368 // Need to sort the matrix A for UMFPACK to work
369 mgl[lvl].Ac = fasp_format_dbsr_dcsr(&mgl[lvl].A);
370 dCSRmat Ac_tran;
371 fasp_dcsr_trans(&mgl[lvl].Ac, &Ac_tran);
372 fasp_dcsr_sort(&Ac_tran);
373 fasp_dcsr_cp(&Ac_tran, &mgl[lvl].Ac);
374 fasp_dcsr_free(&Ac_tran);
375 mgl[lvl].Numeric = fasp_umfpack_factorize(&mgl[lvl].Ac, 0);
376 break;
377 }
378#endif
379
380#if WITH_SuperLU
381 case SOLVER_SUPERLU: {
382 /* Setup SuperLU direct solver on the coarsest level */
383 mgl[lvl].Ac = fasp_format_dbsr_dcsr(&mgl[lvl].A);
384 }
385#endif
386
387#if WITH_PARDISO
388 case SOLVER_PARDISO: {
389 mgl[lvl].Ac = fasp_format_dbsr_dcsr(&mgl[lvl].A);
390 fasp_dcsr_sort(&mgl[lvl].Ac);
391 fasp_pardiso_factorize(&mgl[lvl].Ac, &mgl[lvl].pdata, prtlvl);
392 break;
393 }
394#endif
395
396 default:
397 // Do nothing!
398 break;
399 }
400
401 // setup total level number and current level
402 mgl[0].num_levels = max_levels = lvl+1;
403 mgl[0].w = fasp_dvec_create(3*m*nb);
404
405 if (mgl[0].A_nk != NULL){
406
407#if WITH_UMFPACK
408 // Need to sort the matrix A_nk for UMFPACK
409 fasp_dcsr_trans(mgl[0].A_nk, &temp1);
410 fasp_dcsr_sort(&temp1);
411 fasp_dcsr_cp(&temp1, mgl[0].A_nk);
412 fasp_dcsr_free(&temp1);
413 mgl[0].Numeric = fasp_umfpack_factorize(mgl[0].A_nk, 0);
414#endif
415
416 }
417
418 for ( lvl = 1; lvl < max_levels; lvl++ ) {
419 const INT mm = mgl[lvl].A.ROW*nb;
420 mgl[lvl].num_levels = max_levels;
421 mgl[lvl].b = fasp_dvec_create(mm);
422 mgl[lvl].x = fasp_dvec_create(mm);
423 mgl[lvl].w = fasp_dvec_create(3*mm);
424 mgl[lvl].ILU_levels = param->ILU_levels - lvl; // initialize ILU levels!
425
426 if (mgl[lvl].A_nk != NULL){
427
428#if WITH_UMFPACK
429 // Need to sort the matrix A_nk for UMFPACK
430 fasp_dcsr_trans(mgl[lvl].A_nk, &temp1);
431 fasp_dcsr_sort(&temp1);
432 fasp_dcsr_cp(&temp1, mgl[lvl].A_nk);
433 fasp_dcsr_free(&temp1);
434 mgl[lvl].Numeric = fasp_umfpack_factorize(mgl[lvl].A_nk, 0);
435#endif
436
437 }
438
439 }
440
441 if ( prtlvl > PRINT_NONE ) {
442 fasp_gettime(&setup_end);
443 fasp_amgcomplexity_bsr(mgl,prtlvl);
444 fasp_cputime("Smoothed aggregation (BSR) setup", setup_end - setup_start);
445 }
446
447 fasp_mem_free(vertices); vertices = NULL;
448 fasp_mem_free(num_aggs); num_aggs = NULL;
449 fasp_mem_free(Neighbor); Neighbor = NULL;
450
451#if DEBUG_MODE > 0
452 printf("### DEBUG: [--End--] %s ...\n", __FUNCTION__);
453#endif
454
455 return status;
456}
457
458/*---------------------------------*/
459/*-- End of File --*/
460/*---------------------------------*/
void fasp_mem_free(void *mem)
Free up previous allocated memory body and set pointer to NULL.
Definition: AuxMemory.c:152
void * fasp_mem_calloc(const unsigned int size, const unsigned int type)
Allocate, initiate, and check memory.
Definition: AuxMemory.c:65
void fasp_cputime(const char *message, const REAL cputime)
Print CPU walltime.
Definition: AuxMessage.c:179
void fasp_amgcomplexity_bsr(const AMG_data_bsr *mgl, const SHORT prtlvl)
Print complexities of AMG method for BSR matrices.
Definition: AuxMessage.c:136
void fasp_gettime(REAL *time)
Get system time.
Definition: AuxTiming.c:37
void fasp_dvec_free(dvector *u)
Free vector data space of REAL type.
Definition: AuxVector.c:145
void fasp_ivec_free(ivector *u)
Free vector data space of INT type.
Definition: AuxVector.c:164
dvector fasp_dvec_create(const INT m)
Create dvector data space of REAL type.
Definition: AuxVector.c:62
dCSRmat fasp_format_dbsr_dcsr(const dBSRmat *B)
Transfer a 'dBSRmat' type matrix into a dCSRmat.
Definition: BlaFormat.c:497
SHORT fasp_ilu_dbsr_setup(dBSRmat *A, ILU_data *iludata, ILU_param *iluparam)
Get ILU decoposition of a BSR matrix A.
void fasp_smat_identity(REAL *a, const INT n, const INT n2)
Set a n*n full matrix to be a identity.
void fasp_blas_smat_axm(REAL *a, const INT n, const REAL alpha)
Compute a = alpha*a (in place)
Definition: BlaSmallMat.c:37
void fasp_blas_smat_mul(const REAL *a, const REAL *b, REAL *c, const INT n)
Compute the matrix product of two small full matrices a and b, stored in c.
Definition: BlaSmallMat.c:596
void fasp_blas_smat_add(const REAL *a, const REAL *b, const INT n, const REAL alpha, const REAL beta, REAL *c)
Compute c = alpha*a + beta*b.
Definition: BlaSmallMat.c:86
dBSRmat fasp_dbsr_create(const INT ROW, const INT COL, const INT NNZ, const INT nb, const INT storage_manner)
Create BSR sparse matrix data memory space.
Definition: BlaSparseBSR.c:48
INT fasp_dbsr_trans(const dBSRmat *A, dBSRmat *AT)
Find A^T from given dBSRmat matrix A.
Definition: BlaSparseBSR.c:246
void fasp_dbsr_free(dBSRmat *A)
Free memory space for BSR format sparse matrix.
Definition: BlaSparseBSR.c:140
dvector fasp_dbsr_getdiaginv(const dBSRmat *A)
Get D^{-1} of matrix A.
Definition: BlaSparseBSR.c:543
void fasp_dcsr_free(dCSRmat *A)
Free CSR sparse matrix data memory space.
Definition: BlaSparseCSR.c:184
void fasp_dcsr_sort(dCSRmat *A)
Sort each row of A in ascending order w.r.t. column indices.
Definition: BlaSparseCSR.c:385
void fasp_dcsr_cp(const dCSRmat *A, dCSRmat *B)
copy a dCSRmat to a new one B=A
Definition: BlaSparseCSR.c:851
INT fasp_dcsr_trans(const dCSRmat *A, dCSRmat *AT)
Find transpose of dCSRmat matrix A.
Definition: BlaSparseCSR.c:952
void fasp_blas_dbsr_mxm(const dBSRmat *A, const dBSRmat *B, dBSRmat *C)
Sparse matrix multiplication C=A*B.
Definition: BlaSpmvBSR.c:4883
void fasp_blas_dbsr_rap(const dBSRmat *R, const dBSRmat *A, const dBSRmat *P, dBSRmat *B)
dBSRmat sparse matrix multiplication B=R*A*P
Definition: BlaSpmvBSR.c:5466
void fasp_blas_dcsr_mxm(const dCSRmat *A, const dCSRmat *B, dCSRmat *C)
Sparse matrix multiplication C=A*B.
Definition: BlaSpmvCSR.c:893
void fasp_blas_dcsr_rap(const dCSRmat *R, const dCSRmat *A, const dCSRmat *P, dCSRmat *RAP)
Triple sparse matrix multiplication B=R*A*P.
Definition: BlaSpmvCSR.c:999
SHORT fasp_amg_setup_sa_bsr(AMG_data_bsr *mgl, AMG_param *param)
Set up phase of smoothed aggregation AMG (BSR format)
AMG_data * fasp_amg_data_create(SHORT max_levels)
Create and initialize AMG_data for classical and SA AMG.
Definition: PreDataInit.c:64
int fasp_solver_mumps_steps(dCSRmat *ptrA, dvector *b, dvector *u, Mumps_data *mumps)
Solve Ax=b by MUMPS in three steps.
Definition: XtrMumps.c:196
Main header file for the FASP project.
#define MIN(a, b)
Definition: fasp.h:83
#define REAL
Definition: fasp.h:75
#define SHORT
FASP integer and floating point numbers.
Definition: fasp.h:71
#define MAX(a, b)
Definition of max, min, abs.
Definition: fasp.h:82
#define INT
Definition: fasp.h:72
#define SOLVER_PARDISO
Definition: fasp_const.h:126
#define FASP_SUCCESS
Definition of return status and error messages.
Definition: fasp_const.h:19
#define NPAIR
Definition: fasp_const.h:172
#define SOLVER_MUMPS
Definition: fasp_const.h:125
#define PAIRWISE
Definition of aggregation types.
Definition: fasp_const.h:170
#define SOLVER_SUPERLU
Definition: fasp_const.h:123
#define SOLVER_UMFPACK
Definition: fasp_const.h:124
#define PRINT_NONE
Print level for all subroutines – not including DEBUG output.
Definition: fasp_const.h:73
#define PRINT_MIN
Definition: fasp_const.h:74
Data for multigrid levels in dBSRmat format.
Definition: fasp_block.h:146
dCSRmat PP
pointer to the pressure block (only for reservoir simulation)
Definition: fasp_block.h:182
dBSRmat A
pointer to the matrix at level level_num
Definition: fasp_block.h:155
dCSRmat * A_nk
Matrix data for near kernal.
Definition: fasp_block.h:232
dCSRmat Ac
pointer to the matrix at level level_num (csr format)
Definition: fasp_block.h:173
Mumps_data mumps
data for MUMPS
Definition: fasp_block.h:245
dvector b
pointer to the right-hand side at level level_num
Definition: fasp_block.h:164
void * Numeric
pointer to the numerical dactorization from UMFPACK
Definition: fasp_block.h:176
INT ILU_levels
number of levels use ILU smoother
Definition: fasp_block.h:217
INT num_levels
number of levels in use <= max_levels
Definition: fasp_block.h:152
dCSRmat * R_nk
Resriction for near kernal.
Definition: fasp_block.h:238
dvector x
pointer to the iterative solution at level level_num
Definition: fasp_block.h:167
dCSRmat * P_nk
Prolongation for near kernal.
Definition: fasp_block.h:235
dvector diaginv
pointer to the diagonal inverse at level level_num
Definition: fasp_block.h:170
dvector w
temporary work space
Definition: fasp_block.h:242
Data for AMG methods.
Definition: fasp.h:804
dCSRmat A
pointer to the matrix at level level_num
Definition: fasp.h:817
Parameters for AMG methods.
Definition: fasp.h:455
INT ILU_lfil
level of fill-in for ILUs and ILUk
Definition: fasp.h:566
REAL ILU_relax
relaxation for ILUs
Definition: fasp.h:572
SHORT print_level
print level for AMG
Definition: fasp.h:461
SHORT aggregation_type
aggregation type
Definition: fasp.h:518
SHORT ILU_levels
number of levels use ILU smoother
Definition: fasp.h:560
SHORT coarse_solver
coarse solver type
Definition: fasp.h:500
SHORT ILU_type
ILU type for smoothing.
Definition: fasp.h:563
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
INT pair_number
number of pairwise matchings
Definition: fasp.h:542
SHORT max_levels
max number of levels of AMG
Definition: fasp.h:470
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
INT job
work for MUMPS
Definition: fasp.h:615
Block sparse row storage matrix of REAL type.
Definition: fasp_block.h:34
INT COL
number of cols of sub-blocks in matrix A, N
Definition: fasp_block.h:40
INT NNZ
number of nonzero sub-blocks in matrix A, NNZ
Definition: fasp_block.h:43
REAL * val
Definition: fasp_block.h:57
INT nb
dimension of each sub-block
Definition: fasp_block.h:46
INT * IA
integer array of row pointers, the size is ROW+1
Definition: fasp_block.h:60
INT ROW
number of rows of sub-blocks in matrix A, M
Definition: fasp_block.h:37
INT * JA
Definition: fasp_block.h:64
Sparse matrix of REAL type in CSR format.
Definition: fasp.h:151
Vector with n entries of REAL type.
Definition: fasp.h:354
REAL * val
actual vector entries
Definition: fasp.h:360
Vector with n entries of INT type.
Definition: fasp.h:368