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

BLAS1 operations for vectors. More...

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

Go to the source code of this file.

Functions

void fasp_blas_dvec_axpy (const REAL a, const dvector *x, dvector *y)
 y = a*x + y More...
 
void fasp_blas_dvec_axpyz (const REAL a, const dvector *x, const dvector *y, dvector *z)
 z = a*x + y, z is a third vector (z is cleared) More...
 
REAL fasp_blas_dvec_norm1 (const dvector *x)
 L1 norm of dvector x. More...
 
REAL fasp_blas_dvec_norm2 (const dvector *x)
 L2 norm of dvector x. More...
 
REAL fasp_blas_dvec_norminf (const dvector *x)
 Linf norm of dvector x. More...
 
REAL fasp_blas_dvec_dotprod (const dvector *x, const dvector *y)
 Inner product of two vectors (x,y) More...
 
REAL fasp_blas_dvec_relerr (const dvector *x, const dvector *y)
 Relative difference between two dvector x and y. More...
 

Detailed Description

BLAS1 operations for vectors.

Note
This file contains Level-1 (Bla) functions. It requires: AuxMessage.c, AuxThreads.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 BlaVector.c.

Function Documentation

◆ fasp_blas_dvec_axpy()

void fasp_blas_dvec_axpy ( const REAL  a,
const dvector x,
dvector y 
)

y = a*x + y

Parameters
aREAL factor a
xPointer to dvector x
yPointer to dvector y
Author
Chensong Zhang
Date
07/01/2009

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

Definition at line 41 of file BlaVector.c.

◆ fasp_blas_dvec_axpyz()

void fasp_blas_dvec_axpyz ( const REAL  a,
const dvector x,
const dvector y,
dvector z 
)

z = a*x + y, z is a third vector (z is cleared)

Parameters
aREAL factor a
xPointer to dvector x
yPointer to dvector y
zPointer to dvector z
Author
Chensong Zhang
Date
07/01/2009

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

Definition at line 96 of file BlaVector.c.

◆ fasp_blas_dvec_dotprod()

REAL fasp_blas_dvec_dotprod ( const dvector x,
const dvector y 
)

Inner product of two vectors (x,y)

Parameters
xPointer to dvector x
yPointer to dvector y
Returns
Inner product
Author
Chensong Zhang
Date
07/01/2009

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

Definition at line 236 of file BlaVector.c.

◆ fasp_blas_dvec_norm1()

REAL fasp_blas_dvec_norm1 ( const dvector x)

L1 norm of dvector x.

Parameters
xPointer to dvector x
Returns
L1 norm of x
Author
Chensong Zhang
Date
07/01/2009

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

Definition at line 130 of file BlaVector.c.

◆ fasp_blas_dvec_norm2()

REAL fasp_blas_dvec_norm2 ( const dvector x)

L2 norm of dvector x.

Parameters
xPointer to dvector x
Returns
L2 norm of x
Author
Chensong Zhang
Date
07/01/2009

Definition at line 170 of file BlaVector.c.

◆ fasp_blas_dvec_norminf()

REAL fasp_blas_dvec_norminf ( const dvector x)

Linf norm of dvector x.

Parameters
xPointer to dvector x
Returns
L_inf norm of x
Author
Chensong Zhang
Date
07/01/2009

Definition at line 208 of file BlaVector.c.

◆ fasp_blas_dvec_relerr()

REAL fasp_blas_dvec_relerr ( const dvector x,
const dvector y 
)

Relative difference between two dvector x and y.

Parameters
xPointer to dvector x
yPointer to dvector y
Returns
Relative difference ||x-y||/||x||
Author
Chensong Zhang
Date
07/01/2009

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

Definition at line 278 of file BlaVector.c.