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

# VecNormalize

Normalizes a vector by 2-norm.

### Synopsis

    #include "petscvec.h"
    PetscErrorCode  VecNormalize(Vec x,PetscReal *val)

Collective on Vec Many br

### Input Parameters

| x | - the vector Many br

### Output Parameter

| x | - the normalized vector Many br
| val | - the vector norm before normalization Many br

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

### Examples

src/ksp/ksp/examples/tutorials/ex49.c.html
src/snes/examples/tutorials/ex62.c.html