![]() |
Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
|
Sparse matrix operations for dBSRmat matrices. More...
Go to the source code of this file.
Functions | |
| 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. More... | |
| void | fasp_dbsr_alloc (const INT ROW, const INT COL, const INT NNZ, const INT nb, const INT storage_manner, dBSRmat *A) |
| Allocate memory space for BSR format sparse matrix. More... | |
| void | fasp_dbsr_free (dBSRmat *A) |
| Free memory space for BSR format sparse matrix. More... | |
| void | fasp_dbsr_cp (const dBSRmat *A, dBSRmat *B) |
| copy a dCSRmat to a new one B=A More... | |
| SHORT | fasp_dbsr_compress_inplace (dBSRmat *A, const REAL dtol) |
| Compress a BSR matrix A IN PLACE by dropping small entries max(|Aij|) <= dtol. More... | |
| INT | fasp_dbsr_trans (const dBSRmat *A, dBSRmat *AT) |
| Find A^T from given dBSRmat matrix A. More... | |
| SHORT | fasp_dbsr_getblk (const dBSRmat *A, const INT *Is, const INT *Js, const INT m, const INT n, dBSRmat *B) |
| Get a sub BSR matrix of A with specified rows and columns. More... | |
| SHORT | fasp_dbsr_diagpref (dBSRmat *A) |
| Reorder the column and data arrays of a square BSR matrix, so that the first entry in each row is the diagonal one. More... | |
| dvector | fasp_dbsr_getdiaginv (const dBSRmat *A) |
| Get D^{-1} of matrix A. More... | |
| dBSRmat | fasp_dbsr_diaginv (const dBSRmat *A) |
| Compute B := D^{-1}*A, where 'D' is the block diagonal part of A. More... | |
| dBSRmat | fasp_dbsr_diaginv2 (const dBSRmat *A, REAL *diaginv) |
| Compute B := D^{-1}*A, where 'D' is the block diagonal part of A. More... | |
| dBSRmat | fasp_dbsr_diaginv3 (const dBSRmat *A, REAL *diaginv) |
| Compute B := D^{-1}*A, where 'D' is the block diagonal part of A. More... | |
| dBSRmat | fasp_dbsr_diaginv4 (const dBSRmat *A, REAL *diaginv) |
| Compute B := D^{-1}*A, where 'D' is the block diagonal part of A. More... | |
| void | fasp_dbsr_getdiag (INT n, const dBSRmat *A, REAL *diag) |
| Abstract the diagonal blocks of a BSR matrix. More... | |
| dBSRmat | fasp_dbsr_diagLU (const dBSRmat *A, REAL *DL, REAL *DU) |
| Compute B := DL*A*DU. We decompose each diagonal block of A into LDU form and DL = diag(L^{-1}) and DU = diag(U^{-1}). More... | |
| dBSRmat | fasp_dbsr_diagLU2 (dBSRmat *A, REAL *DL, REAL *DU) |
| Compute B := DL*A*DU. We decompose each diagonal block of A into LDU form and DL = diag(L^{-1}) and DU = diag(U^{-1}). More... | |
| dBSRmat | fasp_dbsr_perm (const dBSRmat *A, const INT *P) |
| Apply permutation of A, i.e. Aperm=PAP' by the orders given in P. More... | |
| INT | fasp_dbsr_merge_col (dBSRmat *A) |
| Check and merge some same col index in one row. More... | |
| void | dBSRmat_Multicoloring_Theta (dBSRmat *A, REAL theta, INT *rowmax, INT *groups, INT **ic_out, INT **icmap_out) |
Sparse matrix operations for dBSRmat matrices.
Copyright (C) 2009–Present by the FASP team. All rights reserved.
Definition in file BlaSparseBSR.c.
| void dBSRmat_Multicoloring_Theta | ( | dBSRmat * | A, |
| REAL | theta, | ||
| INT * | rowmax, | ||
| INT * | groups, | ||
| INT ** | ic_out, | ||
| INT ** | icmap_out | ||
| ) |
Definition at line 2337 of file BlaSparseBSR.c.
| void fasp_dbsr_alloc | ( | const INT | ROW, |
| const INT | COL, | ||
| const INT | NNZ, | ||
| const INT | nb, | ||
| const INT | storage_manner, | ||
| dBSRmat * | A | ||
| ) |
Allocate memory space for BSR format sparse matrix.
| ROW | Number of rows of block |
| COL | Number of columns of block |
| NNZ | Number of nonzero blocks |
| nb | Dimension of each block |
| storage_manner | Storage manner for each sub-block |
| A | Pointer to new dBSRmat matrix |
Definition at line 96 of file BlaSparseBSR.c.
Compress a BSR matrix A IN PLACE by dropping small entries max(|Aij|) <= dtol.
| A | Pointer to dBSRmat BSR matrix |
| dtol | Drop tolerance |
Definition at line 197 of file BlaSparseBSR.c.
| 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.
| ROW | Number of rows of block |
| COL | Number of columns of block |
| NNZ | Number of nonzero blocks |
| nb | Dimension of each block |
| storage_manner | Storage manner for each sub-block |
Definition at line 48 of file BlaSparseBSR.c.
Compute B := D^{-1}*A, where 'D' is the block diagonal part of A.
| A | Pointer to the dBSRmat matrix |
Modified by Chunsheng Feng, Zheng Li on 08/25/2012 Modified by Chensong Zhang on 09/27/2017
Definition at line 645 of file BlaSparseBSR.c.
Compute B := D^{-1}*A, where 'D' is the block diagonal part of A.
| A | Pointer to the dBSRmat matrix |
| diaginv | Pointer to the inverses of all the diagonal blocks |
Modified by Chunsheng Feng, Zheng Li on 08/25/2012
Definition at line 803 of file BlaSparseBSR.c.
Compute B := D^{-1}*A, where 'D' is the block diagonal part of A.
| A | Pointer to the dBSRmat matrix |
| diaginv | Pointer to the inverses of all the diagonal blocks |
Modified by Xiaozhe Hu on 05/26/2012
Definition at line 911 of file BlaSparseBSR.c.
Compute B := D^{-1}*A, where 'D' is the block diagonal part of A.
| A | Pointer to the dBSRmat matrix |
| diaginv | Pointer to the inverses of all the diagonal blocks |
Modified by Chunsheng Feng, Zheng Li on 08/26/2012
Definition at line 1335 of file BlaSparseBSR.c.
Compute B := DL*A*DU. We decompose each diagonal block of A into LDU form and DL = diag(L^{-1}) and DU = diag(U^{-1}).
| A | Pointer to the dBSRmat matrix |
| DL | Pointer to the diag(L^{-1}) |
| DU | Pointer to the diag(U^{-1}) |
Definition at line 1677 of file BlaSparseBSR.c.
Compute B := DL*A*DU. We decompose each diagonal block of A into LDU form and DL = diag(L^{-1}) and DU = diag(U^{-1}).
| A | Pointer to the dBSRmat matrix |
| DL | Pointer to the diag(L^{-1}) |
| DU | Pointer to the diag(U^{-1}) |
Definition at line 1905 of file BlaSparseBSR.c.
Reorder the column and data arrays of a square BSR matrix, so that the first entry in each row is the diagonal one.
| A | Pointer to the BSR matrix |
Definition at line 435 of file BlaSparseBSR.c.
| void fasp_dbsr_free | ( | dBSRmat * | A | ) |
Free memory space for BSR format sparse matrix.
| A | Pointer to the dBSRmat matrix |
Definition at line 140 of file BlaSparseBSR.c.
| SHORT fasp_dbsr_getblk | ( | const dBSRmat * | A, |
| const INT * | Is, | ||
| const INT * | Js, | ||
| const INT | m, | ||
| const INT | n, | ||
| dBSRmat * | B | ||
| ) |
Get a sub BSR matrix of A with specified rows and columns.
| A | Pointer to dBSRmat BSR matrix |
| B | Pointer to dBSRmat BSR matrix |
| Is | Pointer to selected rows |
| Js | Pointer to selected columns |
| m | Number of selected rows |
| n | Number of selected columns |
Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012
Definition at line 332 of file BlaSparseBSR.c.
Abstract the diagonal blocks of a BSR matrix.
| n | Number of blocks to get |
| A | Pointer to the 'dBSRmat' type matrix |
| diag | Pointer to array which stores the diagonal blocks in row by row manner |
Modified by Chunsheng Feng, Zheng Li on 08/25/2012
Definition at line 1641 of file BlaSparseBSR.c.
Get D^{-1} of matrix A.
| A | Pointer to the dBSRmat matrix |
Definition at line 543 of file BlaSparseBSR.c.
Check and merge some same col index in one row.
| A | Pointer to the original dBSRmat matrix |
Definition at line 2223 of file BlaSparseBSR.c.
Apply permutation of A, i.e. Aperm=PAP' by the orders given in P.
| A | Pointer to the original dBSRmat matrix |
| P | Pointer to the given ordering |
Definition at line 2106 of file BlaSparseBSR.c.