Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
blas_vec.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, dvector *x, dvector *y)
 y = a*x + y More...
 
void fasp_blas_dvec_axpyz (const REAL a, dvector *x, dvector *y, dvector *z)
 z = a*x + y, z is a third vector (z is cleared) More...
 
REAL fasp_blas_dvec_dotprod (dvector *x, dvector *y)
 Inner product of two vectors (x,y) More...
 
REAL fasp_blas_dvec_relerr (dvector *x, dvector *y)
 Relative error of two dvector x and y. More...
 
REAL fasp_blas_dvec_norm1 (dvector *x)
 L1 norm of dvector x. More...
 
REAL fasp_blas_dvec_norm2 (dvector *x)
 L2 norm of dvector x. More...
 
REAL fasp_blas_dvec_norminf (dvector *x)
 Linf norm of dvector x. More...
 

Detailed Description

BLAS1 operations for vectors.

Definition in file blas_vec.c.

Function Documentation

void fasp_blas_dvec_axpy ( const REAL  a,
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/209

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

Definition at line 33 of file blas_vec.c.

void fasp_blas_dvec_axpyz ( const REAL  a,
dvector x,
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/209

Modified by Chunsheng Feng, Xiaoqiang Yue

Date
05/23/2012

Definition at line 85 of file blas_vec.c.

REAL fasp_blas_dvec_dotprod ( dvector x,
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/209

Modified by Chunsheng Feng, Xiaoqiang Yue

Date
05/23/2012

Definition at line 121 of file blas_vec.c.

REAL fasp_blas_dvec_norm1 ( dvector x)

L1 norm of dvector x.

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

Modified by Chunsheng Feng, Xiaoqiang Yue

Date
05/23/2012

Definition at line 222 of file blas_vec.c.

REAL fasp_blas_dvec_norm2 ( dvector x)

L2 norm of dvector x.

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

Modified by Chunsheng Feng, Xiaoqiang Yue

Date
05/23/2012

Definition at line 265 of file blas_vec.c.

REAL fasp_blas_dvec_norminf ( dvector x)

Linf norm of dvector x.

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

Definition at line 305 of file blas_vec.c.

REAL fasp_blas_dvec_relerr ( dvector x,
dvector y 
)

Relative error of two dvector x and y.

Parameters
xPointer to dvector x
yPointer to dvector y
Returns
relative error ||x-y||/||x||
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue

Date
05/23/2012

Definition at line 167 of file blas_vec.c.