slepc-3.16.3 2022-04-11
Report Typos and Errors

VecSetRandomNormal

Sets all components of a vector to normally distributed random values.

Synopsis

#include "slepcvec.h" 
PetscErrorCode VecSetRandomNormal(Vec v,PetscRandom rctx,Vec w1,Vec w2)
Logically Collective on v

Input parameters

v  - the vector to be filled with random values
rctx  - the random number context (can be NULL)
w1,w2  - two work vectors (can be NULL)

Output parameter

v  - the vector

Notes

Fills the two work vectors with uniformly distributed random values (VecSetRandom) and then applies the Box-Muller transform to get normally distributed values on v.

Location: src/sys/vec/vecutil.c
Index of all sys routines
Table of Contents for all manual pages
Index of all manual pages