SlepcVecSetRandom

Sets all components of a vector to random numbers.

Synopsis

#include "slepcvec.h" 
PetscErrorCode SlepcVecSetRandom(Vec x,PetscRandom rctx)
Logically Collective on Vec

Input/Output Parameter

x - the vector

Input Parameter

rctx - the random number context, formed by PetscRandomCreate(), or PETSC_NULL and it will create one internally.

Note

This operation is equivalent to VecSetRandom - the difference is that the vector generated by SlepcVecSetRandom is the same irrespective of the size of the communicator.

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