petsc-3.7.1 2016-05-15
Report Typos and Errors

VecNormAvailable

Returns the vector norm if it is already known.

Synopsis

#include "petscvec.h"   
PetscErrorCode  VecNormAvailable(Vec x,NormType type,PetscBool  *available,PetscReal *val)
Not Collective Many br

Input Parameters

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

Output Parameter

available - PETSC_TRUE if the val returned is valid Many br
val - the norm Many br

Notes

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

Many br

Performance Issues

   per-processor memory bandwidth
   interprocessor latency
   work load inbalance that causes certain processes to arrive much earlier than others

Compile Option

PETSC_HAVE_SLOW_BLAS_NORM2 will cause a C (loop unrolled) version of the norm to be used, rather Many brthan the BLAS. This should probably only be used when one is using the FORTRAN BLAS routines Many br(as opposed to vendor provided) because the FORTRAN BLAS NRM2() routine is very slow. Many br

See Also

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

Level:intermediate
Location:
src/vec/vec/interface/rvector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages