Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
BlaSpmvBSR.c File Reference

Linear algebraic operations for dBSRmat matrices. More...

#include <math.h>
#include "fasp.h"
#include "fasp_functs.h"

Go to the source code of this file.

Functions

SHORT fasp_blas_dbsr_add (const dBSRmat *A, const REAL alpha, const dBSRmat *B, const REAL beta, dBSRmat *C)
 compute C = alpha*A + beta*B in BSR format More...
 
void fasp_blas_dbsr_axm (dBSRmat *A, const REAL alpha)
 Multiply a sparse matrix A in BSR format by a scalar alpha. More...
 
void fasp_blas_dbsr_aAxpby (const REAL alpha, dBSRmat *A, REAL *x, const REAL beta, REAL *y)
 Compute y := alpha*A*x + beta*y. More...
 
void fasp_blas_dbsr_aAxpy (const REAL alpha, const dBSRmat *A, const REAL *x, REAL *y)
 Compute y := alpha*A*x + y. More...
 
void fasp_blas_dbsr_aAxpy_agg (const REAL alpha, const dBSRmat *A, const REAL *x, REAL *y)
 Compute y := alpha*A*x + y where each small block matrix is an identity matrix. More...
 
void fasp_blas_dbsr_mxv (const dBSRmat *A, const REAL *x, REAL *y)
 Compute y := A*x. More...
 
void fasp_blas_dbsr_mxv_agg (const dBSRmat *A, const REAL *x, REAL *y)
 Compute y := A*x, where each small block matrices of A is an identity. More...
 
void fasp_blas_dbsr_mxm2 (const dBSRmat *A, const dBSRmat *B, dBSRmat *C)
 Sparse matrix multiplication C=A*B. More...
 
void fasp_blas_dbsr_mxm (const dBSRmat *A, const dBSRmat *B, dBSRmat *C)
 Sparse matrix multiplication C=A*B. More...
 
void fasp_blas_dbsr_mxm_adb (const dBSRmat *A, dvector *D, const dBSRmat *B, dBSRmat *C)
 Sparse matrix multiplication C=A*D*B, where D is diagnal matrix. More...
 
void fasp_blas_dbsr_schur (dvector *D2, const dBSRmat *A, dvector *D1, const dBSRmat *B, dBSRmat *C)
 
void fasp_blas_dbsr_rap1 (const dBSRmat *R, const dBSRmat *A, const dBSRmat *P, dBSRmat *B)
 dBSRmat sparse matrix multiplication B=R*A*P More...
 
void fasp_blas_dbsr_rap (const dBSRmat *R, const dBSRmat *A, const dBSRmat *P, dBSRmat *B)
 dBSRmat sparse matrix multiplication B=R*A*P More...
 
void fasp_blas_dbsr_rap_agg (const dBSRmat *R, const dBSRmat *A, const dBSRmat *P, dBSRmat *B)
 dBSRmat sparse matrix multiplication B=R*A*P, where small block matrices in P and R are identity matrices! More...
 

Detailed Description

Linear algebraic operations for dBSRmat matrices.

Note
This file contains Level-1 (Bla) functions. It requires: AuxArray.c, AuxMemory.c, AuxThreads.c, BlaSmallMat.c, and BlaArray.c

Copyright (C) 2009–Present by the FASP team. All rights reserved.

Released under the terms of the GNU Lesser General Public License 3.0 or later.

Definition in file BlaSpmvBSR.c.

Function Documentation

◆ fasp_blas_dbsr_aAxpby()

void fasp_blas_dbsr_aAxpby ( const REAL  alpha,
dBSRmat A,
REAL x,
const REAL  beta,
REAL y 
)

Compute y := alpha*A*x + beta*y.

Parameters
alphaREAL factor alpha
APointer to the dBSRmat matrix
xPointer to the array x
betaREAL factor beta
yPointer to the array y
Author
Zhiyang Zhou
Date
10/25/2010

Modified by Chunsheng Feng, Zheng Li on 06/29/2012

Note
Works for general nb (Xiaozhe)

Definition at line 243 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_aAxpy()

void fasp_blas_dbsr_aAxpy ( const REAL  alpha,
const dBSRmat A,
const REAL x,
REAL y 
)

Compute y := alpha*A*x + y.

Parameters
alphaREAL factor alpha
APointer to the dBSRmat matrix
xPointer to the array x
yPointer to the array y
Author
Zhiyang Zhou
Date
10/25/2010

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Note
Works for general nb (Xiaozhe)

Definition at line 514 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_aAxpy_agg()

void fasp_blas_dbsr_aAxpy_agg ( const REAL  alpha,
const dBSRmat A,
const REAL x,
REAL y 
)

Compute y := alpha*A*x + y where each small block matrix is an identity matrix.

Parameters
alphaREAL factor alpha
APointer to the dBSRmat matrix
xPointer to the array x
yPointer to the array y
Author
Xiaozhe Hu
Date
01/02/2014
Note
Works for general nb (Xiaozhe)

Definition at line 778 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_add()

SHORT fasp_blas_dbsr_add ( const dBSRmat A,
const REAL  alpha,
const dBSRmat B,
const REAL  beta,
dBSRmat C 
)

compute C = alpha*A + beta*B in BSR format

Parameters
APointer to dBSRmat matrix
alphaREAL factor alpha
BPointer to dBSRmat matrix
betaREAL factor beta
CPointer to dBSRmat matrix
Returns
FASP_SUCCESS if succeed, ERROR if not
Author
Li Zhao
Date
07/03/2023

