VecNorm

Computes the vector norm.

Synopsis

int VecNorm(Vec x,NormType type,double *val)  
Collective on Vec

Input Parameters

x - the vector
type - one of NORM_1, NORM_2, NORM_INFINITY. Also available NORM_1_AND_2, which computes both norms and stores them in a two element array.

Output Parameter

val -the norm

Notes

    NORM_1 denotes sum_i |x_i|
    NORM_2 denotes sqrt( sum_i (x_i)^2 )
    NORM_INFINITY denotes max_i |x_i|

Keywords

vector, norm

See Also

VecDot(), VecTDot(), VecNorm(), VecDotBegin(), VecDotEnd(),
VecNormBegin(), VecNormEnd()

Examples

src/vec/examples/tutorials/ex1f.F
src/vec/examples/tutorials/ex1f90.F
src/vec/examples/tutorials/ex11f.F
src/vec/examples/tutorials/ex1.c
src/vec/examples/tutorials/ex10.c
src/vec/examples/tutorials/ex11.c
src/adic/examples/tutorials/ex1.c
src/adic/examples/tutorials/ex2.c
src/adic/examples/tutorials/ex3.c
src/adic/examples/tutorials/ex4.c
src/adic/examples/tutorials/ex5.c

Level:intermediate
Location:src/vec/interface/vector.c
Vector Index
Table of Contents