#include "petscvec.h" PetscErrorCode VecNorm(Vec x,NormType type,PetscReal *val)Collective on Vec
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. |
PetscReal VecNorm(Vec x) | -> | VecNorm(x,NORM_2,&r); return r; | |||
PetscReal VecNorm(Vec x,NormType t) | -> | VecNorm(x,t,&r); return r; | |||
  VecNorm(Vec x,PetscReal *r) | -> | VecNorm(x,NORM_2,r) |
NORM_1 denotes sum_i |x_i|
NORM_2 denotes sqrt(sum_i (x_i)^2)
NORM_INFINITY denotes max_i |x_i|