Definition at line 45 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_axm()

void fasp_blas_dbsr_axm ( dBSRmat A,
const REAL  alpha 
)

Multiply a sparse matrix A in BSR format by a scalar alpha.

Parameters
APointer to dBSRmat matrix A
alphaREAL factor alpha
Author
Xiaozhe Hu
Date
05/26/2014

Definition at line 215 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_mxm()

void fasp_blas_dbsr_mxm ( const dBSRmat A,
const dBSRmat B,
dBSRmat C 
)

Sparse matrix multiplication C=A*B.

Parameters
APointer to the dBSRmat matrix A
BPointer to the dBSRmat matrix B
CPointer to dBSRmat matrix equal to A*B
Author
Li Zhao
Date
07/02/2023
Note
This is a new function that is 50% faster than old version (i.e., fasp_blas_dbsr_mxm2) – Li Zhao (07/02/2023)

Definition at line 4883 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_mxm2()

void fasp_blas_dbsr_mxm2 ( const dBSRmat A,
const dBSRmat B,
dBSRmat C 
)

Sparse matrix multiplication C=A*B.

Parameters
APointer to the dBSRmat matrix A
BPointer to the dBSRmat matrix B
CPointer to dBSRmat matrix equal to A*B
Author
Xiaozhe Hu
Date
05/26/2014
Note
This fct will be replaced! – Xiaozhe; Rename fasp_blas_dbsr_mxm to fasp_blas_dbsr_mxm2 – Li Zhao (07/02/2023)

Definition at line 4760 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_mxm_adb()

void fasp_blas_dbsr_mxm_adb ( const dBSRmat A,
dvector D,
const dBSRmat B,
dBSRmat C 
)

Sparse matrix multiplication C=A*D*B, where D is diagnal matrix.

Parameters
APointer to the dBSRmat matrix A
DPointer to the block diagnal matrix D
BPointer to the dBSRmat matrix B
CPointer to dBSRmat matrix equal to A*D*B
Author
Li Zhao
Date
07/02/2023

Definition at line 4997 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_mxv()

void fasp_blas_dbsr_mxv ( const dBSRmat A,
const REAL x,
REAL y 
)

Compute y := A*x.

Parameters
APointer to the dBSRmat matrix
xPointer to the array x
yPointer to the array y
Author
Zhiyang Zhou
Date
10/25/2010
Note
Works for general nb (Xiaozhe)

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Definition at line 1055 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_mxv_agg()

void fasp_blas_dbsr_mxv_agg ( const dBSRmat A,
const REAL x,
REAL y 
)

Compute y := A*x, where each small block matrices of A is an identity.

Parameters
APointer to the dBSRmat matrix
xPointer to the array x
yPointer to the array y
Author
Xiaozhe Hu
Date
01/02/2014
Note
Works for general nb (Xiaozhe)

Definition at line 2815 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_rap()

void fasp_blas_dbsr_rap ( const dBSRmat R,
const dBSRmat A,
const dBSRmat P,
dBSRmat B 
)

dBSRmat sparse matrix multiplication B=R*A*P

Parameters
RPointer to the dBSRmat matrix
APointer to the dBSRmat matrix
PPointer to the dBSRmat matrix
BPointer to dBSRmat matrix equal to R*A*P (output)
Author
Xiaozhe Hu, Chunsheng Feng, Zheng Li
Date
10/24/2012
Note
Ref. R.E. Bank and C.C. Douglas. SMMP: Sparse Matrix Multiplication Package. Advances in Computational Mathematics, 1 (1993), pp. 127-137.

Definition at line 5466 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_rap1()

void fasp_blas_dbsr_rap1 ( const dBSRmat R,
const dBSRmat A,
const dBSRmat P,
dBSRmat B 
)

dBSRmat sparse matrix multiplication B=R*A*P

Parameters
RPointer to the dBSRmat matrix
APointer to the dBSRmat matrix
PPointer to the dBSRmat matrix
BPointer to dBSRmat matrix equal to R*A*P (output)
Author
Chunsheng Feng, Xiaoqiang Yue and Xiaozhe Hu
Date
08/08/2011
Note
Ref. R.E. Bank and C.C. Douglas. SMMP: Sparse Matrix Multiplication Package. Advances in Computational Mathematics, 1 (1993), pp. 127-137.

Definition at line 5255 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_rap_agg()

void fasp_blas_dbsr_rap_agg ( const dBSRmat R,
const dBSRmat A,
const dBSRmat P,
dBSRmat B 
)

dBSRmat sparse matrix multiplication B=R*A*P, where small block matrices in P and R are identity matrices!

Parameters
RPointer to the dBSRmat matrix
APointer to the dBSRmat matrix
PPointer to the dBSRmat matrix
BPointer to dBSRmat matrix equal to R*A*P (output)
Author
Xiaozhe Hu
Date
10/24/2012
Note
Bugs for OpenMP modified by Li Zhao, 2023.06.17

Definition at line 5739 of file BlaSpmvBSR.c.

◆ fasp_blas_dbsr_schur()

void fasp_blas_dbsr_schur ( dvector D2,
const dBSRmat A,
dvector D1,
const dBSRmat B,
dBSRmat C 
)

Definition at line 5117 of file BlaSpmvBSR.c.